Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .allow/spec-system/slices/gate-repair-route-eligibility.v1.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
schema_version = "2.0"
id = "ripr.slice.gate-repair-route-eligibility.v1"
generation = 1

source_issue = "issue:1933"
design_reference = "RIPR-SPEC-0067#canonical-repair-route-eligibility"
change_class = "spec_or_contract_change"

claim_boundary = """
Amends the PR-gate use-case contract with the producer-owned data required for
policy eligibility and the closed fail-closed outcomes for incomplete, limited,
stale, preview, advisory, and explicitly blocking modes. It does not populate
gap-ledger seam identity, change gate behavior, execute commands, issue
receipts, or promote support tiers.
"""

non_goals = [
"gap-ledger seam identity production",
"gate blocking behavior",
"verification command execution",
"receipt issuance",
"runtime mutation confirmation",
"support-tier promotion",
]

return_conditions = [
"Return to root if a renderer or gate adapter reconstructs identity or commands from presentation fields.",
"Return to root if limited, stale, failed, unavailable, or preview evidence can become a blocking decision.",
"Return to root if advisory mode is allowed to block a complete route.",
]

owned_seams = [
"seam:ripr:contract:gate-repair-route-eligibility",
"seam:ripr:docs:pr-gate-use-case",
]

shared_seams = [
"seam:ripr:output:gate-repair-route",
"seam:ripr:output:gap-ledger",
"seam:ripr:contract:analysis-currentness",
]

forbidden_seams = [
"seam:ripr:output:gate-authority",
"seam:ripr:agent:command-runner",
"seam:ripr:agent:receipt-issuer",
]

[[requirement_delta]]
requirement_id = "RIPR-SPEC-0067#canonical-repair-route-eligibility"
requirement_generation = 1

[implementation_claim]
status = "implemented"

[evidence]
state = "design_only"

[support_claim]
state = "unchanged"
5 changes: 4 additions & 1 deletion .ripr/traceability.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4889,6 +4889,8 @@ tests = [
"crates/ripr/src/output/gate/repair_route.rs::tests::generic_gap_record_evidence_ids_do_not_become_seam_identity",
"crates/ripr/src/output/gate/repair_route.rs::tests::blank_gap_record_commands_render_as_null_and_remain_missing",
"crates/ripr/src/output/gate/repair_route.rs::tests::incomplete_route_is_advisory_only_and_renders_named_limitation",
"crates/ripr/src/output/gate/tests.rs::gate_acknowledgeable_fails_closed_for_gap_ledger_without_typed_seam_identity",
"crates/ripr/src/output/gate/tests.rs::given_gap_ledger_record_without_typed_seam_identity_then_baseline_check_fails_closed",
"crates/ripr/src/output/gate.rs::tests::gate_markdown_projects_complete_repair_route_for_ci_summary",
"crates/ripr/src/output/gate.rs::tests::gate_markdown_projects_incomplete_route_limitation_without_fabricated_command",
"crates/ripr/src/output/gate/presentation.rs::tests::production_caller_target_markdown_preserves_explicit_location",
Expand All @@ -4906,7 +4908,8 @@ code = [
"crates/ripr/src/output/gate/repair_route.rs",
"crates/ripr/src/output/gate/presentation.rs",
"xtask/src/main.rs",
"xtask/src/verification_contracts.rs"
"xtask/src/verification_contracts.rs",
".allow/spec-system/slices/gate-repair-route-eligibility.v1.toml",
]
outputs = [
"docs/specs/RIPR-SPEC-0067-pr-gate-use-case.md",
Expand Down
67 changes: 63 additions & 4 deletions docs/specs/RIPR-SPEC-0067-pr-gate-use-case.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Linked plan:
Linked issues:

- #1440
- #1933

Linked PRs:

Expand Down Expand Up @@ -244,6 +245,61 @@ command, that source emits `incomplete_repair_route` rather than guessing.
static repair guidance under the configured gate policy, not runtime mutation
evidence, coverage adequacy, or proof of correctness.

### Canonical repair-route eligibility contract

The gate may consider a candidate for policy eligibility only when one
producer-owned evidence record supplies every field below. These are eligibility
inputs; renderers and gate adapters must not reconstruct them from file names,
line numbers, display text, or ordered evidence arrays.

```text
canonical_gap_id
seam_id
source_artifact_identity
file
line
gap_state
classification
changed_owner
changed_behavior
missing_discriminator
repair_target
test_intent
inspection_command
verify_command
receipt_command
analysis_completeness
analysis_currentness
authority_boundary
```

`source_artifact_identity` identifies the producer artifact and its repository,
configuration, input, and content identity. `analysis_completeness` uses the
closed run vocabulary `complete`, `limited`, `stale`, `failed`, or `unavailable`.
`analysis_currentness` records whether the artifact is current for the selected
repository snapshot. A route is not complete merely because its human-facing
strings are non-empty.

The eligibility decision has this closed outcome table:

| Evidence condition | Eligibility outcome |
| --- | --- |
| Complete, current, full-scope route | May become policy-eligible; the configured gate mode still decides whether it can block. |
| Any missing route field | `incomplete_repair_route`; visible advisory only. |
| Limited or partial analysis scope | `limited_partial_scope`; gate-ineligible and never a full-run pass. |
| Stale artifact or non-current repository snapshot | Gate-ineligible, or `config_error` when the selected mode requires current input. |
| Failed analysis | `failed`; gate-ineligible and fail-closed, or `config_error` when the selected mode requires a successful current analysis. |
| Unavailable analysis | `unavailable`; gate-ineligible and fail-closed, or `config_error` when the selected mode requires an available current analysis. |
| Unsupported preview-language authority | Advisory only; it cannot gain blocking authority through projection. |
| Explicit advisory mode | Never blocks, including for an otherwise complete route. |
| Explicit calibrated blocking mode | Blocks only a complete, current, full-scope, policy-eligible decision. |
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

This contract does not make the default-generated workflow blocking. It also
does not populate a missing `GapRecord.seam_id`; the producer-owned identity
carry-through is the next implementation slice under #1933. Until that slice
lands, gap-ledger routes remain visibly `incomplete_repair_route` and the gate
must not advertise them as blocking-capable.

### Human and check-summary projection

`gate-decision.md` projects the same structured route for every blocking,
Expand Down Expand Up @@ -437,10 +493,13 @@ disclosed and fails closed; it is never treated as a complete causal comparison.
the generated-CI `RIPR_GATE_MODE` / `RIPR_GATE_BASELINE` wiring,
and `fixtures/boundary_gap/expected/calibrated-gate/`.
- #1440 PR A owns the shared model and JSON contract; PR B projects that object
into human and CI summaries; the CLI dogfood receipt now proves the complete
failure surface for a supported threshold route. PR C remains open until a
real policy-eligible call-observation producer can drive the same round trip.
No slice adds a classifier.
into human and CI summaries. #1933 now sequences the remaining trust work:
B1 defines this repair-route eligibility contract, B2 carries producer-owned
seam identity through the gap ledger, and B3 enforces configured gate modes.
The CLI dogfood receipt proves the complete failure surface for a supported
threshold route, but does not make the gap-ledger path blocking. PR C remains
open until a real policy-eligible call-observation producer can drive the
same round trip. No slice adds a classifier.

## Metrics

Expand Down
1 change: 1 addition & 0 deletions policy/doc-artifacts.toml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ kind = "spec"
path = "docs/specs/RIPR-SPEC-0067-pr-gate-use-case.md"
status = "proposed"
owner = "product-swarm"
standalone_reason = "Defines the optional PR-gate contract, including producer-owned repair-route eligibility and fail-closed outcomes for incomplete, limited, stale, preview, advisory, and explicitly configured blocking evidence; #1933 tracks seam-identity production and enforcement as later slices."

[[artifact]]
id = "RIPR-SPEC-0068"
Expand Down
Loading