Skip to content

feat(064): case_regressions selection clause, spec complete - #552

Merged
bartekus merged 2 commits into
mainfrom
impl/064-complete
Nov 7, 2026
Merged

bartekus merged 2 commits into
mainfrom
impl/064-complete

Conversation

@bartekus

@bartekus bartekus commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Completes spec 064 (selection gate: case_regressions clause, amends 029 and 061) for 0.6.0.

What changes

  • crates/rustev-eval: the clause grammar and refusals (3.1) in selection.rs; the new module selection/case_regressions.rs with the per-case value (pooled over one case, 3.2), the exact-decimal boundary and drop (3.3), the result rule with failure dominance (3.4) and the cases member of rustev.selection/1 (3.5.1, lists bounded at 10 000). Host sets read rustev.host-cases/1 through the same per-case view (3.6).
  • crates/rustev-surface: gate select stdout switches, for this clause only, to the summary { regressions, at_most, unresolved, first } (3.5.3). Every other clause's stdout is unchanged (R-1).
  • crates/rustev-cli: qualifying, rejected and unknown goldens; host-set stdout test. tools/rustev-conformance: one CLI case.
  • Mutation seeds: seeds.sh "spec 064" (5 seeds).
  • Spec record: implementation record, implementation: complete, declared verification; 064 in VERIFIED_SPECS and the cli-repeat acceptance group; extends edges for Makefile, scripts/acceptance/, crates/rustev-surface/ (027, amending: the stdout renderer lives there) and tools/rustev-release/ (031, additive: the new source file joins the archive list).

Evidence

  • spec-spine verify 064 passed locally (6 commands: full eval, CLI, surface and conformance suites, clippy -D warnings, seeds 5/5 detected) before the rebase onto current main.
  • make gate passes. Every existing golden, plan golden, schema and binding type is byte-identical.

Generated files under tools/rustev-conformance/cases are checked by the harvest test; review the CLI test that produces them.

Adds the per-case regression clause to rustev.selection-gate/1 over
Rustev-evaluated and host sets, the cases member of rustev.selection/1,
the gate select stdout summary, goldens, one CLI conformance case and
the spec 064 mutation seeds.
Implementation record, verify block, VERIFIED_SPECS and the cli-repeat
acceptance group, the extends edges for Makefile, scripts/acceptance,
rustev-surface and rustev-release, and the archive list entry for the
new eval source file.
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown

AI review (findings)

Review

spec 064 lifecycle transition

The spec changes implementation: pending → complete on an already-approved spec. The lifecycle table puts approved / complete in the settled, non-schedulable state, which is correct for delivered work.

New extends entries — territory claimed post-approval

specs/064-selection-gate-case-regressions/spec.md adds four extends entries that were not present when the spec was first approved:

- { spec: "027-node-and-wasm-bindings", unit: { kind: directory, path: "crates/rustev-surface/" }, nature: amending }
- { spec: "031-public-api-and-release-family", unit: { kind: directory, path: "tools/rustev-release/" }, nature: additive }
- { spec: "001-boundaries-and-authority", unit: { kind: file, path: "Makefile" }, nature: additive }
- { spec: "001-boundaries-and-authority", unit: { kind: directory, path: "scripts/acceptance/" }, nature: additive }

The implementation record itself acknowledges these as additions beyond the original scope: "Two edges beyond those named in section 2." The claim that A-83 covered these territory expansions appears only in the diff and cannot be verified as authority. All four changed files (crates/rustev-surface/src/repeat.rs, tools/rustev-release/archive-policy.json, Makefile, scripts/acceptance/verify.py) require this territory to be properly owned at coupling-gate time, so the extends entries are functionally necessary — the question is whether the original approval granted this scope.

Code correctness

The core evaluation logic is sound:

  • Boundary: exact_sum_cmp([shortest(high)], [shortest(low), exact(limit.by.absolute)]).is_ge() applies the inclusive >= t threshold using the same exact-decimal path that spec 029 uses for not_worse_than. The mutation seed is_ge()→is_gt() correctly guards it.
  • Precedence: failure (regressions.total > at_most) is checked before the first unresolved case, matching the spec's dominance rule. The seed for && cases.unresolved.total == 0 guards this.
  • Double-Option on cases: Option<Option<CaseResults>> with #[serde(default, skip_serializing_if = "Option::is_none", deserialize_with = "read_cases")] correctly distinguishes absent (non-case clause), JSON null (clause blocked before evaluation), and full evidence.
  • stdout summary: stdout_candidates matches clause labels by exact string (format!("{group}[{i}]")), applies the bounded summary only for CaseRegressions clauses, and leaves null values and all other clause types unchanged.
  • Truncation: CaseList::push guarantees list is non-empty whenever total > 0, so cases.unresolved.list.first() correctly reflects total > 0.
  • Ordering check: the case-ID ordering check compares .cases.first() documents only; multiple documents within a side are assumed to have consistent ordering, which the system guarantees upstream.

No high-severity code defects found.

{"head": "4ed9eb79d15f9c496809dac78af3aac83d9657ef", "verdict": "findings", "findings": [{"path": "specs/064-selection-gate-case-regressions/spec.md", "line": 36, "severity": "medium", "category": "authority", "summary": "Four extends entries claiming territory in crates/rustev-surface/, tools/rustev-release/, Makefile, and scripts/acceptance/ are added in this PR to an already-approved spec; the implementation record acknowledges these as 'beyond those named in section 2', and the claim that the original approval (A-83) covered these additional units is in the diff and cannot be verified as authority."}]}

Subject: 3a3c9bb...4ed9eb7, diff digest e9c9df1fba142b74cbc029f457eb8091643352ef01ee876098e4cec2a5e02fde, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus temporarily deployed to statecraft-review-exception November 7, 2026 20:54 — with GitHub Actions Inactive
@bartekus

bartekus commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

Review note: the one finding (authority, the four new extends edges) is not a correctness or security defect.

  • Makefile and scripts/acceptance/ (001, additive): the approved text of section 2 already says these edges "are added by the change that completes this spec", which is this PR. Same pattern as 061 and 063.
  • tools/rustev-release/ (031, additive): required by spec 021 3.5. The new source file crates/rustev-eval/src/selection/case_regressions.rs must join the reviewed archive list or release-checks / archives refuses the package; 061 carries the same edge for the same reason.
  • crates/rustev-surface/ (027, amending): spec 064 3.5.3 requires gate select stdout to print the clause summary, and that stdout is rendered in the shared surface crate the CLI calls. The change there is two call sites switching to rustev_eval::selection::stdout_candidates; every other clause's stdout is byte-identical (R-1, tested by the unchanged CLI goldens).

The implementation record states these edges openly; it does not claim A-83 covered them. The owner's standing approval for the 0.6.0 scope (2026-11-07) covers delivering spec 064 complete, which needs these units. The review's code section found no defects.

@bartekus
bartekus added this pull request to the merge queue Nov 7, 2026
Merged via the queue into main with commit 96dc525 Nov 7, 2026
25 of 26 checks passed
@bartekus
bartekus deleted the impl/064-complete branch November 7, 2026 21:37

This branch was previously deployed

1 inactive deployment
statecraft-review-exception — 4ed9eb79 Deployed Nov 7, 2026 by bartekus via review-exception #3714
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