Repository navigation
Repair one room candidate with one provider call (#173 PR 1) - #288
Merged
Merged
Conversation
`room repair CAND --prompt ... --preview` shows what would run and prints a token; `--confirm TOKEN` runs it only if a plan rebuilt at that moment is identical. Only the member that produced the candidate runs, from that candidate, and the result is a new candidate, verified again, that the user compares and selects. Peers, their candidates and the source stay as they were. The claim's transaction re-derives the revision, the parent rules and the stored session, so a change after confirmation refuses before a round exists. A task that would only overflow once rendered is refused at the preview, where it cannot freeze the room. Repair rounds write provenance v3; all-member rounds keep writing v2. `round_expected_members` narrows conversation records and `_missing_members` to the target of a believed repair, so a damaged record keeps today's warnings. This departs from the approved design in three places, because #273 merged after it. A retained worktree now holds its candidate, so the checkout is rebuilt only when it differs, which keeps ignored files in the common case. No hook flags (#269 owns hooks). `rebuild_worktree` already existed. Measured with real Claude, Codex and Kimi Code: resume survives a forced rebuild, and an unknown session fails rather than starting a new conversation. Refs #173 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The round dialog prefilled the latest round's prompt. After a repair that is an instruction written for one member about its own candidate, and accepting the default sent it to every member. Offer the last all-member round's prompt, and say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # docs/architecture/persisted-contracts.md
# Conflicts: # docs/architecture/persisted-contracts.md
# Conflicts: # docs/architecture/persisted-contracts.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First delivery of #173:
syncmill room repairruns only the member that produced a candidate, from that candidate. The result is a new candidate, verified again, that you compare and select yourself. Other members, their candidates and the source stay as they were.Refs #173. This is PR 1 of the design in
docs/room-targeted-repair-plan.md. Still to come: feedback requests (PR 2),room diff --against(PR 3), the TUI and--detach(PR 4).How it holds together
--cold, task, lessons and gate.--confirmrebuilds the plan and runs only on an equal token.start_round(repair_guard=)re-derives the revision, the parent rules and the stored session in the transaction that inserts the round, so nothing starts.round_expected_membersnarrows conversation records and_missing_membersto the target of a believed repair, so a damaged record keeps today's warnings.--coldclears the target's session alone. A provider that cannot resume produces a failed candidate, and the parent stays repairable.Departures from the approved design
The design was approved before #273 merged, and #273 moved its premise. All three are recorded in the design doc.
.venv. A failed attempt's leftovers still trigger a rebuild. The always-rebuild option is a one-line change if you prefer it.core.hooksPathflags. fix(gates): keep what a gate writes out of the candidate (#268) #273 dropped them on purpose, and capture_changes runs repository-local hooks from the control repository #269 owns hooks.rebuild_worktree).Measured with real providers
Claude Code 2.1.319, Codex CLI 0.167.0 and Kimi Code 2.5.2, in one-member rooms with a gate, on macOS, 8 provider launches. Round 1's prompt holds a random codeword, and a file is left in the checkout to force a rebuild.
workspace.rebuiltresumeresumeresumefailedcandidate in 2.5 s with no fallback to a new conversation. The room stayedawaiting_decision, and--cold --previewworked.These ran before the TUI commit, which does not touch the repair path, and before the merge with main. Linux was not run.
Test plan
suite-runon the merge with main:CLEAN (exit 0)tests/test_room_repair.pyfail. The TUI fix was checked the same way against its own testapply --verify, judgeReview
Codex, with each finding checked against the source:
--coldmissing from the token, and a smoke that would not have forced a rebuild. Two were already avoided by the code and are now pinned by tests.All of these reviewed the branch before its merge with main. That merge brought tests and fixtures, and one conflict in
docs/architecture/persisted-contracts.md.🤖 Generated with Claude Code