# From a Customer’s Bug Report to a Verified Code Fix: How TR Autonomous Engineering Works

> Most support-to-engineering handoffs lose something on the way: the exact failure becomes a paraphrase, the engineer reads `main` instead of what the customer runs, and the ticket closes on a green deploy. TR Autonomous Engineering keeps one traceable case from the ticket to the fix: authorized evidence, a reproduction in the customer’s environment, code at the commit they run, a multi-file fix, regression tests made from their failure, a draft pull request, and verification against the original failure.

Source: https://www.ticketresolve.ai/blog/customer-issue-to-verified-code-fix · Published 2026-11-15 · TicketResolve AI

Most support-to-engineering handoffs lose something on the way. The customer's exact failure becomes a paraphrase in a ticket. The engineer reads the code on `main`, not the version the customer runs. The fix ships, the ticket is closed because the deployment went green, and a week later the customer writes again.

Here's a typical case at an e-commerce platform company. A merchant reports: *"Order pages give a 500 for some orders."* Support writes in Jira: *"Order page error for merchant X."* An engineer opens `main`, finds nothing wrong with the order handler, and asks support for more details. Three days later, someone notices the merchant runs **version 4.9**, and `main` is 5.2; the bug was in a code path that 5.0 rewrote. A fix is backported, CI passes, it deploys, the ticket closes. The merchant writes again: still failing, for orders with gift cards. Nobody had tested that case, because nobody had the merchant's failing requests.

TR Autonomous Engineering keeps the thread unbroken. **Every investigation is a case, TRC-<number>, that runs from the customer's ticket to a fix verified against the failure they actually had. Each stage shows the records behind it. A person approves every change, and TicketResolve never merges or deploys.**

## First, the basics

- **A case** (TRC-number) follows one problem from ticket to verified fix.
- **TicketResolve Connect** collects diagnostics from the customer's environment, only what they authorize.
- **A reproduction** makes the failure happen on demand. Its **verdict** is reproduced, suspected, not reproduced or inconclusive.
- **A commit** is one saved version of code. **The deployed commit** is what's actually running for a customer.
- **Indexing** reads a repository to understand its structure: functions, routes, calls, tests.
- **A stack trace frame** points to a line in a function.
- **A diff** is a code change. **A draft pull request** proposes it for review.
- **A regression test** checks a fixed bug stays fixed. **Vitest, Jest, Mocha, node:test, pytest, go test** are test frameworks.
- **Fixtures** are test data. **Mocked** third parties are fakes used in tests.

**Why does this matter?** Every handoff that loses detail costs days and a second "still broken". Keeping the customer's actual evidence, the code they actually run and the failure they actually had attached to the fix means the fix is right the first time, and proven.

## The problem, in plain terms

1. **Failures are paraphrased** in handoffs.
2. **Engineers read `main`**, not the customer's version.
3. **Fixes aren't tested** against the customer's failure.
4. **Pull requests mix facts with guesses.**
5. **Green deploys close tickets** without proof.

## 1. Evidence the customer authorized

It starts with [TicketResolve Connect](https://www.ticketresolve.ai/docs/integrations/ticketresolve-connect). **The customer approves exactly what may be collected: environment details, log lines, the requests that failed in their browser, API checks against the endpoints they list, database metadata.** **With agent 1.2.0, that metadata includes the slowest statements, as normalised text with literals replaced by `?`.**

**The agent also reports the product version they run.** That one detail matters later.

## 2. A reproduction that keeps its evidence

**Reproduce with TicketResolve AI turns the recorded failures into steps, with no AI call, and runs each one several times in the customer's environment.** **Every attempt is kept: when it ran, the status, how long it took, a response excerpt, and any screenshots taken meanwhile.**

**The verdict is one of four: reproduced, suspected, not reproduced or inconclusive. Failing dependencies are reported separately**, such as a gateway error or another host that failed in the browser.

**A reproduction that doesn't fail is recorded as exactly that. It is never treated as proof that the customer is wrong.**

## 3. The code they actually run

**Your CI/CD already tells TicketResolve which commit each deployment carried. TicketResolve matches the version the customer's agent reported to that commit, indexes your repository there**, and records:

- languages, frameworks and dependencies
- functions, classes and what calls what
- API routes and their handlers
- database access, configuration keys and tests

**Map evidence to code** then works from the stack trace and the failing request. It finds the frame inside `getOrder` at line 3, and the route that serves `GET /api/orders/42`. **It checks what that handler imports, and whether a change touched the file before the error started.**

The result keeps two lists apart:

- **Facts**, each with the record it came from.
- **Possible defect locations**, ranked, each showing the evidence for it and the evidence against it.

**A change made only after the error began counts against a location. Failing third-party calls point away from your code.**

## 4. A fix with its reasoning

**The fix assistant reads the top locations and their callers, up to five files, and makes one AI call.** **Everything it reads is passed as data with an instruction to ignore embedded instructions, and its answer is checked before anyone sees it.**

The proposal is more than a diff. It gives:

- **the root cause, stated as a hypothesis**
- what each file's change does
- the expected behaviour
- side effects
- security, rollback and deployment considerations
- **the assumptions the AI couldn't check**

**Someone other than the person who asked approves or rejects it. A rejection with a reason allows at most two regenerations.**

## 5. Tests made from the real failure

This is the part that usually goes missing. **Each request that failed in the customer's environment becomes a regression test, written by TicketResolve in your repository's own framework: Vitest, Jest, Mocha, node:test, pytest or go test. No AI is involved.**

**The test asserts the expected status and that the reported failure is gone. It repeats the request when the failure was intermittent, and checks that a JSON response still parses. Requests your existing tests already exercise are skipped.**

**The tests run against `TR_TEST_BASE_URL`, and refuse the host the failure was reported on.** **Your CI runs them on TicketResolve's branch, in the environment you choose: the runner, Docker Compose or a Kubernetes test namespace, with a temporary database and mocked third parties if you like, and always with fixtures.**

## 6. A pull request that separates facts from assumptions

The draft pull request has two sections that are easy to tell apart:

- **Tested facts**: the reproduction verdict and its steps, the code-map facts, the patch review, the dependency scan and the CI results.
- **Assumptions (not verified)**: the root-cause hypothesis, the confidence and the likely location.

**Your reviewers merge it through your own process. TicketResolve never merges.**

## 7. Verified against the original failure

When the deployment arrives, a green pipeline isn't the end. TicketResolve checks four things:

1. **The deployed commit actually contains the fix's merge commit.**
2. **The customer's reproduction passes when TicketResolve runs it again, with the same steps in their environment, while their access lasts.**
3. **The regression tests still pass.**
4. **The error signature has stopped.**

The verdict is one of five:

| Verdict | Meaning |
|---|---|
| Verified fixed | The original failure no longer happens and the error stopped |
| Partially fixed | Some steps or tests still fail some of the time |
| Not fixed | The original failure is still there |
| Regression detected | New errors or failing tests after the release |
| Inconclusive | Not enough evidence either way. A deployment alone is never "fixed" |

**When the verdict is final, the ticket and the engineering issue receive the findings: root cause, code location, pull request, deployed version and commit, the regression test and the evidence.** Support knows whether to tell the customer it's fixed, and engineering keeps a test that would catch the same failure next time.

## A worked example, start to finish

Here's the merchant's order-page ticket, as case **TRC-2041**. The details are illustrative.

**Day 1, 09:00, evidence.** Support opens a Connect session. The merchant approves: environment details, log lines, failed browser requests, and API checks against `/api/orders/*`. The agent reports **version 4.9.3**. Failed requests: `GET /api/orders/42 → 500`, `GET /api/orders/57 → 500`; both orders paid partly by gift card.

**09:30, reproduction.** **Reproduce with TicketResolve AI** turns them into steps and runs each five times in the merchant's environment: **5 of 5 failed** for both. **Verdict: reproduced.** Every attempt kept with status, timing and a response excerpt. No failing dependencies.

**10:00, code.** CI/CD says 4.9.3 is commit `a1c9e…`. TicketResolve indexes the repository **at that commit**. **Map evidence to code**: the stack frame is inside `getOrder` at line 3; the route `GET /api/orders/:id` is served by `orders.handler.ts`. Facts, each with its record. **Possible defect locations**: 1. `orderTotals()` in `totals.ts`: called by `getOrder`, touched by no recent change, and handles payment splits; 2. `giftCardBalance()`: evidence against, it's not in the stack trace.

**10:30, fix.** The fix assistant reads `totals.ts`, `orders.handler.ts` and two callers (four files), one AI call. Proposal: **hypothesis**: *`orderTotals()` assumes one payment method and indexes `payments[0].card` without checking type*. Changes in two files; expected behaviour; side effects (none expected); rollback (revert); **assumptions not checked**: *gift-card-only orders also affected*. The engineering lead, not the requester, **approves** it.

**11:00, tests.** TicketResolve writes two **Jest** tests (their framework) from the failing requests: each asserts 200 and that the 500 is gone, and checks the JSON still parses. They run against `TR_TEST_BASE_URL`, never the merchant's host. Their CI runs them on TicketResolve's branch in **Docker Compose** with a temporary database and fixtures: **fail on base, pass on fix**.

**11:30, pull request.** Draft PR: **Tested facts**: reproduction verdict and steps, code-map facts, patch review, dependency scan, CI results. **Assumptions (not verified)**: the hypothesis, confidence, likely location. A reviewer merges it through their process.

**Day 2, verification.** The 4.9.4 release deploys.

1. The deployed commit contains the fix's merge commit: **yes**.
2. TicketResolve re-runs the merchant's reproduction in their environment, while access lasts: **5 of 5 pass** for both orders.
3. Regression tests: **pass**.
4. The error signature: **stopped**.

**Verdict: verified fixed.** The ticket and the Jira issue get the findings: root cause, `totals.ts` location, PR, version 4.9.4 and commit, the tests and the evidence. Support tells the merchant it's fixed, with confidence.

## Five more real-world scenarios

### 1. A reproduction that doesn't fail

**Situation.** The failure can't be reproduced in the customer's environment.

**How TR handles it.** It's recorded as not reproduced, never as proof the customer is wrong.

### 2. A failing third party

**Situation.** The browser shows a payment gateway timing out.

**How TR handles it.** Failing third-party calls point away from your code and are reported separately.

### 3. A rejected fix

**Situation.** The approver rejects the fix with a reason.

**How TR handles it.** At most two regenerations.

### 4. The test points at production

**Situation.** Someone sets the test base URL to the customer's host.

**How TR handles it.** The tests refuse the host the failure was reported on.

### 5. Deployed, but nothing else

**Situation.** The release deployed, but access ended and the error data is thin.

**How TR handles it.** Inconclusive. A deployment alone is never "fixed".

## Before and after

**Before.** A paraphrased ticket, `main` instead of 4.9, a backport tested without the failing case, a green deploy, and "still failing for gift cards".

**After.** Authorized evidence with the version, a reproduction kept attempt by attempt, code at the deployed commit, a fix with its assumptions, tests made from the real failing requests, a pull request that separates facts from guesses, and "verified fixed" only after the reproduction passed again.

## How to tell it's working

- **Fewer "still broken" replies** after fixes.
- **Every fix has a regression test** from the customer's failure.
- **Pull requests show tested facts** apart from assumptions.

## Who it's for

- **Support engineers** handing over technical problems.
- **Developers** who want the right code and the real failure.
- **Engineering leads** who approve fixes.

## How it fits with the rest of TicketResolve

TR Autonomous Engineering is an **add-on** ($999 a month, or in the Engineering bundle). It uses **TicketResolve Connect** (Customer environment connect), **investigations**, your **CI/CD** and the **code index**, and its verdict feeds **Resolution Assurance**.

## Mistakes to avoid

- **Reading `main`** when the customer runs an older version.
- **Merging a fix** whose assumptions nobody checked.
- **Closing the ticket** on a green deploy.

## Do it in TicketResolve, step by step

**Where:** any investigation's **Engineering** tab, or Engineering intelligence → Customer issue → verified fix. **You'll need:** Autonomous engineering; Customer environment connect; CI/CD deployment events; a repository connected; a second person to approve fixes. **Full guide:** [TR Investigate: from a ticket to a verified fix](https://www.ticketresolve.ai/docs/guide/tr-investigate).

1. **Collect evidence with Connect.** The customer approves what may be collected; the agent reports their version.
2. **Reproduce with TicketResolve AI.** Read the verdict and every attempt.
3. **Map evidence to code** at the deployed commit. Read facts and ranked possible locations.
4. **Request a fix.** Read its hypothesis, changes, considerations and assumptions. Someone else approves.
5. **Generate regression tests** in your framework from the failing requests, and run them in your CI.
6. **Open the draft pull request.** Your reviewers merge it.
7. **Wait for verification**: deployed commit, reproduction re-run, tests, error signature.
8. **Read the verdict** and the findings on the ticket and the engineering issue.

**How to check it worked:** the case shows every stage with its records, and ends with one of the five verdicts.

To set it up, follow the [TR Autonomous Engineering guide](https://www.ticketresolve.ai/docs/integrations/autonomous-engineering).

## Frequently asked questions

**Does it read the code the customer runs?**
Yes. It matches their reported version to the deployed commit and indexes the repository there.

**Does reproduction use AI?**
No. The fix proposal makes one AI call; reproduction and tests don't.

**Is a failed reproduction proof the customer is wrong?**
No. It's recorded as not reproduced.

**Who approves a fix?**
Someone other than the person who asked.

**Which test frameworks are supported?**
Vitest, Jest, Mocha, node:test, pytest and go test.

**Does TicketResolve merge or deploy?**
No. Your reviewers merge; your pipeline deploys.

**When is a fix "verified fixed"?**
When the deployed commit contains the fix, the reproduction passes again, tests pass, and the error stopped.

**Is a deployment enough?**
No. A deployment alone is never "fixed".
