Skip to main content

Trace a Brain conversation turn

Status: Ready

Article ID: 030

Truth label: Current

Audience: Agency operator

Reader outcome: Use conversation and turn identities to inspect the recorded provider, generation settings, retrieval provenance, usage, outcome hashes, and local artifact references for one completed response.

Related articles: 008, 017, 022

Target week: 12

Last verified: 2026-09-13

Technical reviewer: Codex source audit

Editorial reviewer: Codex editorial audit

Keep conversation and turn ids separate​

A conversation id groups related exchanges. A turn id identifies one completed chat exchange. Brain accepts a valid UUID conversation id or creates one, then creates a new turn UUID for each request.

Use the turn id when diagnosing one response. Use the conversation id when listing the lineage of several turns. Neither id should be replaced with a UI row number or a hash guessed by the client.

Read the indexed trace​

GET /chat/turns/{turn_id}/trace returns the indexed record for one completed turn. The current record includes:

  • lifecycle status and timestamps
  • provider and model
  • prompt hash and prompt-manifest counts
  • reasoning lens, voice register, and generation settings
  • retrieval records and their provenance metadata
  • reported usage
  • response size and hash
  • output-lint and revision summaries
  • references to local raw artifacts

These fields let an operator answer what configuration and source set were recorded without treating the final prose as its own proof. GET /chat/turns/{turn_id}/inspection adds the retained prompt itself, the per-round context budget allocation, and the polish evidence; Cortex shows the same record as Inspect writing turn.

Follow retrieval provenance​

The retrieval manifest records items Brain selected while assembling context, including collection, rank, source label, score, and identifying metadata when available. Follow a disputed claim back to the current source record and check its status, scope, date, and original text.

Selection proves that the record entered the assembled context. It does not prove that the provider used it, interpreted it correctly, or caused a specific phrase.

Separate the index from raw artifacts​

The trace index stores hashes, manifests, usage, outcome summaries, and artifact references. Brain also writes the assembled request and response into the local raw trace directory. If output revision changed the provider's raw response, separate raw and candidate artifacts can also exist.

Raw artifacts contain prompt and response content. Keep them under private data-root permissions. Do not ingest that directory into knowledge or attach it to public support material.

Run one audit​

For a synthetic chat turn:

  1. save the returned conversation and turn ids
  2. fetch the turn trace
  3. compare provider, model, lens, register, and generation settings with the response report
  4. inspect each retrieval record's source and rank
  5. compare the response hash with the recorded final response when authorized
  6. list turns for the conversation and confirm the target turn is present

Record any missing usage as unavailable, not zero, unless the provider explicitly reported zero.

Current limits​

A trace records what the application observed. It does not expose hidden provider reasoning, prove factual correctness, or measure causal influence. Trace and raw-artifact access remains sensitive within the trusted operator boundary. A failed or interrupted stream may not produce a completed turn record.

Next lesson​

Continue with the Forge control-plane series.

Derivative map​

  • Weekly package: WEEK-12
  • Long video: VIDEO-W12-LONG
  • Shorts: SHORT-W12-PROBLEM, SHORT-W12-MECHANISM, SHORT-W12-WARNING
  • Email: EMAIL-W12
  • LinkedIn: LI-W12-A, LI-W12-B
  • X: X-W12-A, X-W12-B
  • Visual: VISUAL-W12

Review record​

  • Conversation ids, turn ids, trace fields, retrieval manifest, and artifact behavior checked against current source.
  • Raw-content, failed-turn, causality, usage, and access limits reviewed.
  • Audit exercise uses a synthetic turn and does not expose raw artifacts.
  • Internal links and repository voice reviewed.

Review completed: 2026-08-27

Re-audited against the running product: 2026-09-13