Skip to content

spec(061): host-scored repeat sets for the selection gate (amends 029 and 041), ratified as recommended (A-77) - #481

Merged
bartekus merged 1 commit into
mainfrom
spec/061-host-scored-repeat-sets
Nov 4, 2026
Merged

bartekus merged 1 commit into
mainfrom
spec/061-host-scored-repeat-sets

Conversation

@bartekus

@bartekus bartekus commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Draft spec 061 (amends 029 and 041), proposed for 0.4.1: a supported path for host-scored runs into rustev gate select.

What it proposes:

  • rustev.host-run/1: one record per host run with host system, flow, flow version and run handles, host dataset id, digest and case count, split, the views and scores digests, and per case outcome, subgroups, latency (microseconds) and cost (declared unit). Unknown values stay unknown, never zero.
  • rustev eval repeat import: verifies views and scores against the records (041 3.7.5 checks), refuses mixed runs, and builds rustev.host-repeat-report/1 with 029's statistics, bootstrap and bands unchanged. Source host, treated statistically as captured; no replay, no run seeds.
  • host/ metrics: answered, abstained, failed and scored rates, host/latency_ms/p0.5 and /p0.95, host/cost_per_1000.
  • rustev.host-baseline/1 via baseline record, reproducibility (exit 13) and gate select over host sets, writing rustev.host-selection/1; clauses, verdicts and exit codes 0, 11 and 12 unchanged.
  • Separate schema names: no existing document changes; mixing host and Rustev-evaluated documents is refused (mixed-provenance). Every figure is labeled host-asserted; no new derivation class.

Owner questions (recommendation first): document names (separate rustev.host-*/1, not rustev.baseline/2); host dataset digest asserted, not verified; held-out host sets unknown until a ledger v2; stable cohorts not required equal for host selection; CLI and library only, Node binding later; latency excludes failed cases.

Draft: nothing to implement until ratified. No extends or establishes edges, so it claims no path; ratification adds edges to crates/rustev-eval/ and crates/rustev-cli/.

Checks: make refresh (new shards committed), make gate passes.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

AI review (findings)

Spec 061 review — specs/061-host-scored-repeat-sets/spec.md

Governance compliance

  • Frontmatter is well-formed: status: draft, implementation: pending, id matches directory name, amends lists 029 and 041 as the contract requires (amending spec, not amended spec). created: "2026-11-03" matches today. No constitution principle is violated.
  • The spec acknowledges it is a draft and makes no code claims, consistent with the contract's lifecycle table.
  • Spec 006 is listed in depends_on but not in amends, even though section 2 explicitly says ratification adds extends edges to crates/rustev-cli/ "(006, amending)" and section 3.2.1 introduces a new CLI subcommand. Under the contract an amends edge belongs in the amending spec's frontmatter, not inferred from extends edges declared later. However, the spec's own framing ("through 029 3.13") could mean it treats the CLI addition as an amendment of 029's claimed command surface rather than 006's directly; I cannot resolve this without the authority graph, so this is noted but not asserted as a violation.

Concrete internal inconsistency

Section 3.3.4 states that "the baseline, the reproducibility check and selection rebuild every host-cases document and the host repeat report from the supplied inputs and refuse any byte difference (reconcile)." Host-cases documents include score metrics — section 3.3.2 is explicit: "Every metric 041 defines from scores (rubric/<name>, model/rubric/<name>, and agreements with human:<scale>) takes its 041 3.11 measure over the answered cases." Computing those score metrics requires the rustev.scores/1 files supplied at import time. Yet section 3.2.5 defines the import output as only five artifact types: repeat-config.json, config.json, run-<r>.host-run.json, run-<r>.cases.json, and repeat.json. Scores files are consumed as inputs and are never written to the output directory. Consequently, the import output alone is insufficient to fully rebuild host-cases documents for the baseline, reproducibility, and selection commands. The "rebuild" claim in 3.3.4 is stronger than the defined output artifacts support. Either the scores files must be included in the import output, or 3.3.4 must be narrowed to clarify that re-assembly reconstructs only the parts derivable from host run records (outcome, latency, cost) and treats stored score values in host-cases as already-verified inputs rather than recomputing them.

No other concrete defects found. Principal-VII (no silent kind conversion), Principal-VIII (unresolved never a default), I-1 provenance separation, I-2 labeling, and I-3 unknown handling are all addressed consistently. The section 5 negative-case table is internally consistent with section 3. The stable-cohort definition, N = 1 band behavior, top_k refusal, held-out unknown, and exit-code reuse are coherent.

{"head": "d4eb64476283436696684f3b24edbd406c478112", "verdict": "findings", "findings": [{"path": "specs/061-host-scored-repeat-sets/spec.md", "line": 181, "summary": "Section 3.3.4 claims re-assembly rebuilds every host-cases document (including score metrics) from the import output, but section 3.2.5 defines that output without the rustev.scores/1 files required to recompute those metrics."}]}

Subject: cfed1e7...d4eb644, diff digest 1e505a8695b1e9b476228befa0936c8f3a24e403ba94e79589a8d54db7547380, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus force-pushed the spec/061-host-scored-repeat-sets branch from d4eb644 to 1e868c9 Compare November 4, 2026 00:29
@bartekus bartekus changed the title spec(061): host-scored repeat sets for the selection gate (amends 029; draft) spec(061): host-scored repeat sets for the selection gate (amends 029 and 041), ratified as recommended (A-77) Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

AI review (no-findings)

Reviewing the two changed files: the A-77 ratification entry in the decisions log and the new spec 061.

docs/decisions/00-founding-decisions.md — A-77

  • Ratification date (2026-11-03), quote ("061 as recommended"), count of open questions (six), release target (0.4.1) and disclaimer ("authorizes no release, tag or publication") are all internally consistent and match the spec's "Decisions at approval" section.
  • The amended specs listed (029 and 041) match the amends frontmatter in the spec.

specs/061-host-scored-repeat-sets/spec.md

  • Lifecycle: status: approved with implementation: pending — correct work-order state per the contract's table.
  • The six decisions numbered in "Decisions at approval" match A-77's claim of six open questions answered as recommended.
  • Cross-spec invariants (I-1 through I-3) each have corresponding observable negative cases in section 5 and mutation seeds in Acceptance — no orphaned invariant or missing negative case.
  • amends lists 029 and 041; extends covers the code units of 004 and 006 with nature: amending; depends_on includes 031 (referenced at 3.6.1 for the incompatible-shape rule). Dependency graph appears complete.
  • Section 3.2.3 (equal flow/flow_version within a single import) vs 3.7.4 (flow/version may differ across baseline and candidates) is intentional and consistent: the observable negative case "Two runs with different flow versions … mixed-runs" applies to intra-import runs, not cross-candidate comparison.
  • host/latency_ms/p<q> names in 3.3.3 match the example gate spelled out in 3.7.6.
  • Re-assembly reference "3.2.5" in 3.3.4 correctly points to paragraph 5 of section 3.2 (the output paragraph describing what the import writes).
  • The circular reference between the decisions file and the spec (references → founding decisions, A-77 → spec 061) is the standard governance pattern.

No concrete defect found.

{"head": "1e868c9397218d2bddd2e983f335a36eb3848ee5", "verdict": "no-findings", "findings": []}

Subject: 983b4ac...1e868c9, diff digest 2e4de64cc3e56d440d8fc8a95c8a833895f60325434e4d1d6cdc1e497916046b, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus had a problem deploying to statecraft-review-exception November 4, 2026 00:41 — with GitHub Actions Error
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

AI review (no-findings)

Reviewing the two changed files: the A-77 decision entry in the founding decisions log and the new spec 061.

A-77 (docs/decisions/00-founding-decisions.md)

The entry records ratification of spec 061 on 2026-11-03 ("061 as recommended") with six open questions answered as recommended. The spec frontmatter (status: approved, implementation: pending, created: "2026-11-03") and the "Decisions at approval" section list exactly six decisions numbered 1–6, each matching A-77's summary word-for-word. The governance status (approved + pending = work order per standards/spec/contract.md) is correct. The disclaimer "ratification authorizes no release, tag or publication" follows the pattern of A-74–A-76.

Spec 061 (specs/061-host-scored-repeat-sets/spec.md)

Internal consistency checks:

  • Frontmatter vs body: amends: [029, 041], extends to crates/rustev-eval/ and crates/rustev-cli/ with nature: amending, and depends_on: [004, 006, 029, 031, 041] all match section 2 (031 is cited in 3.6.1 for the naming decision).
  • Cross-run vs cross-candidate flow version: 3.2.3 requires equal host.flow_version within a single import set; 3.7.4 permits different flow versions across baseline and candidate in selection. These are distinct operations and no contradiction exists.
  • I-3 enforcement: Unknown latency → metric unknown, never skipped (3.3.3); cost_unit null → host/cost_per_1000 unknown (cost-not-declared), never zero (3.3.3, section 5); failed cases excluded from latency but counted, with host/failed_rate as guard (3.3.3).
  • Provenance separation (I-1, I-2): Host schemas (rustev.host-run/1, etc.) are distinct from Rustev schemas; mixed-provenance commands refuse with invalid_input, mixed-provenance before any comparison (3.6.2). Every host document carries assertion: "host" (3.5.3).
  • Section 5 error codes vs spec body: All codes cross-check: host-binding for digest/case-list mismatches (3.2.2), scores-mismatch for the 041 3.7.5 views-binding check (3.2.2), duplicate-run / mixed-runs for repeated host.run handles (3.2.3), top-k-not-observed for non-null top_k (3.4.5), host-ledger-unsupported for final_test held-out clauses (3.8).
  • Governance boundaries: "No new dependency, no I/O in eval, no clock" (section 2, 3.10) respects rustev-core/rustev-contract constraints from AGENTS.md. The crates/rustev-eval/ and crates/rustev-cli/ units are covered by the extends edges.
  • Constitution principle VI ("Proposals, never grants"): Explicitly upheld in section 2.1; host selection is "evidence for the host's choice" (I-1), no host document is accepted as authorization.
  • Mutation seeds: Each is stated from the mutant's-behavior perspective ("a duplicate host.run accepted" means the mutated code wrongly accepts it), which is standard mutation testing format.
  • host/cost_per_1000 formula: 1000 × mean(cost) over all N cases including failed; the name is accurate.
  • Stable cohort (3.4.4): "Cases that are not failed in any run" — explicitly decided as decision 4 (not requiring equal cohorts across baseline/candidate).

No concrete defect found in either file.

{"head": "1e868c9397218d2bddd2e983f335a36eb3848ee5", "verdict": "no-findings", "findings": []}

Subject: 983b4ac...1e868c9, diff digest 2e4de64cc3e56d440d8fc8a95c8a833895f60325434e4d1d6cdc1e497916046b, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus temporarily deployed to statecraft-review-exception November 4, 2026 04:37 — with GitHub Actions Inactive
@bartekus
bartekus added this pull request to the merge queue Nov 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 4, 2026
@bartekus
bartekus added this pull request to the merge queue Nov 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 4, 2026
@bartekus
bartekus added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit 19b9e92 Nov 4, 2026
38 of 39 checks passed
@bartekus
bartekus deleted the spec/061-host-scored-repeat-sets branch November 4, 2026 10:39

This branch was previously deployed

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