TR Autonomous Engineering

TR Autonomous Engineering

From a customer-reported defect to a verified code fix: setup, each stage, what runs where, and the controls.

TR Autonomous Engineering takes a defect a customer reported through to a fix verified against that customer’s original failure. It joins the pieces you already use into one traceable case: TicketResolve Connect, the investigation, the reproduction, your repositories, the fix assistant, your CI and your deployments. A person approves every change. TicketResolve never merges, never deploys, and never calls a case fixed because a build or deployment succeeded.

What happens, stage by stage

StageWhat TicketResolve doesAI call?Who decides
1. TicketAn investigation starts from the customer’s ticket and becomes case TRC-<number>The ticket’s one call—
2. Authorized evidenceTicketResolve Connect collects only what the customer approves: environment details, logs, failing requests, database metadata and performanceNoThe customer
3. InvestigationCorrelates the evidence, names the affected service and ranks possible root causesNoYour team confirms the root cause
4. ReproductionRepeats the failing requests in the customer’s environment, checks logs and infrastructure, and records every attemptNoYou start it; the customer approves steps that change data
5. CodeIndexes your repositories at the deployed commit and maps the evidence to ranked code locationsNo—
6. FixProposes a multi-file change with its reasoningYes: one, plus up to two regenerations after a rejection with a reasonSomeone other than the requester approves
7. TestsGenerates regression tests from the customer’s failure and runs your CI on TicketResolve’s branchNoYou start the CI run
8. Pull requestOpens a draft pull request with tested facts kept apart from assumptionsNoYour reviewers merge
9. DeploymentWaits for your CI/CD to deploy a commit that contains the fixNoYour release process
10. VerificationRepeats the customer’s reproduction, re-runs the tests, compares telemetry, and posts the findings to the ticketNo—

Before you start

  1. 1
    Connect your repositories

    Engineering intelligence → Code: connect GitHub, GitLab or Bitbucket with a token, then choose the repositories TicketResolve may read. Only chosen repositories are ever indexed. A read-only token is enough for everything except draft pull requests and CI runs.

  2. 2
    Send deployments to TicketResolve

    Settings → Deployments: add the webhook from your CI/CD so each deployment reports its service, environment, version and commit. That is how TicketResolve finds the commit a customer runs, and later checks that a deployment contains the fix.

  3. 3
    Switch on the fix assistant

    Engineering intelligence → Modules → Fix assistant. Optionally switch on the dependency vulnerability scan, which sends package names and versions (never code) to OSV.dev.

  4. 4
    Grant repository permissions

    Engineering intelligence → Engineering governance: give the repository propose (draft pull requests on a new branch) and, if TicketResolve should start your CI on its branch, modify. TicketResolve never gets merge. Base-branch patterns and the emergency stop apply to every write.

  5. 5
    Set up CI for test plans

    In the same place, name the workflow TicketResolve starts and its suites. To have your CI build a disposable environment, choose one and declare the extra inputs:

    GitHub workflow inputs
    on:
      workflow_dispatch:
        inputs:
          suites: { required: false }
          tr_ai_plan: { required: false }
          tr_env: { required: false }        # ci_runner | docker_compose | kubernetes_namespace
          tr_namespace: { required: false }  # e.g. tr-ai-inv-42-7 (Kubernetes only)
          tr_database: { required: false }   # none | temporary
          tr_mocks: { required: false }      # true | false
          tr_data: { required: false }       # always "fixtures"

    Your workflow creates and removes the environment and sets TR_TEST_BASE_URL for the generated tests. TicketResolve hosts nothing and never copies production data.

What runs on its own

From a ticket to a code map, nothing needs a click unless a person has a decision to make. The investigation page shows each step under Progress with its time and, if it failed, why — a failed step is retried every 10 minutes.

StepHappens whenA person decides
Connect session linkedA session and an investigation share a ticket (in either order), in the same workspace—
Evidence collectedThe customer’s agent connects: everything they allowed and configured is collectedThe customer allows each item
Investigation analysedNew evidence arrives (exceptions in the customer’s logs count when they match the report)—
Repository identifiedThe ticket, a stack-trace path or a log path names one of your repositories; a branch named in the ticket (“branch bug_test”) is keptWhich repository, when two match or the named one isn’t added to the workspace yet
Repository readThe repository is indexed at that branch—
Evidence mapped to codeOnce per new evidence and repository / branch—
Fix proposed“Propose a fix” (one AI call), on the investigation’s branchApproving it, opening the pull request, merging

Detection never falls back to an unrelated repository: with nothing naming one, the investigation asks you to choose. Use Change next to the repository to pick another one or a branch; admins can add a repository the Git connection can read straight from the investigation. Changing it maps the evidence again.

Re-run with fresh evidence always analyses again and says whether there was new evidence since the last analysis.

The case

Every investigation has a case, shown at the top of its Engineering tab, as its own page (/dashboard/engineering-intelligence/case/<id>), and in Engineering intelligence → Customer issue → verified fix. Each stage has a status (done, in progress, waiting, needs attention, not started), a summary, and references to the records behind it, such as connect_repro_runs#12, code_maps#4, a pull request URL or deployment_events#88.

Next lists only the steps still needed. It doesn’t suggest collecting evidence that is already in, re-mapping code that already has a current map, or repeating a reproduction that already ran. Steps marked No AI call (index the deployed commit, map evidence to code, plan the tests, start the verification) can be started from the case. Steps that make an AI call, need the customer, or open a pull request are done by a person in their own panel.

Code intelligence

Engineering intelligence → Code intelligence → Index now reads a repository at a commit and keeps facts about each file:

  • Languages: TypeScript, JavaScript, Python, Java, Kotlin, C#, Go, Ruby, PHP and Rust.
  • Frameworks and dependencies, from package.json, requirements.txt / pyproject.toml, go.mod, pom.xml / Gradle, Gemfile, composer.json, .csproj and Cargo.toml. Exact versions are kept; ranges are not treated as versions.
  • Functions, classes and methods, imports, and which files call which functions.
  • API routes and their handlers: Express-style routers, NestJS, Next.js, Flask, FastAPI, Django, Spring, ASP.NET Core, Go net/http, Gin, Echo, chi, Rails, Sinatra, Laravel and Rust web frameworks.
  • Database access (SQL text and ORM calls, with the tables named), configuration keys read from the environment, and tests with their framework and the routes they exercise.

Each index names the commit it read, so every finding uses the right revision. Re-indexing reads only files that changed. An index covers up to 600 files and 12 MB per repository, application code first; when a repository is larger, the index says it is partial. Code is read as text and never run; file contents are not kept. Search finds a function, route, table or setting across your indexes.

Root cause → code

On the investigation’s Engineering tab, Map evidence to code:

  1. 1
    Finds the commit the customer runs

    It looks for the version the customer’s Connect agent reported (TR_APP_VERSION) among your deployments. If there is none, it uses the latest deployment of the service before the error was first seen. If that commit isn’t indexed yet, TicketResolve indexes it first.

  2. 2
    Maps the evidence

    It maps stack frames to files and enclosing functions, and failing requests to the route handlers that serve them. It also follows what those handlers import, and looks at error words in function names, tables and configuration keys, at recent changes to those files, at slow database statements and at third-party failures.

  3. 3
    Shows facts, then ranked hypotheses

    Facts are observations with their evidence, for example “GET /api/orders/42 is served by getOrder (src/routes/orders.ts:4)”. Possible defect locations are ranked, and each lists the evidence for it and against it. A change made only after the error started counts against a location, and failing third-party requests point away from your code. Nothing is confirmed until your team confirms the root cause.

Reproduction evidence

A reproduction in the customer’s environment records every attempt: when it ran, the status, how long it took, a response excerpt, screenshots taken during the run, and the product version. Reported failures and indirect signs are kept apart. Gateway errors and other hosts that failed in the customer’s browser are reported as possible dependency failures. With database metadata allowed, Connect agent 1.2.0 adds the slowest statements from pg_stat_statements, MySQL performance_schema or SQL Server query stats. Only normalised statement text, call counts and mean times are collected, with literals replaced by ?.

Warning:A reproduction that doesn’t fail is never proof that the customer’s problem doesn’t exist. It is recorded as “not reproduced” and the investigation continues.

The proposed fix

With a code map, the fix assistant reads its top locations and their callers, up to five files, in one AI call. Tickets, logs and code go to the model as data inside tagged sections, with an instruction to ignore any instructions they contain. The answer is validated: it may only edit the files it was given, each change must match the current file exactly once, and new files may only be tests. A proposal contains:

  • The root cause as a hypothesis, and the kind of correction: logic, error handling, input validation, performance, security, configuration or dependency.
  • What each file’s change does, the before-and-after diff, and the expected behaviour.
  • Potential side effects, plus security, rollback and deployment considerations.
  • The assumptions the AI couldn’t check.

An automated patch review checks scope, secrets, dangerous patterns, dependency changes, conventions and tests. With the dependency scan on, a dependency the change adds or updates that has a known vulnerability blocks the pull request until a reviewer overrides it with a reason.

Regression tests from the customer’s failure

Each request that failed in the reproduction becomes a test in your repository’s own framework. TicketResolve writes these tests itself, without AI:

Your repository usesGenerated file
Vitest / Jest / Mocha<test folder>/regression/tr-inv-<id>.test.ts (or .js)
No framework detected (JavaScript / TypeScript)tests/regression/tr-inv-<id>.test.mjs using node:test
pytest (or Python)<test folder>/test_tr_inv_<id>.py
Gotr_regression/tr_inv_<id>_test.go

Each test checks the original scenario (the expected status), that the previously failing behaviour is gone (the reported status and error text), intermittent failures by repeating the request, and the JSON contract. Requests your existing tests already exercise are skipped and listed. The tests run against TR_TEST_BASE_URL and skip when it isn’t set. They refuse to run against the host the failure was reported on unless TR_TEST_ALLOW_REPORTED_HOST=1, and send TR_TEST_AUTH as the Authorization header when you set it.

The draft pull request

After someone other than the requester approves, Open a draft pull request creates a new tr-ai/ branch and commits the change and the tests. It then opens a draft linked to the case, the investigation, the engineering issue and the customer ticket. The description has two separate sections:

  • Tested facts: the reproduction verdict with its run, version and steps, code-map facts with references, the patch review, the dependency scan and the CI results.
  • Assumptions (not verified): the root cause hypothesis, the confidence, the most likely location, and what the AI assumed.

After those come the changes per file, expected behaviour, side effects, security, rollback, deployment considerations, tests and provenance (inputs and their versions, prompt hash, attempt, code map). Your repository’s required reviews and checks still apply. TicketResolve never merges.

Verification against the original failure

Once your team merges and a deployment of the service reports in, Start the verification (or the case’s next step) runs five checks:

  1. 1
    The deployed commit contains the fix

    The fix’s merge commit must be in the deployed commit’s history, as reported by GitHub, GitLab or Bitbucket. Otherwise TicketResolve waits for a deployment that carries it.

  2. 2
    The customer’s reproduction is repeated

    While the customer’s Connect access lasts, the same steps run again in their environment. Steps that change data need their approval again.

  3. 3
    Regression tests run again

    The tests made from this ticket run again.

  4. 4
    Telemetry before and after

    The original error signature and the service’s health are compared before and after the release. New error signatures are flagged as regressions.

  5. 5
    A verdict and the findings

    The verdict is Verified fixed, Partially fixed (some steps still fail sometimes), Not fixed, Regression detected or Inconclusive. When it is final, the ticket and the engineering issue get the findings: root cause (confirmed, or marked as a hypothesis), code location, pull request, deployed version and commit, the regression test and the verification evidence. The report is also kept with the verification. If your help desk didn’t accept the note, the case says so.

Controls

  • Human review before any change is submitted, and approval by someone other than the requester.
  • Repository-scoped permissions (read, propose, modify; never merge), branch rules, the emergency stop, and an audit of every write allowed or refused.
  • Isolation: tests run in your CI, never on TicketResolve’s infrastructure, and never against production or with production data.
  • Secret detection in the patch, and an optional dependency vulnerability scan.
  • Untrusted content: code, logs and evidence are data, never instructions. The AI’s answer is parsed and validated, and nothing it says is executed.
  • Version tracking (indexes and maps name their commit) and limits: index budgets, AI attempt limits and rate limits on every action.

What isn’t available yet

  • Browser steps can’t run inside the customer’s network. Browser evidence comes from the customer’s own browser capture, and browser reproduction runs in the Reproduction lab against your test environment.
  • Test generation doesn’t yet cover JUnit, RSpec, PHPUnit or xUnit.
  • TicketResolve doesn’t host test environments. Docker, Kubernetes namespaces and temporary databases are built by your CI from the inputs above.

API

Endpoints
GET  /api/trial/:trialId/code-index                                   indexes and limits
POST /api/trial/:trialId/code-index                                   { repo, ref? }
GET  /api/trial/:trialId/code-index/search?q=&repo=&kind=
GET  /api/trial/:trialId/code-index/:id/file?path=
POST /api/trial/:trialId/engineering-intelligence/investigations/:id/code-map/prepare
POST /api/trial/:trialId/engineering-intelligence/investigations/:id/code-map
GET  /api/trial/:trialId/engineering-intelligence/investigations/:id/case
POST /api/trial/:trialId/engineering-intelligence/investigations/:id/case/advance   { step: index | map | plan_tests | verify }
GET  /api/trial/:trialId/engineering-intelligence/cases
POST /api/trial/:trialId/connect/repro/:runId/rerun