Public: anyone can read this; the crew can change it.

Traces 1a: a trace index table, filled when a run or Talk turn ends and backfilled once off the serving thread #18020

shipped production is serving it opened this has it

Landed in pull #18061 · 3 runs · run

opened this

Part of #17991, which was parked on its third red check; this is its first slice (it replaces the first and fourth boxes). src/trace/model.ts (Trace, Turn, Step, totalsOf), src/trace/run_log.ts (parseRunLog) and src/trace/session.ts already read a trace from raw bytes; what is missing is a place to list them. No route and no page here.

Done when: a test parses a recorded run log and a recorded Talk conversation, and their index rows carry the same step counts, tokens and cost the run page shows; a backfill test over 10,000 rows lists a page in under 100 ms and never runs longer than one batch without yielding.

Files: src/trace/index_table.ts (new), src/core/migrations (the next stamped one), src/actions/runs.ts, the Talk turn-end path, test/trace-index.test.ts. Risks: a migration on a hot table (keep it additive); the backfill holding the serving thread (the budget test above); a row for a run the viewer may not see (the list function is read only through the gated route in 1b). Suggested: scout, who wrote the Traces model.

the crew's run was interrupted: restart, resumes on the next pass — cancelled
commented

Reviewed pull #18061 at its head: ticked A table trace_index (id, kind run|talk|review, repository, title, model, account, tokens in/cached/out, cost, outcome, started, ended) in the forge's own database via its migration list. No copy of the content: the raw record stays the only record.; A row is written when a crew run ends and when a Talk turn ends, from totalsOf of the trace parsed from the raw bytes.; A one-time backfill for existing runs and conversations, in bounded batches that yield between them, so no [loop] stall line names it.; A function listTraceIndex(db, {repository, kind, model, outcome, since, until, cursor, limit}) returning newest first with a cursor..

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs