Run 202's findings: the estimate after a revision, joined additions, one README, the watchdog's redo (#559) #560

Merged
cmoriarty merged 3 commits from claude/run202-batch into main 2026-11-19 16:35:45 -05:00
Owner

Fixes run 202's findings (braid#557), batched as braid#559 and decided with the owner on 2026-11-19. The change is openspec/changes/run202-batch.

What changes

  • The estimate follows each revision. The four steps that commit a revision of the proposal write .osf/budget.json again before they commit. The apply fan-out and its dependency gate then read the plan as revised. In run 202 the revise moved group 4 behind group 1 and nothing saw it.
  • A merge joins two additions at one point. When the run's side and the group's both only added lines at one point, Braid joins them: the run's lines, then the group's, with no session asked. It never joins a file both sides created, a lock file, a binary, or JSON that would not parse. In run 202 such conflicts cost Nine 10 min and a compaction, and Orbit 2.6 min.
  • One README side by side. Only the plan's first group is asked to write it.
  • The watchdog's window follows the call. A step waiting on its own shell command is spared until the command's own limit (OSF_SHELL_HARD_S, or the call's longer timeout) and a minute, not a fixed 20 minutes. The redo's reason names the call and how long it ran.
  • A stalled step that has ticked a task keeps its work. redo_step(mode="keep") supersedes the attempt without a rollback, and the next attempt continues from Braid's note. In run 202 the rollback threw away 72 minutes of Pairs.
  • The shell wrapper stops a command that has printed more than 20 MB. A print loop never goes quiet.
  • The wrapper reaps the shell while its group is stopped. On Linux an exited shell stays in its group as a zombie, so every stop by the wrapper waited about 4 s for a command already gone: 4.45 s against 0.14 s in a Linux container. CI's 3 s limit for the new cap test found it; macOS never showed it.
  • The note for groups side by side asks for a suite's command only when the group's work adds one.

Evidence

  • ./tools/test.sh: green in 50 s (900 backend, 204 UI unit, 61 browser).
  • New tests, each failing without its fix:
    • the joins (run 202's two shapes, and four cases that must stay conflicts);
    • the README side by side;
    • the watchdog's window, and what counts as ticked work;
    • a kept redo continuing in place;
    • the wrapper's cap.
  • sim/revision-moves-a-dependency: fails with the estimate taken out of the operator's revision commit (group 2 starts beside group 1, and its edit misses) and passes with it.
  • sim/parallel-additions-joined: fails with the join disabled (a conflict, and group 3 never merges) and passes with it.
  • ./tools/sim.sh --smoke, plus parallel-conflict, parallel-groups and thorough-request-changes: all pass. parallel-conflict edits one line on both sides, so it is still a conflict.

On purpose

  • The side-by-side note test's expected phrase changes with the note.
  • The revision commits' built-in commands change, so runs admitted before this build load today's built-in pipeline. No recorded fixture pinned them.

🤖 Generated with Claude Code

Fixes run 202's findings (braid#557), batched as braid#559 and decided with the owner on 2026-11-19. The change is `openspec/changes/run202-batch`. ## What changes - **The estimate follows each revision.** The four steps that commit a revision of the proposal write `.osf/budget.json` again before they commit. The apply fan-out and its dependency gate then read the plan as revised. In run 202 the revise moved group 4 behind group 1 and nothing saw it. - **A merge joins two additions at one point.** When the run's side and the group's both only added lines at one point, Braid joins them: the run's lines, then the group's, with no session asked. It never joins a file both sides created, a lock file, a binary, or JSON that would not parse. In run 202 such conflicts cost Nine 10 min and a compaction, and Orbit 2.6 min. - **One README side by side.** Only the plan's first group is asked to write it. - **The watchdog's window follows the call.** A step waiting on its own shell command is spared until the command's own limit (`OSF_SHELL_HARD_S`, or the call's longer timeout) and a minute, not a fixed 20 minutes. The redo's reason names the call and how long it ran. - **A stalled step that has ticked a task keeps its work.** `redo_step(mode="keep")` supersedes the attempt without a rollback, and the next attempt continues from Braid's note. In run 202 the rollback threw away 72 minutes of Pairs. - **The shell wrapper stops a command that has printed more than 20 MB.** A print loop never goes quiet. - **The wrapper reaps the shell while its group is stopped.** On Linux an exited shell stays in its group as a zombie, so every stop by the wrapper waited about 4 s for a command already gone: 4.45 s against 0.14 s in a Linux container. CI's 3 s limit for the new cap test found it; macOS never showed it. - **The note for groups side by side** asks for a suite's command only when the group's work adds one. ## Evidence - `./tools/test.sh`: green in 50 s (900 backend, 204 UI unit, 61 browser). - New tests, each failing without its fix: - the joins (run 202's two shapes, and four cases that must stay conflicts); - the README side by side; - the watchdog's window, and what counts as ticked work; - a kept redo continuing in place; - the wrapper's cap. - `sim/revision-moves-a-dependency`: fails with the estimate taken out of the operator's revision commit (group 2 starts beside group 1, and its edit misses) and passes with it. - `sim/parallel-additions-joined`: fails with the join disabled (a conflict, and group 3 never merges) and passes with it. - `./tools/sim.sh --smoke`, plus `parallel-conflict`, `parallel-groups` and `thorough-request-changes`: all pass. `parallel-conflict` edits one line on both sides, so it is still a conflict. ## On purpose - The side-by-side note test's expected phrase changes with the note. - The revision commits' built-in commands change, so runs admitted before this build load today's built-in pipeline. No recorded fixture pinned them. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The estimate follows each revision, a merge joins two additions at one
point, one README side by side, the watchdog's window follows the call,
a stalled step keeps ticked work, and the wrapper stops a flood.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The steps that commit a revision of the proposal write .osf/budget.json
  again first, so the apply fan-out and its dependency gate read the plan
  as revised. Run 202's revise moved group 4 behind group 1, and nothing
  saw it. sim/revision-moves-a-dependency fails without this and passes
  with it.
- A group's merge joins a conflict where both sides only added lines at
  one point: the run's lines, then the group's. Never a file both sides
  created, a lock file, a binary, or JSON that would not parse. On run
  202's four real conflicts, the join gives what the agents wrote (three
  byte for byte, one with its two CSS blocks the other way round).
  sim/parallel-additions-joined fails without it and passes with it.
- When groups run side by side, only the plan's first group is asked to
  write the README.
- The stall watchdog spares a step waiting on its own shell command until
  the command's own limit (OSF_SHELL_HARD_S, or the call's longer
  timeout) and a minute, not a fixed 20 minutes. Its redo's reason names
  the call. A stalled step that has ticked a task keeps its worktree and
  continues from Braid's note (redo_step mode "keep").
- The shell wrapper stops a command that has printed more than 20 MB.
- The note for groups side by side asks for a suite's command only when
  the group's work adds one. Its test's expected phrase changes on
  purpose.

No recorded pipeline fixture pins the revision commits' commands, so none
needed re-recording.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(agent): the shell wrapper reaps the shell while its group is stopped (#559)
All checks were successful
test / suite (pull_request) Successful in 1m23s
1ceae216dd
On Linux an exited shell stays in its process group as a zombie until it
is reaped, and a signal to the group still finds it, so every stop by
the wrapper waited out its 3 s grace and the kill's second. In a Linux
container, stopping a flood took 4.45 s before this and 0.14 s after.
CI's 3 s limit for medium tests caught it on the new test of the output
cap, which passed on macOS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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!560
No description provided.