Skip to content

agent status: inventory refusal follows the canonical next action (#6986) - #8399

Merged
EffortlessSteven merged 4 commits into
mainfrom
claude/6986-inventory-canonical-action
Oct 17, 2026
Merged

EffortlessSteven merged 4 commits into
mainfrom
claude/6986-inventory-canonical-action

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Requested by Steven · project thread

Before: ripr agent status decided locally, by counting attempts/seams, whether the inventory must refuse to choose; the canonical next-action selector was not consulted for the inventory (only for the single-attempt path).

After: the inventory builds a canonical decision and the refusal follows it (choose_attempt for several awaiting attempts, choose_item for several open seams). When the projection cannot be built (e.g. unbound root) the shared count fallback applies. Rendered text and commands are byte-for-byte unchanged. Inventory slice of #6986; precedent #8319 (doctor).

How: canonical_next_action_for_inventory projects the inventory into NextActionInput; inventory_requires_choice reads the decision with the count fallback; select_next_command branches on it. Tests: decision-per-state render test, fallback test (negative control for an unbuildable projection), and a human/JSON agreement test for the one inventory DTO (Control 9). Changelog fragment added.


Generated by Claude Code

…6986)

The inventory's choose-vs-continue refusal for several awaiting attempts or
open seams now follows the canonical decision (choose_attempt/choose_item),
with the candidate count as the shared fallback. Rendered text unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Em12HpuY7UcKeXeTmsjfBS
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Copy link
Copy Markdown
Member Author

Local proof on head (in-session, before marking ready):

  • cargo fmt: clean
  • cargo test -p ripr --lib inventory_: 94 passed
  • cargo test -p ripr --lib agent_status: 54 passed
  • cargo xtask precommit: exit 0

Not run locally: full-workspace tests (left to hosted CI).


Generated by Claude Code

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 17, 2026 05:40
@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 23 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 63 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 0430464b-fc97-410c-af6b-1553990389e6
📥 Commits

Reviewing files that changed from the base of the PR and between d91a25d and 411db9c.

📒 Files selected for processing: 2
  • changelog.d/6986-inventory-canonical-next-action.md
  • crates/ripr/src/app/agent_status.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@EffortlessSteven
EffortlessSteven enabled auto-merge (squash) October 17, 2026 05:40

Copy link
Copy Markdown
Member Author

Ripr Rust Small on GitHub Hosted / Rust gates failed at cargo xtask goldens check on the same 8 fixture human.txt goldens that are red on main (stale after #8275's wording change). This PR touches only agent_status.rs and a changelog fragment, so it is not this PR's. The fix is #8351 (open, merge-ready, not merged yet). Once it lands I'll merge main into this branch so hosted CI re-runs; auto-merge stays armed.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven marked this pull request as draft October 17, 2026 06:54
auto-merge was automatically disabled October 17, 2026 06:54

Pull request was converted to draft

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 17, 2026 06:54
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@EffortlessSteven
EffortlessSteven enabled auto-merge (squash) October 17, 2026 06:54

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decision

  • Needs reviewer attention before upstream: findings remain.

Confirmed findings

  • No test exercises currentness/platform/detail_route/restart_route propagation through the inventory projection; structural coverage of the NextActionInput fields is shallow in the new tests.
  • crates/ripr/src/app/agent_status.rs:868 — inventory_requires_choice re-derives the selector's classification by comparing action.action_class() to a caller-passed NextActionClass. Branch on the decision's intrinsic variant instead; otherwise the surface silently drifts if ChooseAttempt/ChooseItem are renamed.
  • Replaced (Some,Some) tuple match with (Some,second) + seams.extend(...): visually subtle change; reviewers should re-derive that single-iter BTreeMap yields sorted seam_ids and dedup invariant is preserved by the HashSet that constructed open.

Verification questions

  • Confirm decision-per-state render test asserts both branches but stops at the ChooseItem assertion and drops root cleanup afterward in the ChooseItem branch; the multi-seam warning 'multiple_open_repair_seams' render is not asserted in that test.
  • Confirm fallback test exercises the unbound-root path for resumable only; the Err-fallback branch for the open-seam multi case is exercised but a single open seam in fallback path is not tested, leaving the (false, [attempt]) single-seam continue route uncovered under Err.
  • Confirm canonical_next_action_for_inventory is called with empty open_seams during the resumable pass; attempts-only projection is OK because item_id falls through to empty string when count != 1.
  • Confirm inventory_requires_choice treats Err(_) as candidate_count > 1; an Err from projection with candidate_count == 1 would flip a single-attempt path into refusal — only reachable when canonical input is unbuildable.
  • Confirm helper inventory_requires_choice duplicates the selector's classification decision. The canonical path already knows its class; reading it back here is a second source of truth on the surface's intent.
  • Confirm inventory_decision_human_and_json_agree_from_one_dto only covers the resumable choose_attempt branch; open-seam ChooseItem human/JSON parity is not pinned by the new tests.

Refuted

  • Refusing to bind a single open seam when the canonical decision returns ChooseItem would suppress a real continue.; refuted because: inventory_requires_choice returns true only when the selector's class is ChooseItem, so a single open seam whose projection binds (e.g. by a different rule) still flows into the binding arm via if !choose_seam. The matching decision's projection is what gates the arm, not the raw count.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

@settings settings Bot removed the merge-ready label Oct 17, 2026

Copy link
Copy Markdown
Member Author

Rust gates is red on goldens check only (35 fixtures' human.txt drift). This PR touches none of them. The drift comes from #8412, which merged without re-blessing, so main fails the same check. The fix is #8418.

No fix goes into this branch. Once #8418 merges I'll merge main in here so CI re-runs, and auto-merge stays armed.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven marked this pull request as draft October 17, 2026 08:14
auto-merge was automatically disabled October 17, 2026 08:14

Pull request was converted to draft

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 17, 2026 08:14
@EffortlessSteven
EffortlessSteven merged commit 8ce4ac6 into main Oct 17, 2026
33 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/6986-inventory-canonical-action branch October 17, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants