Skip to content

docs(gate): define repair-route eligibility contract - #2243

Merged
EffortlessSteven merged 2 commits into
mainfrom
spec/gate-eligibility-1933-clean
Jul 22, 2026
Merged

EffortlessSteven merged 2 commits into
mainfrom
spec/gate-eligibility-1933-clean

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Jul 22, 2026 •

Copy link
Copy Markdown
Member

Summary

Swarm / Source Boundary

Ordinary spec, documentation, policy-metadata, and traceability work for EffortlessMetrics/ripr-swarm. No published source or release surface changes.

Source-of-truth Links

Scope

One docs/spec/test-only evidence package for the B1 gate eligibility contract.

Scope Classification

  • Docs/spec/test-only evidence package

Production delta: none. Evidence/support delta: normative completeness outcomes, traceability, and slice metadata.

Single acceptance criterion: every declared analysis completeness state has one fail-closed eligibility outcome without producer-identity reconstruction.

Non-goals: no GapRecord.seam_id production, gate enforcement, command execution, receipt issuance, support-tier promotion, or runtime mutation confirmation.

Support-tier Impact

  • none

This PR narrows and documents authority; it does not promote a support claim.

Policy Impact

  • doc artifacts

policy/doc-artifacts.toml records the standalone reason for RIPR-SPEC-0067.

Proof

cargo xtask check-spec-format
cargo xtask check-spec-numbering
cargo xtask check-doc-artifacts
cargo xtask check-doc-index
cargo xtask check-traceability
cargo xtask check-fixture-contracts
cargo xtask check-generated-clean
cargo xtask precommit
git diff --check

All listed local checks pass on the current review-fix head. Hosted required checks remain authoritative.

Claim Boundary

This PR defines B1 only. Until B2 producer identity and B3 enforcement land, gap-ledger routes remain visibly incomplete and cannot block.

Rollback

Revert the two docs/spec commits. No runtime or workflow rollback is required.

Spec-Test-Code Traceability

  • Spec: RIPR-SPEC-0067 canonical repair-route eligibility
  • Tests: existing gap-ledger fail-closed tests listed in .ripr/traceability.toml
  • Code: .allow/spec-system/slices/gate-repair-route-eligibility.v1.toml and existing gate producers
  • Golden outputs: none
  • Metrics: existing gate_repair_route_completeness; no metric behavior change
  • ADR/learning: none required for this contract amendment

Static Language Check

  • Static output avoids prohibited runtime-mutation vocabulary.
  • Unknown and incomplete states retain explicit limitations.

CI Economics

  • LEM impact: ordinary docs/spec validation; no workflow change.
  • Workflows touched: none.
  • Branch protection impact: none.
  • Failure mode caught: ambiguous or fail-open interpretation of incomplete analysis.
  • Cheaper signal: targeted xtask document and traceability checks.
  • Required, advisory, on-demand, and release lanes: unchanged.
  • Artifact families: spec, traceability, and doc-artifact metadata.
  • Rollback path: revert the docs/spec commits.

Engineering Check

  • No production or test code added.
  • New metadata is policy-governed, not a programming file.
  • No generated, dependency, process, or network surface added.
  • Public schema behavior unchanged.

Gates

  • Targeted spec, documentation, traceability, fixture, generated-clean, precommit, and diff checks listed above.
  • Full workspace and release gates: not required for this docs/spec-only slice; hosted required checks remain authoritative.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026 •

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The changes define canonical repair-route eligibility rules, add a declarative slice specification, update RIPR-SPEC-0067 with issue and implementation details, extend traceability references, and document standalone artifact behavior.

Changes

Gate repair-route eligibility

Layer / File(s) Summary
Eligibility contract and slice definition
.allow/spec-system/slices/gate-repair-route-eligibility.v1.toml, docs/specs/RIPR-SPEC-0067-pr-gate-use-case.md
Defines producer-owned eligibility fields, prohibited reconstruction, closed eligibility outcomes, and the declarative slice metadata.
Specification mapping and artifact traceability
docs/specs/RIPR-SPEC-0067-pr-gate-use-case.md, .ripr/traceability.toml, policy/doc-artifacts.toml
Links issue, tests, implementation references, sequencing details, and fail-closed artifact behavior to RIPR-SPEC-0067.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Poem

I’m a rabbit with a route to repair,
Canonical fields tucked neatly there.
No guessing from lines, no evidence array,
Closed outcomes keep gates fair.
Hop, hop—the spec now knows the way!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is concise, specific, and accurately reflects the contract-definition changes in this PR.
Description check ✅ Passed The description follows the template closely and includes the required sections, scope, proof, traceability, and rollback details.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch spec/gate-eligibility-1933-clean

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/specs/RIPR-SPEC-0067-pr-gate-use-case.md`:
- Line 295: Update the wording in the contract sentence to hyphenate
“default-generated” when it modifies “workflow,” without changing the
surrounding meaning.
- Around line 276-293: Update the eligibility outcome table in the section
defining the closed analysis-completeness vocabulary to add explicit rows for
`failed` and `unavailable` analysis. Specify fail-closed, gate-ineligible
behavior for both states, and define when the selected gate mode must produce
`config_error`; keep the existing complete, limited, stale, preview-authority,
advisory, and calibrated-blocking outcomes unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 64b9a5ec-2bd0-4de8-83d0-16f822e75520

📥 Commits

Reviewing files that changed from the base of the PR and between fd03b26 and 21aeae6.

📒 Files selected for processing (4)
  • .allow/spec-system/slices/gate-repair-route-eligibility.v1.toml
  • .ripr/traceability.toml
  • docs/specs/RIPR-SPEC-0067-pr-gate-use-case.md
  • policy/doc-artifacts.toml
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • EffortlessMetrics/ripr (auto-detected)
  • EffortlessMetrics/perl-lsp (auto-detected)
  • EffortlessMetrics/unsafe-review (auto-detected)
  • EffortlessMetrics/ub-review (auto-detected)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/specs/RIPR-SPEC-0067-pr-gate-use-case.md (1)

283-292: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Make outcome precedence and mode behavior deterministic.

These predicates are not stated to be mutually exclusive: limited, stale, failed, or unavailable analysis can also have missing route fields, so the same evidence could produce either incomplete_repair_route or an analysis-status outcome. The conditional config_error behavior likewise does not identify the authoritative mode mapping. Define explicit precedence and mode-specific outcomes so every evidence state has one canonical result.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/specs/RIPR-SPEC-0067-pr-gate-use-case.md` around lines 283 - 292, Update
the eligibility decision table to define a deterministic precedence order for
overlapping evidence, including missing route fields combined with limited,
stale, failed, or unavailable analysis. Specify the authoritative outcome for
each configured gate mode, including when those conditions produce config_error
versus an analysis-status result, so every evidence state maps to exactly one
canonical outcome.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@docs/specs/RIPR-SPEC-0067-pr-gate-use-case.md`:
- Around line 283-292: Update the eligibility decision table to define a
deterministic precedence order for overlapping evidence, including missing route
fields combined with limited, stale, failed, or unavailable analysis. Specify
the authoritative outcome for each configured gate mode, including when those
conditions produce config_error versus an analysis-status result, so every
evidence state maps to exactly one canonical outcome.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 91de5df9-a6f0-4e2c-b665-9b6050082d3c

📥 Commits

Reviewing files that changed from the base of the PR and between 21aeae6 and e2ad5ac.

📒 Files selected for processing (1)
  • docs/specs/RIPR-SPEC-0067-pr-gate-use-case.md
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • EffortlessMetrics/ripr (auto-detected)
  • EffortlessMetrics/perl-lsp (auto-detected)
  • EffortlessMetrics/unsafe-review (auto-detected)
  • EffortlessMetrics/ub-review (auto-detected)

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Inspection record (review posture: no findings, documenting what was checked).

Surfaces inspected: the RIPR-SPEC-0067 "Canonical repair-route eligibility contract" amendment, the slice, traceability delta, and policy/doc-artifacts metadata.

Consistency checks against landed authority (my #2028 PR1/PR2 context):

  • The amendment's "one producer-owned evidence record supplies every field; renderers and gate adapters must not reconstruct them" matches the producer-owned authority doctrine in RIPR-SPEC-0087 §8 (analysis::repair_route::repair_packet_eligibility). The two contracts decide different things and don't collide: §8 owns the safe-for-repair-PACKET flip over a ClassifiedSeam; this spec owns gate POLICY eligibility (blocking decisions) over evidence records. The output/gate/repair_route.rs 12-field render completeness (NOTEd in refactor(lsp): route repair-packet decisions through the producer authority (#2028 PR 2) #2235 as not-the-flip) is a third, render-layer predicate — the 18-field list here is a superset at the eligibility layer, not a contradiction.
  • Fail-closed sequencing is honest: "does not populate a missing GapRecord.seam_id... until that slice lands, gap-ledger routes remain visibly incomplete_repair_route and the gate must not advertise them as blocking-capable." Under-emit, correct.
  • Run vocabulary (complete | limited | stale | failed | unavailable) matches the RIPR-SPEC-0105 family.
  • Traceability references verified to exist: output/gate/tests.rs:896 (gate_acknowledgeable_fails_closed_for_gap_ledger_without_typed_seam_identity) and :1893 (given_gap_ledger_record_without_typed_seam_identity_then_baseline_check_fails_closed).
  • Slice shape conforms to ImplementationSliceV1 (no branch/PR/progress state); evidence.state = "design_only" is the honest value for a spec-only PR.

Risks considered: dual-authority confusion (packet flip vs gate eligibility — mitigated by distinct seams and the "does not change gate behavior" non-goal); vocabulary drift (not found); dishonest test references (not found).

Residual assumptions: the B2 slice (seam-identity carry-through) will need to reconcile the 18-field eligibility inputs with the actual GapRecord projection fields — the field list here is normative-forward, so B2's implementation PR should pin any renames against real producer output rather than amending this table silently.

No actionable findings from this pass.

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.

1 participant