fix(ui): after a budget respawn the step pane reads the live session and names the session in use (#57) #61

Merged
cmoriarty merged 1 commit from fix/step-pane-respawn-57 into main 2026-09-26 19:12:13 -04:00
Owner

Fixes #57.

After a budget respawn, the step pane went on describing the attempt as it was before the hand-off. On production run run_01M3FS9FFXEHTY5WTHX36V4Z5Y, fix.implement peaked at 196k and respawned onto a fresh session carrying 28k. The graph row read 28k. The step pane read "Attempt 1 · context 196k of 252k" in alarm colour and named the retired session 5pj0YKlr.

What changes

  • Context card: while a step is running, the bar and the context field read the same live digest frame as the graph row, so the two cannot disagree. The attempt's high-water mark stays beside it as its own peak field (with an ⓘ). A finished attempt that respawned labels its figure peak rather than context.
  • Session chip: it names the session the attempt is using now, and an ⓘ says which session it started on.
  • API: GET /api/steps/{id} gains current_session_id on each attempt. It is the latest osf.budget.respawned to_session, read with the digest's own _RESPAWNED_TO_SQL, and null when the attempt never respawned. The change is additive, and attempt.session_id is unchanged because recovery asks about it.

OpenSpec change: openspec/changes/step-pane-follows-respawn/. It modifies two step-details requirements.

Verification

  • pytest tests/unit: 1741 passed and 1 failed. The failure is test_liveness.py::test_a_real_server_that_stops_answering_is_gone_even_with_no_pid_to_ask_about, in a file this PR does not touch, and it passes when run alone. It is a timing flake under full-suite load.
  • UI, after rebasing onto main: tsc -b, 397 vitest tests and vite build all pass.
  • Playwright against the fake osfd: 68 passed, including a new case in ui-polish.spec.ts (the meter matches the graph row, peak is shown, and the chip names the current session). The 2 follow-the-tail specs fail the same way on main: they need a real osfd with a streaming transcript.
  • Checked in the browser pane against the fixture: the graph row reads 38k, the card reads 38k of 144k, the fields show peak 113k, and the chip reads session 4e8a17f2.

🤖 Generated with Claude Code

Fixes #57. After a budget respawn, the step pane went on describing the attempt as it was before the hand-off. On production run `run_01M3FS9FFXEHTY5WTHX36V4Z5Y`, `fix.implement` peaked at 196k and respawned onto a fresh session carrying 28k. The graph row read 28k. The step pane read "Attempt 1 · context 196k of 252k" in alarm colour and named the retired session `5pj0YKlr`. ## What changes - **Context card:** while a step is running, the bar and the `context` field read the same live digest frame as the graph row, so the two cannot disagree. The attempt's high-water mark stays beside it as its own `peak` field (with an ⓘ). A finished attempt that respawned labels its figure `peak` rather than `context`. - **Session chip:** it names the session the attempt is using now, and an ⓘ says which session it started on. - **API:** `GET /api/steps/{id}` gains `current_session_id` on each attempt. It is the latest `osf.budget.respawned` `to_session`, read with the digest's own `_RESPAWNED_TO_SQL`, and `null` when the attempt never respawned. The change is additive, and `attempt.session_id` is unchanged because recovery asks about it. OpenSpec change: `openspec/changes/step-pane-follows-respawn/`. It modifies two `step-details` requirements. ## Verification - `pytest tests/unit`: 1741 passed and 1 failed. The failure is `test_liveness.py::test_a_real_server_that_stops_answering_is_gone_even_with_no_pid_to_ask_about`, in a file this PR does not touch, and it passes when run alone. It is a timing flake under full-suite load. - UI, after rebasing onto `main`: `tsc -b`, 397 vitest tests and `vite build` all pass. - Playwright against the fake osfd: 68 passed, including a new case in `ui-polish.spec.ts` (the meter matches the graph row, `peak` is shown, and the chip names the current session). The 2 `follow-the-tail` specs fail the same way on `main`: they need a real osfd with a streaming transcript. - Checked in the browser pane against the fixture: the graph row reads `38k`, the card reads `38k of 144k`, the fields show `peak 113k`, and the chip reads `session 4e8a17f2`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A respawned step's pane described the attempt as it was before the hand-off. On a production
run, fix.implement peaked at 196k and respawned onto a fresh session carrying 28k: the graph
row read 28k, while the step pane read "Attempt 1 · context 196k of 252k" in alarm colour and
named the retired session.

While a step runs, the context card now reads the same live digest frame as the graph row, so
the two cannot disagree. The attempt's high-water mark stays beside it as its own `peak`
field, and a finished respawned attempt labels its figure `peak` rather than `context`. The
step detail gains `current_session_id` on each attempt (the latest respawn's `to_session`,
the digest's own query), and the session chip names it, with the session it replaced behind
an info tip. `attempt.session_id` is unchanged: recovery asks about it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cmoriarty deleted branch fix/step-pane-respawn-57 2026-09-26 19:12:14 -04:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cmoriarty/braid!61
No description provided.