Repository navigation
Write review feedback on a room candidate and repair from it (#173 PR 2) - #292
Merged
Merged
Conversation
`room feedback add CAND --kind change|question [--file PATH]` records a request on one completed candidate, optionally tied to a file it changed. `room repair CAND` now sends that candidate's open requests by default (`--feedback ID` narrows them), and `--prompt` becomes optional. `feedback resolve` records, by a human only, whether a later candidate of the same member met a request, and `feedback carry` writes it again on that later candidate. Records are append-only rows in a new `room_feedback` table, and status is derived on every read, never stored: open, sent, addressed, not_addressed, withdrawn or unknown. A request reads `sent` only once a repair of its own candidate completed, so a failed repair sends it again. The repair plan binds each request's record digest and status, and the claim re-derives them, so a resolve between confirm and claim refuses before a provider starts. Feedback text reaches only the repaired member's prompt. `rounds.prompt` holds the free text or a fixed line, so it stays out of what apply shares to memory, and room events carry ids only. Status hangs on how rows point at each other, and those links live in columns. So the room's rows are checked as a set first: canonical unique ids, sequences exactly 1..N, each resolution naming an earlier request on its own candidate in column and body, no other room's row naming one. Any failure makes every request in the room unknown and stops the writers, the repair batch and the claim. A damaged body on an intact set stays the concern of its own request. Deleting the newest row leaves no gap and is not seen, as with judgments. Refs #173 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Second delivery of #173: review feedback on one Room candidate, and repairs that send it. You write change requests and questions on a candidate, optionally tied to a file it changed.
room repairthen sends that candidate's open requests to the member that produced it, and you record yourself whether the result met them.Refs #173. This is PR 2 of
docs/room-targeted-repair-plan.md. Still to come:room diff --againstand compare fields (PR 3), the TUI and--detach(PR 4).How it holds together
room_feedbacktable holds requests and resolutions.feedback_statusderivesopen,sent,addressed,not_addressed,withdrawnorunknownon every read; nothing is stored. A damaged latest resolution readsunknown, never an older status.sentneeds a completed repair of the request's own candidate. A request named only by failed repairs staysopen, so the next repair sends it again. After a completed repair the parent is no longer its member's newest completed candidate, sofeedback carrywrites the request again on the new candidate.addressedandnot-addressedname a later completed candidate of the same member, and its digest is recorded. Nothing reads an agent's output for a claim.start_round's transaction re-derives them, so a resolve or withdraw between confirm and claim refuses before a provider starts.rounds.promptstores the free text or the fixed lineRepair candidate CAND, so apply shares no feedback to memory. The memory search uses the room's prompt, and room events carry ids only. Without requests, the repair task is byte-identical to PR 1's.awaiting_decisionandselected.prune_roomsdeletes the rows before candidates.The record set is checked as a whole
Status depends on how rows point at each other, and those links live in columns. Validating each row on its own leaked in three review rounds, each through another column combination. So before any request is read,
feedback_inventory_problemchecks the room's rows as a set:If any check fails, every request in the room reads
unknown. Writing feedback, the repair batch and the claim are all refused. A damaged body on an intact set stays the concern of its own request, as the design says. A repair round whose provenance cannot be believed makes every request its raw record mentionsunknown.Known limit: deleting the newest row leaves no gap and is not detected, the same limit judgments have. It is noted in the code and in both user guides.
Decisions the design left open
Each was put to the design review:
completedcandidates. A gate failure is fine.carrytargets a later completed candidate of the same member.files_changedwhen it is written. Readers check its shape only.sentalso requires the repair round's parent to be the request's candidate. A round naming a request on another candidate makes that requestunknown.Test plan
suite-run:CLEAN (exit 0), andruff check .sentattribution, repair-round attribution, prune order, the stored prompt, the CLI's text suppression and NULL-id keying, carry's untrusted copy, and repository ownershipReview
Codex, with each finding checked against the source:
unknownentry, the ownership check on a withdrawal, preview counts.Found and left out of scope: a candidate row whose
round_idpoints at another room's round is read unchecked (_list_candidatesjoins rounds without a room check). That is existing candidate-reading code, to be filed separately.🤖 Generated with Claude Code