Skip to content

spec(064): selection gate clause on per-case regressions against the baseline (draft, amends 029 and 061) - #540

Merged
bartekus merged 4 commits into
mainfrom
spec/0537-draft
Nov 7, 2026
Merged

bartekus merged 4 commits into
mainfrom
spec/0537-draft

Conversation

@bartekus

@bartekus bartekus commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Target: 0.6.0. v0.5.0 is tagged; merge one at a time.

Ratified by the owner on 2026-11-06 (A-83).

Refs #537

Spec 064 (approved, implementation pending), amending 029 (3.12) and 061 (3.7): a case_regressions clause in rustev.selection-gate/1, { metric, case_regressions: { by: { absolute }, at_most } }.

  • A case value is 029 3.3.3's pooled computation restricted to one case, read from the case documents the baseline and candidates already bind (rustev.eval-cases/1, rustev.host-cases/1), so no baseline document changes.
  • A case regresses when worse by at least by in the declared direction, compared in exact decimal as 029 3.12.3 does.
  • A case missing on one side, partial across runs, or unknown makes the clause unknown unless the definite regressions already exceed at_most; never a pass.
  • rustev.selection/1 lists regressing and unresolved cases (at most 10 000 each, with totals).
  • Gates and selections without the clause keep their bytes and identities; no PlanId or golden changes.

Every open question is answered as recommended and recorded in the spec's "Decisions at approval", with decision row A-83.

Spec text and decision row only; no code changes. Ratification adds the extends edges the Territory section names. make gate passes; derived shards refreshed in the same commit.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

AI review skipped: draft

The pull request is a draft.

This pull request was not reviewed by the AI reviewer. A green ci-gate does not say otherwise.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

AI review skipped: draft

The pull request is a draft.

This pull request was not reviewed by the AI reviewer. A green ci-gate does not say otherwise.

@bartekus
bartekus temporarily deployed to statecraft-review-exception November 6, 2026 22:36 — with GitHub Actions Inactive
@bartekus
bartekus temporarily deployed to statecraft-review-exception November 6, 2026 22:39 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown

AI review skipped: draft

The pull request is a draft.

This pull request was not reviewed by the AI reviewer. A green ci-gate does not say otherwise.

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown

AI review skipped: draft

The pull request is a draft.

This pull request was not reviewed by the AI reviewer. A green ci-gate does not say otherwise.

@bartekus
bartekus temporarily deployed to statecraft-review-exception November 7, 2026 02:09 — with GitHub Actions Inactive
…baseline (draft, amends 029 and 061)

Proposes spec 064 for release 0.5.1 (#537): a case_regressions clause in rustev.selection-gate/1 over per-case values the baseline and candidates already bind, with exact decimal boundaries and unknown for missing, partial or unknown case values. It changes no code. Ratification is the owner's act.
Marks spec 064 approved with implementation pending, adds the extends edges its territory named, records every open question as answered as recommended, and adds decision row A-83.
The release carrying specs 064 to 067 is 0.6.0: spec 067's liveRun is a new required Node Engine member, which 031 3.8's npm declaration diff passes only at a breaking position.
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown

AI review (findings)

Reviewing the two changed files: a new ratification row in the founding decisions document and a new spec file for spec 064.

docs/decisions/00-founding-decisions.md

A-83 is inserted between A-82 and A-86 (A-86 was already in the base). The numbering gap to A-84 and A-85 is not visible in the diff context; per the review contract I do not report an absence the evidence does not show. The row is internally consistent with the spec it references.

specs/064-selection-gate-case-regressions/spec.md

The spec is internally coherent. I checked:

  • Lifecycle: status: approved, implementation: pending — a valid work-order state per the contract.
  • amends edges (029, 061) match the title and body text; extends edges to 004, 006, 027 are consistent with the territory described in section 2.
  • Section 3.4.1 logic (fails when R > at_most regardless of U; passes when U = 0 and R ≤ at_most; unknown otherwise) is consistent with observable cases in section 5.
  • The exact-decimal comparison rule in 3.3.2 matches the approach stated in 029 3.12.3 as cited.
  • Constitution principle VI (proposals, never grants) is explicitly upheld in section 2.1 and no authorization value is introduced.
  • Section 2 states "no I/O in eval, no clock" and "no new dependency."

One concrete gap: Section 3.5.1 says "each list is in manifest order and holds at most 10 000 entries; total always states the full count and truncated whether the list is complete" — this applies to both the regressions list and the unresolved list. Section 5's observable negative cases includes a truncation row only for the regressions list ("More than 10 000 regressing cases"). The acceptance criteria anchor "every row of section 5 has a test," so unresolved-list truncation is not explicitly required by the acceptance specification. The word "truncation" appears in the library acceptance list but without disambiguation. This leaves a testing gap for a specified behaviour at spec 064 line ~241 (section 3.5.1) relative to the section 5 table at line ~230.

{"head": "90641e9b708c232da75804cf81fab644650a5181", "verdict": "findings", "findings": [{"path": "specs/064-selection-gate-case-regressions/spec.md", "line": 241, "severity": "low", "category": "correctness", "summary": "Section 3.5.1 specifies that both the regressions list and the unresolved list are capped at 10,000 entries with a `truncated` flag, but section 5 only includes a truncation observable-negative-case row for regressions (> 10,000 regressing cases), not for unresolved cases, so the acceptance criteria ('every row of section 5 has a test') do not require a test for unresolved-list truncation."}]}

Subject: 78dfabd...90641e9, diff digest 58d8773fb14212b665f0170d2918a80eb19bd7d5a8fe12ee0aa1578c8d0a4771, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus temporarily deployed to statecraft-review-exception November 7, 2026 19:11 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown

AI review (no-findings)

Reviewing the two changed files: a new spec 064 and its ratification entry A-83 in the founding decisions table.

A-83 / decisions table

The entry follows the established pattern for blanket ratification (identical phrasing to A-86 already in the base). A-83 is inserted between A-82 and A-86; A-84 and A-85 are absent from the diff context but could exist elsewhere in the file — no defect is shown.

Spec 064 frontmatter and lifecycle

status: approved, implementation: pending is the correct "work order" state per the contract table. amends lists 029 and 061 as required. extends edges to crates/rustev-eval/, crates/rustev-cli/ and tools/rustev-conformance/ are present; the spec explicitly notes that edges for Makefile and scripts/acceptance/ will be added by the implementing change, which is the correct pattern for a pending spec.

Logic review

  • Clause result logic (3.4.1): fail when R > at_most regardless of U; pass only when U = 0 and R ≤ at_most; unknown otherwise. This is internally consistent and matches 029 3.9.2 / 3.12.5 (definite failure dominates).
  • Exact decimal comparison (3.3.2): b and c via Rust {} (shortest round-trip), t as written, difference computed exactly. This matches the stated invariant I-2.
  • Unmeasured-on-both-sides goes to unmeasured count, not unresolved list (3.2.5) — consistent with the output structure in 3.5.1.
  • cases member written only for case_regressions clauses preserves byte-identity of existing selections (R-1, 3.7.1).
  • Refusal inside all_slices with case-regressions-in-slices is in both 3.1.2 and the observable cases table — consistent.
  • at_most range 0–1 000 000 matches the section 5 refusal condition (0 or negative, or above 1 000 000).

Output structure (3.5.1)

The side field in unresolved.list is defined for two categories: cases unresolved on both sides (names baseline) and unpaired cases (measured on one side, unmeasured on the other). For unpaired, naming the unmeasured side is the natural reading and is exercised by the observable case "A case measured by the baseline and unmeasured by the candidate." No ambiguity rises to a defect level given the acceptance criterion requires testing every section 5 row.

Security / boundary

No new I/O, no new dependencies, no external calls, no unsafe. Strictly a computation spec. No security issues found.

No concrete defects in the supplied evidence.

{"head": "114b0845bc5eaeaf75a3b3c84f4cd0dc12fd48d5", "verdict": "no-findings", "findings": []}

Subject: 78dfabd...114b084, diff digest 8a7f953feec50e826c3222d28a439f8bf8d559811eba30ceadbf86f516d925ab, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus temporarily deployed to statecraft-review-exception November 7, 2026 19:16 — with GitHub Actions Inactive
@bartekus
bartekus added this pull request to the merge queue Nov 7, 2026
Merged via the queue into main with commit 6c80dfe Nov 7, 2026
26 checks passed
@bartekus
bartekus deleted the spec/0537-draft branch November 7, 2026 19:55

This branch was previously deployed

1 inactive deployment
statecraft-review-exception — 114b0845 Deployed Nov 7, 2026 by bartekus via review-exception #3690
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