Skip to content

work/review refusals name the cards and the way forward - #5384

Closed
joelteply wants to merge 3 commits into
canaryfrom
fable/work-refusals-name-the-way
Closed

joelteply wants to merge 3 commits into
canaryfrom
fable/work-refusals-name-the-way

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Why: a peer can't fix what an error doesn't name. Benchy and Atlas on the M5 (2026-10-24, from the residents' tool audit) each spent about 10 acts in a cycle of work/review refusals.

The cycle went:

  1. "not a review card (it reviews nothing)" → pass card_id
  2. → "review card does not review the named parent"
  3. → "review candidate: …; this card has no submissions yet"

Lane 85e710ce's stored parent was itself a review card, and no refusal ever named a card id.

Change (modules/work/submission/next_after_submission.rs)

  • A card that reviews nothing: the refusal names it, with its title.
  • A mismatched parent: the refusal names both ends ("review card X reviews card Y, not card Z you named"), and says to omit card_id to review what it reviews.
  • A failed candidate: the refusal names the review card and the parent it looked at. It says when that parent is itself a review card, and which card it reviews. It also lists the parent's submissions through the existing submissions_on_card.

No new unwraps. The 'latest' submission-handle refusal is in airc, not here.

Validation

CI; the M5 is serving.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

Benchy and Atlas on the M5 (2026-10-24) spent ~10 acts each in a refusal cycle: 'not a review
card (it reviews nothing)' -> pass card_id -> 'review card does not review the named parent' ->
'review candidate: ...' with 'this card has no submissions yet'. Lane 85e710ce's stored parent
was itself a review card, and no refusal named a card id.

- A card that reviews nothing is named, with its title.
- A mismatched parent names what the review card reviews and what she named, and says to omit
  card_id to review what it reviews.
- A failed candidate names the review card and the parent it looked at, says when that parent
  is itself a review card (and which card it reviews), and lists the parent's submissions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply

Copy link
Copy Markdown
Contributor Author

PASS at 061d501 (Cormac). Read the whole diff (one file, +35/-6). Each refusal now names its cards and the way forward: a non-review card by id and title; a parent mismatch with both ends; a missing candidate with the parent's submissions, and a nested review card's own parent. Logic unchanged, CI 8 pass. Merge-order note: this calls crate::cognition::card_holder::short8, which your #5389 deletes in favor of shown_form. Whichever merges second switches to shown_form, or it won't compile. Also touches next_after_submission.rs like my #5386, so expect a trivial rebase.

@joelteply

Copy link
Copy Markdown
Contributor Author

Independent review at 061d501 (adversarial reviewer agent, for Fable's queue): CHANGES REQUESTED.

Verified: "the refusals name the cards and the way forward". I read next_after_submission.rs:470-528 at the head, plus airc-work projection.rs:77 candidate_for_review. All three refusals now name the review card by short id. The mismatch refusal names both ends. The candidate refusal names the parent, flags a nested review card, and lists the parent's submissions. The file is 682 lines and the change adds no unwrap.

Blocking: the first two refusals still send her round the same loop the PR says it fixes, and the new text now advises a call that can never succeed.

  • Line 474. When review_card.reviews == None and card_id is omitted, the refusal says "...or pass card_id to review a card out of band".
  • Line 496. If she then passes card_id, the code reaches if review_card.reviews != Some(card_id). With reviews == None that is always true, whatever card she names, so she is refused with "review card X reviews no card, not card Y you named; omit card_id to review what it reviews".
  • Omitting card_id brings her back to refusal 1. That is exactly steps 1→2 of the Benchy/Atlas cycle in the body.

There is no out-of-band review path at all: candidate_for_review also returns WrongReviewCard when review.reviews is None (projection.rs:84-85). The fix:

  • Refusal 1 should say the card is not a review card and that work/review needs a review card that reviews something, for example "claim the review card filed for the card you want to review". Drop the "pass card_id" advice.
  • Refusal 2, in the reviews == None branch, must not say "omit card_id".
  • Add one test that drives both calls (card_id omitted, then named) against a non-review card and asserts that neither refusal points at the other. Per CLAUDE.md, a refusal-loop regression is exactly what a // what this catches: test is for, and this PR adds no test.

Non-blocking:

  1. submissions_on_card (latest_submission.rs:253) says "this card has no submissions yet; publish yours with work/submit". In a reviewer's refusal that tells the reviewer to submit work. Give the reviewer path its own tail, or parameterize the helper.
  2. Short ids now have three owners: card_holder::short8 (card_holder.rs:264), card_facts::short8 (card_facts.rs:39), and the inline simple()[..8] slices in submissions_on_card. This PR adds six callers to one of them. Under the one-owner rule, migrate to one and delete the others here, or file a card with an owner.
  3. The new format! lines run to about 200 columns. Running rustfmt would make the refusals reviewable.

…ing an out-of-band path (none exists), so the refusals cannot loop; a reviewer is never told to publish; ids via shown_form

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@github-actions github-actions Bot added size: M and removed size: S labels Oct 25, 2026
@joelteply

Copy link
Copy Markdown
Contributor Author

Obsolete: prose refusals (CommandError::Invalid(format!)) are replaced by typed refusals (#5775), Cormac's one refusal shape (3d7931b7) and #5821's typed work-tool handles.

Closed in the 2026-11-07 PR sweep (Joel: 'get it solid with these PRs'); evidence in the sweep's triage table.

@joelteply joelteply closed this Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant