Repository navigation
feat(repair): project one canonical next action (#6304) - #6859
Conversation
Clippy 1.95 lints both assert!(r.is_err()) (assertions-on-result-states) and assert!(matches!(r, Err(_))) (redundant-pattern-matching), so the negative battery now uses the house let-else form from analysis/diff/load, with four unit tests converted to Result-style. The constructor allow also gains the mandated reason clause.
E:/repo and F:/decoy/checkout trip check-local-context (any drive-letter token reads as a local machine path). The selector treats root as an opaque verbatim string, so /repo and /decoy/checkout discriminate the same control-4 binding without an allowlist budget.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (12)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
Limit details: You’ve used all 10 included reviews currently available. Summary by CodeRabbit
WalkthroughThis change adds canonical next-action decisions to repair cards, single-attempt status reports, and check triage. It defines eight action classes, typed stops, and bounded alternatives. Human and JSON output project the decision, and repair-card digests include selected decision fields. ChangesCanonical next-action flow
Priority: ⬇️ Low Estimated code review effort: 4 (Complex) | ~45 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant build_repair_card
participant select_canonical_next_action
participant RepairCardV1
participant agent_card_prose_lines
participant render_next_action_human
build_repair_card->>select_canonical_next_action: producer state and offered command
select_canonical_next_action-->>build_repair_card: canonical decision
build_repair_card->>RepairCardV1: decision and projected command reference
agent_card_prose_lines->>render_next_action_human: canonical decision
render_next_action_human-->>agent_card_prose_lines: human-readable decision block
Merge Risk: 🟡 Moderate · up to Confirm that the spec index does not imply doctor and pilot renderers have migrated before merging. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The inspected changes preserve existing repair controls and command authority. Action selection remains advisory, and status and triage decisions do not gain execution privileges. Compatibility and concurrent-state behavior remain only partially assessed. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❓ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 63.04% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 92 functions across 15 files. (8 skipped: 7 unsupported, 1 too large.) ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
I’m a rabbit with a route to read, Comment |
|
Root handoff note: this lane claims RIPR-SPEC-0234 while open #6590 proposes 0233-0237 with 0234 assigned to TypeScript oracle/reach rules (consumed by #6798). No landed collision yet, but the later-to-merge lane must renumber; expect this spec to move to 0238+ with matching README/ledger/traceability updates before Ready. |
Stopped-action stop text embeds the portable packet route; the human next-action block printed it verbatim on a paste-scanned line, so foreign paste targeted the wrong repository. The CLI-bound render now splices --root per #3999 and pairs hostile spellings with their PowerShell form, the same convention as the full-packet line. Measurement keeps the portable render.
…upport-tier impact (#6304) RIPR-SPEC-0234 landed on main as the work-portfolio compiler spec; this lane moves to 0241 (README, ledger, traceability, slice, changelog). Fills the empty Support-tier impact field per convention (no tier change).
|
Root repair push 34893ca (2 commits, lane taken over after handoff): (1) paste-robustness fix — stopped-action stop text embedded the portable packet route and the human next-action block printed it verbatim, so foreign paste targeted the wrong repo; the CLI-bound render now splices --root per #3999 and pairs hostile spellings with the shared PowerShell translator (printed_command_paste 6/6 green locally, was foreign FAIL); (2) spec renumber RIPR-SPEC-0234 to 0241 — 0234 LANDED on main as the work-portfolio compiler spec, so this was mandatory not speculative (README/ledger/traceability/slice/changelog updated; spec-numbering/doc-artifacts/doc-index/traceability gates pass); (3) filled Support-tier impact (no tier change; check-support-tiers passes). Correction to my earlier note: the number is 0241, not 0238+. |
…itespace (#6304) The route splice rejoined whitespace-split tokens, which would collapse significant interior spaces inside quoted arguments. Splice --root at the computed byte offset instead so the remainder passes through verbatim.
…6304) Subject root uses the caller-bound root instead of the manifest-recorded spelling (which may be CWD-relative). Index entry no longer claims doctor/pilot renders project canonical actions and lists the status producer once.
EffortlessSteven
left a comment
There was a problem hiding this comment.
Self-review (COMMENT, author cannot approve own PR)
reviewed_head_sha: 831919d (branch feat/canonical-next-action-6304)
integration_basis: main b85e628 (behind-only vs current main; disjoint).
claim_boundary: #6304 canonical next action: one closed action-class
vocabulary, gate-ordered selection law, typed stops, human+JSON projections
for RepairCard, RepairAttempt status, check triage; typed doctor/pilot
constructors only (renderer migration explicitly out of scope per PR body).
changed_surfaces_and_semantic_owners_inspected:
- domain/next_action.rs (selector law, vocabulary, stops, control battery):
reviewed in depth by delegated selector reviewer (different oracle:
law-verification + mutation perspective on all 10 controls + 15 control-10
negatives). Verdict: no blocking findings; selection law holds; no control
passes vacuously. I verified the verdict's load-bearing sample (gate order
currentness-first, offered-wins, constructor invariants) by reading the
selector arms. - app producers (repair_card.rs, agent_status.rs, output/human/triage.rs):
reviewed by root. Repair/status adapters bind offered commands and
currentness from owning authorities; triage binds restart routes and
documents all-None currentness as enforced-upstream. One valid bot-found
defect fixed: status subject used manifest-recorded root (often ".")
instead of the caller-bound root (19e410a + regression test). - output/next_action.rs + cli/commands/agent_card.rs (human/JSON
projections): reviewed by root. Control 9 pins agreement on subject,
class, command identity, reason, limitations (not display bytes). Root
repaired the paste-robustness defect the hosted oracle caught: stopped
text embedded the portable packet route; the CLI-bound render now splices
--root per #3999 with byte-offset preservation and paired PowerShell
forms via the shared translator (cd539f8, 2251b93, 66b341f).
printed_command_paste 6/6 green locally, was foreign FAIL. - repair_card_digest.rs: reviewed by root; only schema/producer/class/
command-id/role/stop-kind/transitions enter the digest, presentations
excluded. Sound. - RIPR-SPEC-0241 (renumbered from 0234, which landed on main as the
work-portfolio compiler spec), README index, ledger, slice,
traceability, changelog: reviewed by root; support-tier field filled
(no tier change); index wording corrected per bot review.
blocking_findings: none
non_blocking_suggestions: 5 battery-strength gaps from the selector
reviewer (MAX+1 boundary, refusal-vs-refusal precedence, offered+benign
attempt case, awaits_edit wording ownership, spec title) — the spec title
one caught a real stranded edit and is fixed in 831919d; the other 4 are
missing pins around correct code, recorded here, not merge-blocking.
refuted_or_stale_findings: 4/4 CodeRabbit threads repaired with source
evidence and resolved (subject root, index wording x2, splice
hardening). The splice thread'sripr agentnote describes intended
fail-closed (not a paste target per is_paste_target), replied with the
predicate.
proof_and_ci_observed: local on exact head: next_action lib 45/45 (pre-
repair head; repair adds 2 output tests + 1 status test, suites re-green:
output::next_action 6/6, agent_card 4/4, agent_status 41/41),
printed_command_paste 6/6, smoke next_action/repair_card/repair_attempt/
doctor 31/31 (pre-repair head), clippy -D warnings clean, fmt clean,
check-support-tiers / spec-numbering / doc-artifacts / doc-index /
traceability pass. Hosted: full matrix green on 34893ca; re-running on
831919d (2 doc/test-only commits since).
proof_or_review_missing: exact-head hosted CI receipts (in flight).
affected_currentness_dimensions: all (first substantive pass on this
candidate) + repair commits reviewed inline above.
residual_assumptions_and_non_claims: doctor/pilot/inventory human renders
not migrated (typed constructors only); check-producer currentness
all-None by documented upstream enforcement; spec remains proposed.
disposition: REVIEW_INCOMPLETE (semantic pass clean, no blocking
findings; advances to REVIEW_READY when hosted CI reports green on
831919d with no new findings).
EffortlessSteven
left a comment
There was a problem hiding this comment.
Self-review update (COMMENT, author cannot approve own PR)
reviewed_head_sha: 831919d (unchanged since the substantive pass; the two
commits after the reviewed 34893ca base — byte-offset splice hardening
66b341f and stranded spec content 831919d — were reviewed inline: splice
preserves quoted whitespace with regression pins, spec title/support-tier
now committed).
proof_and_ci_observed: all hosted checks on the exact head report
pass/skipping with zero pending (except advisory CodeRabbit) and zero
fails, including the previously failing Rust-only feature lane, paste x3,
and source-of-truth jobs. Threads 4/4 resolved with repairs.
blocking_findings: none
proof_or_review_missing: none
disposition: REVIEW_READY. May proceed to finish-pr merge convergence.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
…ction-6304 # Conflicts: # .ripr/traceability.toml # crates/ripr/src/domain/mod.rs # crates/ripr/src/output/human/triage.rs # docs/specs/README.md # policy/doc-artifacts.toml
|
Merge 1856db7: reconciled with current main (5 conflicts: traceability, domain/mod, triage imports, spec README, doc-artifact ledger). No rival next-action work on main. Forced renumber 0241 to 0242 (main landed 0241-check-json-refusal-envelope mid-flight; 0242 unclaimed). Local proof on merged tree: next_action 47, repair_card 49, agent_status 42, triage 5, paste foreign green; spec-numbering/doc-artifacts/doc-index/traceability pass. Prior REVIEW_READY is stale for conflict-resolution/integration-basis dimensions; will refresh after CI. |
…#6859) The triage adapter derived working-tree vs committed from output.base presence, mislabeling --worktree runs (which resolve a base) as committed and supplied scopes (which have none) as the live tree. Thread CheckDiffProvenance from the CLI through render to the adapter; pin all three modes. Document the attempt-observed and card route-subject semantics the review threads challenged.
review-pr refresh: #6859 at 3216004 — REVIEW_READYSelf-review (author) as COMMENT with disposition. Exact head reviewed: Integration basis
Proof
Threads: 10/10 resolved with replies
Residuals (out of scope, recorded)
DispositionREVIEW_READY. Merge by ordinary protected squash; reconcile #6304 |
Summary
Projects one canonical next action from current first-hour state (#6304): a
single
CanonicalNextActionV1DTO minted by one selector authority(
select_canonical_next_action). Producers (repair card, repair-attemptstatus, check triage, agent status) normalize to
NextActionInputand project the decision; doctor, pilot delegation, and inventoryhave typed constructors and tests only, with production render migration as owner
follow-up (see Claim Boundary). Nothing re-derives lifecycle,
ranking, or command authority.
CommandSpecstays the argv/cwd authority —the selector only references producer-offered specs.
Swarm / Source Boundary
dependency, or repo-ops development for
ripr-swarmsurface
No publishing, release-asset, signing, or secret surfaces touched.
Source-of-truth Links
Proposal: n/a
Spec: RIPR-SPEC-0242 (
docs/specs/RIPR-SPEC-0242-canonical-next-action.md)ADR: n/a
Plan item: n/a
Governing issue or accepted claim: #6304. Consumed authorities verified on
base: RepairCard #4667, RepairAttempt #4798/#2927, command catalogs
#4822-4825,
CommandSpecargv/cwd.Acceptance delta (one sentence): each first-hour producer projects exactly
one canonical next action through one selector with a closed vocabulary,
gate-ordered selection law, and typed stops.
Candidate Relationships
Candidate branch (GitHub PR head is authoritative after publication):
feat/canonical-next-action-6304Stack parent or prerequisite PR (if any): none
Proposed replacement of PR (if any; not yet accepted): none
Acceptance retained from a replaced candidate (if any): none
Accepted winner and losing candidate disposition (when decided): undecided
Duplicate-claim search before publish (
6304 in:title,bodyall states,canonical next action in:titleopen): empty.Scope
One architectural seam: the canonical next-action selector plus its
human/JSON projections and producer wiring.
Scope Classification
This PR is scoped by:
Production delta:
domain/next_action.rs: closedNextActionClassvocabulary,select_canonical_next_actiongate order, typedNextActionStops.output/next_action.rs: human block (next action: <class>+producer:) and JSON value projections.(
next_actionisSomeexactly when executable), agent status arms,check line-family dispatch (byte-identical renders),
next_action_classgoverned enum, digest pins portable parts only. Check diff-source binds
from declared
CheckDiffProvenancethreaded from the CLI (worktree /supplied scope / committed history), never derived from base presence.
Evidence/support delta:
cli_smoke/next_actioncase, RIPR-SPEC-0242,.allowslice,traceability + output-contract + public-API entries, changelog fragment.
Single acceptance criterion:
by the single selector, or a typed stop — never an invented command.
Non-goals:
or edits; no transport rewrites; no release decisions.
Support-tier Impact
docs/status/SUPPORT_TIERS.mdClaim/proof notes:
blocks render the projected action.
docs/OUTPUT_SCHEMA.md,policy/output_contracts.txt, andpolicy/public_api.txtupdated;check-output-contractsandcheck-public-apipass.Policy Impact
Ledger or exception notes:
policy/doc-artifacts.toml: registered RIPR-SPEC-0242; spec READMEindex link added.
policy/architecture.txt: one scopedserde_jsonexception forcrates/ripr/src/domain/next_action.rs, following the Perl finding with a missing test runner renders an incorrect 'No test change needed' next step #4146 precedent —cfg(test) wire-spelling assertions only; production selection code never
touches
serde_json.Proof
Result, failures, or skipped proof:
check-fast: pass (13 gates;check-fixture-contractsskipped by thegate itself).
next_action: 45 passed, 0 failed. Focused lib(
repair_card agent_status triage digest agent_card doctor): 335passed, 0 failed. Smoke filter: 31 passed, 0 failed.
check-command-catalog,check-output-contracts,check-static-language,check-traceability,precommit: all pass.cargo test --workspaceNOT run: full lib runs hit 3 inheritedrepair_attempt::storeUNC-spelling failures reproduced on the stashedbase in this environment (not owned by this PR).
green until the battery was hardened (unoffered stale case + no-command
stale row), then red with 2 failures; gate restored.
Claim Boundary
May claim: wired producers project exactly one selector-minted action or a
typed stop; card
next_actionis executable-iff-Some; digest pins theportable decision parts. Must not claim: lifecycle/ranking changes;
doctor/pilot/inventory human renders migrated (typed constructors only —
owner follow-up residual).
Rollback
Revert the squash commit on main. No migrations, no data, no flag flips.
Spec-Test-Code Traceability
docs/specs/RIPR-SPEC-0242-canonical-next-action.mddomain::next_actionbattery,output::next_actionprojectiontests,
crates/ripr/tests/cli_smoke/next_action.rscrates/ripr/src/domain/next_action.rs,crates/ripr/src/output/next_action.rs, producer wiring inapp/repair_card.rs,app/repair_card_handoff.rs,app/agent_status.rs,output/human/triage.rs.ripr/traceability.tomlentryStatic Language Check
killed,survived,untested,proven, andadequate.(
cargo xtask check-static-language: pass.)CI Economics
n/a — no workflow, policy-gate, branch-protection, artifact, or release
changes.
Engineering Check
panic,unwrap,expect,todo, orunimplementedin production code.panic,unwrap,expect,todo, orunimplementedin tests.(
check-no-panic-familyandcheck-allow-attributespass; new non-Rustfiles are spec/changelog/toml evidence, no new generated/dependency/
process/network surfaces;
OUTPUT_SCHEMA.mddocuments the JSON delta.)Gates
cargo fmt --checkcargo check --workspace --all-targetscargo test --workspacecargo clippy --workspace --all-targets -- -D warningscargo doc --workspace --no-depscargo package -p ripr --listcargo publish -p ripr --dry-runcargo xtask check-static-languagecargo xtask check-doc-artifactscargo xtask check-support-tierscargo xtask check-no-panic-familycargo xtask check-allow-attributescargo xtask check-local-contextcargo xtask check-file-policycargo xtask check-covered-bycargo xtask check-executable-filescargo xtask check-workflowscargo xtask check-spec-formatcargo xtask check-spec-numberingcargo xtask check-fixture-contractscargo xtask check-generatedcargo xtask check-badge-diff-policycargo xtask check-generated-cleancargo xtask check-dependenciescargo xtask check-process-policycargo xtask check-network-policyAlso pass:
check-command-catalog,check-output-contracts,check-traceability,check-public-api,check-architecture,check-capabilities,check-workspace-shape,check-release-targets,check-droid-review-config,check-identity-registry,check-lint-policy.Unchecked gates were not run (see Proof for the
test --workspaceresidual); clippy
--all-targetscompiled all targets.Extension changes:
cd editors/vscode && npm cicd editors/vscode && npm run compilecd editors/vscode && npm run package(n/a — no editor changes.)