Skip to content

spec(065): run integrity failures void the selection comparison instead of rejecting (draft, amends 029 and 061) - #541

Merged
bartekus merged 5 commits into
mainfrom
spec/0538-draft
Nov 7, 2026
Merged

bartekus merged 5 commits into
mainfrom
spec/0538-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-84).

Refs #538

Spec 065 (approved, implementation pending), amending 029 (3.12) and 061 (3.7): an optional integrity precondition in rustev.selection-gate/1, integrity: { max_invalid?, max_upstream_failures? }, counted per run on each side.

  • Invalid results: cases a declared scorer left unscored (largest per-scorer count). Upstream failures: backend_unavailable, invalid_backend_output and deadline_exceeded abstentions plus historical-runtime-failure (Rustev runs); failed cases (host runs).
  • A breach, or a count that cannot be established, is a failed precondition: the candidate is unknown, coverage and clauses are not evaluated, so it is never rejected or qualified on a void run. A baseline run in breach voids every candidate.
  • Within the bounds, coverage minimums still reject as today.
  • Gates without integrity keep their bytes, identities and results; exit codes unchanged under the recommended answer.

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

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:37 — with GitHub Actions Inactive
@bartekus
bartekus temporarily deployed to statecraft-review-exception November 6, 2026 22:38 — with GitHub Actions Inactive
@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: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.

…ad of rejecting (draft, amends 029 and 061)

Proposes spec 065 for release 0.5.1 (#538): an optional integrity precondition in rustev.selection-gate/1, bounds on invalid results and upstream failures per run on each side, whose breach or unestablished count makes the candidate unknown before coverage and clauses are evaluated. It changes no code. Ratification is the owner's act.
Marks spec 065 approved with implementation pending, adds the extends edges its territory named, records every open question as answered as recommended (with a configuration without scorers voiding under max_invalid), and adds decision row A-84.
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.
@bartekus
bartekus marked this pull request as ready for review November 7, 2026 19:57
@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 19:58 — with GitHub Actions Inactive
@bartekus
bartekus marked this pull request as draft November 7, 2026 20:01
@bartekus
bartekus marked this pull request as ready for review November 7, 2026 20:01
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown

AI review (findings)

Reviewing the two changed files: a new entry A-84 in the founding decisions table, and a new spec 065.

A-84 / spec cross-check

Every decision recorded in A-84 traces to a matching spec clause:

  • "breach makes the candidate unknown naming the run, no fourth verdict" → spec 3.3.2, 3.3.5
  • "selection-gate/1 and selection/1 keep their names; integrity written only when declared" → spec 3.6.1, 3.6.2
  • "largest per-scorer unscored count" → spec 3.2.1, 3.2.3
  • "backend_unavailable, invalid_backend_output, deadline_exceeded, historical-runtime-failure; not budget_exhausted" → spec 3.2.2
  • "every host failed case counts" → spec 3.2.4
  • "only failures visible in the outcome key count" → spec 3.2.2 (policy-handled failures excluded)
  • "max_invalid with no declared scorer voids; owner accepted explicitly" → spec 3.2.1 / decisions item 7

All consistent.

Spec lifecycle

status: approved, implementation: pending is a valid work order per the contract table. amends edges for 029 and 061 are in the frontmatter only, not edited into the amended specs — correct per contract.

Internal consistency

Obligation I-1 (void never rejects, never qualifies, never ranks) is correctly enforced by 3.3.2 placing integrity before coverage and clauses. Obligation I-2 (unestablished count voids, never zero) is consistent with 3.2.1–3.2.5. The compatibility guarantee R-1 (no-integrity gate byte-identical) is stated in 3.6.2 and echoed in the acceptance criteria.

One precision issue

Section 3.2.1 (Rustev-evaluated runs) uses scores-missing without a citation — "a declared scorer whose metrics are unknown with scores-missing." The same term in section 3.2.3 (host runs) is explicitly cited as (061 3.2.2). If scores-missing is defined only in spec 061 (host-run context), an implementer of the Rustev-evaluated path has no authoritative definition in scope for what triggers invalid-uncountable on that path. The dependency list includes 041 and 004 but neither is cited at this point.

No security problems, no authority changes, no ratification irregularities found.

{"head": "53d7e1a2d8572f7d1fe8cca249c45ac44e997f61", "verdict": "findings", "findings": [{"path": "specs/065-selection-gate-run-integrity/spec.md", "line": null, "severity": "low", "category": "correctness", "summary": "Section 3.2.1 uses the term `scores-missing` without a cross-reference for the Rustev-evaluated-run case, while the same term in 3.2.3 is cited as `(061 3.2.2)`; if `scores-missing` is defined only in spec 061 (host runs), implementers of the Rustev-evaluated path have no authoritative definition for what state triggers `invalid-uncountable` on that path."}]}

Subject: 6c80dfe...53d7e1a, diff digest a3656204ed869ef4e196d2ef548fab99229730ee0ddfe628e666957c79c75dac, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus temporarily deployed to statecraft-review-exception November 7, 2026 20:05 — 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:

docs/decisions/00-founding-decisions.md — A-84 entry

The entry claims ratification of spec 065 on 2026-11-06 using the same standing owner instruction quoted for A-83 and A-86 ("Consider I ratify and approve anything that's currently in issues/specs/PRs"). The summary accurately reflects the spec content:

  • Verdict: unknown naming the run, no new exit code or status — matches spec 3.3.5 and 3.4.
  • Document versions: rustev.selection-gate/1 and rustev.selection/1 unchanged — matches spec 3.6.
  • Invalid count: largest per-scorer unscored count — matches spec 3.2.1 and 3.2.3.
  • Upstream failures: backend_unavailable, invalid_backend_output, deadline_exceeded, historical-runtime-failure; not budget_exhausted — matches spec 3.2.2.
  • Host failed: every case counts — matches spec 3.2.4.
  • Policy-handled failures excluded — matches spec 3.2.2.
  • max_invalid with no declared scorer voids comparison — matches spec 3.2.1 and decision 7.

No contradiction between A-84 and the spec's body.

specs/065-selection-gate-run-integrity/spec.md

Frontmatter is well-formed: status: approved, implementation: pending (consistent with the contract's "approved + pending = work order" lifecycle). The amends list names 029-evaluation-repeatability and 061-host-scored-repeat-sets, which both exist in the repo context; neither is edited by this PR, as required by the contract ("amended spec.md is not edited to record it").

Obligation anchors resolve correctly to sections in the spec body: I-1 → 3-3-a-breach-voids-the-comparison (section 3.3), I-2 → 3-2-counting (section 3.2), R-1 → 3-6-compatibility (section 3.6).

Internal consistency checks:

  • Section 3.1.2 and negative case table agree that integrity: {} is invalid_input and that absent bounds are not read as 0.
  • Section 3.3.1 and the negative case table agree that a count equal to the bound holds (not a breach).
  • Section 3.3.5 references "029 3.14's exit codes"; exit 12 for unknown is consistent with the negative case table.
  • Section 3.4.1's clause ordering (preconditions → integrity entries → coverage) matches section 3.3.2's evaluation order.
  • The extends edges (004, 006, 027) and depends_on list are consistent with each other and with the territory described in section 2.
  • The deferred extends edges to Makefile and scripts/acceptance/ (001) are explicitly noted as pending the implementing change, not omitted silently.

The derived registry entries for spec 065 are absent from the diff, but .statecraft/derived/ is excluded from AI review and verified by CI tooling per AGENTS.md — not a review finding.

No concrete defects found.

{"head": "331cb86c4f81c8c7220ccc02e6410ca13c82fe48", "verdict": "no-findings", "findings": []}

Subject: 6c80dfe...331cb86, diff digest c79ec55bbf6896c510b6941094c2eef1b064758bab1f9f72a278c9fbebabc7de, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus temporarily deployed to statecraft-review-exception November 7, 2026 20:07 — 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 186dbc9 Nov 7, 2026
26 checks passed
@bartekus
bartekus deleted the spec/0538-draft branch November 7, 2026 20:48

This branch was previously deployed

1 inactive deployment
statecraft-review-exception — 331cb86c Deployed Nov 7, 2026 by bartekus via review-exception #3702
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