Skip to content

flow: pipeline an API save's read-back; keep self-repair probes on the GUI - #1362

Merged
abrichr merged 4 commits into
mainfrom
flow/api-step-readback-repair
Oct 19, 2026
Merged

abrichr merged 4 commits into
mainfrom
flow/api-step-readback-repair

Conversation

@abrichr

@abrichr abrichr commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Stacked on #1361 (which is stacked on #1358 and #1355). Merge those first.

Fourth of the small PRs that put the API step, pipelined read-back and self-repair in one production profile. This one handles pipelined read-back and self-repair.

What changes

  • Pipelined read-back of an API save. --readback-window deferred only a GUI save's record check; an API save always verified inline and the worker report didn't say so. The API save is now deferred the same way: same check, later timing, and the item's report stays unsuccessful until it settles.

  • Durable runs stay inline, with the reason. Deferring a durable save would mean committing its checkpoint and the run's terminal state from the side thread after the next item has taken the browser, which the durable runtime doesn't support. The worker's item detail already records inline (durable runs verify inline); THROUGHPUT.md now explains why. Workers still run in parallel under Standard and Regulated.

  • Self-repair runs a repaired bundle on the GUI. Its probes and its resumed (canary) run of a repaired bundle turn API steps off, and the report says why (REPAIR_GUI_ONLY). The repair, the fault probes and the person's approval are all about the GUI step, so an admitted API step in its place would save without exercising the repair. The ordinary first run can still use the API step. This applies to both the Python ReplayTarget and the CLI target.

  • Self-repair's existing refusals (signed qualification admission, managed dispatch, qualification case, --pin-digest) are unchanged. Each admits only the exact original bundle, and a repaired bundle has a new digest; SELF_REPAIR.md now says so.

  • Standard changes too. A standard change runs the repaired bundle once on the test record before it applies. That run now passes gui_only (new on SelfRepairTarget.execute), so it exercises the repaired GUI step rather than an API step in its place. The pre-flight of the bundle the items will run still matches what they run.

Tests

tests/test_api_step_readback_repair.py (new, 5 tests): an API save's read-back runs on the side thread and settles the saved report; a durable API save verifies inline and says why; keep_gui_for_repair gives the stated reason; a ReplayTarget probe never sends the API step; a standard change's test-record run is GUI-only while the items' pre-flight may use the API step.

Locally: 150 passed across the read-back pipeline, worklist pool, self-repair (Python and CLI), repair lifecycle and API tier suites. ruff and strict mypy on the replayer pass.

Synthetic data only.

🤖 Generated with Claude Code

abrichr and others added 3 commits October 19, 2026 12:52
…e GUI

Pipelined read-back deferred only a GUI save's record check; an API save
always verified inline and said nothing. It is now deferred the same way
(same check, later timing, the report unsuccessful until it settles).
Durable and ledger runs still verify inline and record why; the doc says
why durable can't defer (its checkpoint and terminal state would be
committed from the side thread after the next item took the browser).

Self-repair's probes and its resumed run of a repaired bundle now run the
GUI steps only, with the reason on the report. The repair, the fault
probes and the person's approval are about the GUI step, so an admitted
API step there would save without exercising the repair and the canary
would prove nothing. The ordinary first run can still use the API step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the GUI

run_preflight called the target without a gate, so a repaired bundle's
test-record run could save through an admitted API step and pass without
exercising the repair. SelfRepairTarget.execute takes gui_only, and the
standard-change path passes it. The pre-flight of the bundle the items
will run still matches what they run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Base automatically changed from flow/api-step-governed to main October 19, 2026 22:27
@abrichr
abrichr merged commit 96566cd into main Oct 19, 2026
35 checks passed
@abrichr
abrichr deleted the flow/api-step-readback-repair branch October 19, 2026 22:36
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