Skip to content

uw.Transcript: one query object over a run's record, and the decisions it lacked - #792

Open
lmoresi wants to merge 1 commit into
feature/describe-renderfrom
feature/transcript-query
Open

lmoresi wants to merge 1 commit into
feature/describe-renderfrom
feature/transcript-query

Conversation

@lmoresi

@lmoresi lmoresi commented Sep 26, 2026

Copy link
Copy Markdown
Member

uw.Transcript(source) reads a transcript file, a live model or read_transcript's list and answers the questions a debugging session asks: abandoned() with what stopped each step, backtracks() with the reason and detail the caller gave, failed() and capped() by the same rule the figure uses, patterns() collapsing the run to its distinct step patterns, part(name, at_step=i) for what a part was solving at a step, compare(a, b) for what changed between two steps, attempts(i) after a rewind. Every answer is the record's own data; describe() gives the run in the shape every other object uses (#790), and the renderers take the query object as a source.

The record gains what those questions needed: abandoned_by on a step stopped by an exception; model.rewind(steps, reason=..., **detail) writing the decision into the note; and the solver's run-time constants on the part record, clock excluded, with the part recorded again when they change. Before this, a parameter changed between solves left the part record quoting the old value, since nothing was rebuilt.

Found on the way: after a rewind the run numbers its steps again from the target, so an index can name several attempts (the design note says never reused; the implementation disagrees, and the query object works by position); the mesh view tested uw.is_notebook as a flag when it is a function, so every serial run tried to plot.

Stacked on #790 (feature/describe-render), which is stacked on #716.

Tests: test_0018_transcript_query.py; quick tier-A suite 1389 passed. Docs: docs/developer/subsystems/transcript-query.md.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Na7qBenCp67rDTZhFGTh5V

…s it lacked

The transcript said what a run did; asking it anything meant walking the
JSON by hand, and the digest, a notebook and a test each did that their
own way. uw.Transcript reads a file, a live model or read_transcript's
list and answers the questions a debugging session asks: the steps that
were abandoned and by what, the rewinds and why, the solves that failed or
ran capped, the run collapsed to its distinct step patterns, what a part
was solving at a given step, and what changed between two steps. Every
answer is the record's own data, with the outcome of a solve read by the
rule the figure and the table use, and describe() gives the run in the
same shape as every other object. The renderers take the query object as
a source.

The record gains what the questions needed. A step stopped by an
exception carries abandoned_by, the exception's class and message. A
rewind takes a reason and detail from the caller, since the acceptance
test lives in the caller's loop and the transcript cannot infer it. A
part record carries the solver's run-time constants, the clock excluded,
and is written again when they change: before this a parameter changed
between solves left the record quoting the old value, since nothing was
rebuilt.

Two things found on the way. After a rewind the run numbers its steps
again from where it went back to, so an index can name several attempts;
the query object keys its patterns by position and exposes the attempts.
And the mesh view tested uw.is_notebook as a flag when it is a function,
so every serial run tried to plot.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Na7qBenCp67rDTZhFGTh5V

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant