# One State for Every Technical Case: How TicketResolve Tracks a Bug From Ticket to Verified Fix

> A technical case passes through many engines: investigation, root cause, customer diagnostics, reproduction, code, fix, tests and verification. Each kept its own status. TicketResolve now derives one state for the whole case from those records, keeps its history, and never calls a case resolved without a verified outcome.

Source: https://www.ticketresolve.ai/blog/one-state-for-every-technical-case · Published 2026-11-25 · TicketResolve AI

**When a customer reports a real bug, the ticket is only the start. Someone has to collect evidence, rank the possible causes, confirm one, reproduce the failure, find the code, write and review a fix, test it, ship it and check that it worked. In TicketResolve each of those steps already has an engine. Until this release, each engine also had its own idea of where the case stood.**

This post explains what changed in release 7.141.0: one state for the whole case, derived from what the engines recorded, with a history you can read back. It also covers four new fields on every piece of evidence, and an access check we fixed along the way.

## The problem: four answers to "where is this case?"

Take an illustrative case. A customer writes in: checkout fails with `KeyError: STRIPE_KEY`. TR-AI recognises it's a product defect, not a how-to question, and hands it to a person with an investigation already open.

From there, the case lives in several places:

- the **investigation** has a status such as open, findings ready, escalated or verified;
- the **root-cause engine** has its own session state: investigating, awaiting approval, needs information, strongly supported, confirmed;
- the **engineering lifecycle** shows a stage such as with engineering, code review, testing, awaiting deployment or verifying;
- the **Autonomous Engineering case view** shows eleven stages, from the ticket through Connect, reproduction, code, fix, tests, pull request, deployment and verification.

None of them is wrong; each answers its own question. But ask "where is TRC-5346 right now, and who is it waiting on?" and you'd get a different answer depending on which page you opened. Nothing recorded *when* the case moved from one stage to the next, either. A case that sat for three days waiting on the customer looked the same as one that moved through in an hour.

We looked at building a new central state machine that every engine would update. We decided against it. A new store that engines must keep in step is a new way for things to drift apart, and every engine would need changing to write to it. The records the engines already keep are the truth. So the state should be *read* from them, not written next to them.

## One vocabulary, derived from the records

A case now has one of nineteen states:

| Stage | States |
|---|---|
| Starting | Created, Classified, Gathering context |
| Investigating | Investigating, Waiting for evidence, Possible causes formed, Root cause confirmed |
| Fixing | Reproducing, Fix proposed, Waiting for approval, Testing, In code review |
| Shipping | Waiting for deployment, Verifying, Resolved (verified) |
| Exceptions | Needs recovery, Escalated to a person, Failed, Closed without a verified fix |

The state is worked out from the engines' records, most advanced record first. A final deployment verification beats a merged pull request. A merged pull request beats an open one. An open one beats a proposed fix, and so on back to the evidence. Each state comes with a plain reason and the record it came from. In our example, the case page says:

> **Possible causes formed.** Possible causes are ranked; none is confirmed. Waiting on your team. [root_cause:suspected]

The bracket names the record. If you disagree with the state, you know which record to look at, and the fix is in that record, not in the state.

### Who it's waiting on

Every state also says who has the next move: TicketResolve, your team, the customer, or engineering. "Waiting for evidence" waits on the customer. "In code review" waits on engineering. "Possible causes formed" waits on your team, because a person confirms a root cause, never the engine on its own. This is the line that answers "why hasn't this moved?"

## Resolved means verified

One rule matters more than the others. **A case is resolved only when the outcome is verified.** That means either a final deployment verification says the fix worked, or the investigation was marked verified.

A merged pull request isn't resolved; it's waiting for a deployment that carries it. A deployment isn't resolved either; it's verifying. A verification that comes back "not fixed" or "inconclusive" moves the case to *needs recovery*, not to resolved. This matches a rule TicketResolve already applied elsewhere: it never marks a case fixed because a build or deployment succeeded.

## The history, and moves that skip steps

Every time the derived state changes, TicketResolve records the move: from which state, to which, why, and from which record. A background pass runs every ten minutes over cases that changed in the last month. Opening a case also checks it.

Two things make this safe to run repeatedly:

- **A move is recorded only when the state actually changes.** Re-checking an unchanged case writes nothing.
- **Each move has a sequence number that's unique per case.** If two workers check the same case at the same moment, only one move is written. We test this by running two checks side by side and counting the rows.

Real cases don't always move in order. Someone might close an investigation as verified straight from "Gathering context", because they fixed it by hand. The history keeps that move, because the records say it happened, and marks it **outside the usual order**. An invalid jump is something to see, not something to hide or silently correct. Later releases will use those flags as one of the signals that a case needs recovery.

The case page also shows the time spent in each state, so a case that sat waiting for a customer for three days is visible as exactly that.

## Evidence: integrity, access class and retention

The evidence ledger already recorded, for every piece of evidence, its source, how it was collected, when it was observed, its environment, its reliability and how long it stays current. It also recorded which possible causes it supports or contradicts. Four fields are new:

- **Content hash.** A SHA-256 hash of what was recorded, taken when the ledger writes it.
- **Integrity.** "Check evidence integrity" recomputes each hash. A row is *intact* when it matches and *changed* when something edited it outside the ledger. Evidence recorded before this release has no hash, and is reported as exactly that, never as intact.
- **Access class.** *Restricted* for evidence that can expose the customer's systems: logs, traces, configuration, code, environment details, API runs and diagnostics. *Customer* for what a customer or person wrote. *Internal* for the rest: deployments, incidents, metrics, errors and known issues.
- **Retention.** Evidence follows its investigation's retention by default. An item can carry a shorter retention of its own, and the background pass deletes it when that date passes.

Evidence written before this release gets its access class from its kind the next time the case is opened or the background pass runs. The case page shows the totals: how many items in each class, how many are intact, changed or without a hash, and how many are untrusted. Untrusted evidence, such as text from a ticket or a log, is still never followed as an instruction.

## A fix we found along the way

While writing the end-to-end test for this release, we checked that a member of one workspace can't read another workspace's case. They could: the case page's data came back.

The cause was in our API access guard. Every API route is checked against a policy table, and routes not in the table are treated as workspace routes. But for a route not in the table, the guard never read the workspace number from the address. It fell back to "the signed-in user's own workspace", while the handler used the number from the address. So a signed-in user could read, and in some cases act on, another workspace's data through those routes, if they knew its number and record ids.

That applied to 34 routes across Unified Intelligence, Experience Intelligence, incident and prediction views, interventions, the case view and the code map. Routes listed in the policy table, which is almost all of them, were not affected.

The fix makes the guard read the workspace from the address for every route, listed or not, so the membership check always applies. A new test goes through every registered workspace route and confirms that a member of a different workspace is refused. We confirmed the test fails without the fix. Production holds test data only at the moment.

## What's next

This release is the first of seven. The next ones build on the shared state rather than beside it:

- **A recorded plan per case.** Which engines a case needs (Connect, reproduction, code, a fix) and why, so the smallest effective set runs instead of everything.
- **Shared recovery.** One way to classify failures across engines, a retry budget per case, a memory of failed operations so they aren't repeated, and escalation to a person when recovery isn't safe.
- **Fix candidates.** Several candidates from the same single AI call, compared on the existing checks, so the cost per case doesn't change.
- **End-to-end tests for whole cases**, from a missing-variable error to an interrupted run that resumes without opening a second pull request.

Each of these is planned, not shipped. They'll be labelled as shipped in the changelog when they pass their tests.

## In short

- A technical case has one state across every engine, worked out from the engines' own records, with a reason and the record it came from.
- Every move is recorded once, with moves outside the usual order kept and marked.
- Resolved means verified. A merge or a deployment alone never resolves a case.
- Evidence carries a content hash, an integrity check, an access class and an optional shorter retention.
- An access check that let members of one workspace reach 34 routes of another is fixed and covered by a test over every workspace route.
