Skip to content

impl(031): increment 2, adoption subsets, MSRV and API compatibility checks - #143

Merged
bartekus merged 1 commit into
mainfrom
impl/031-checks
Oct 21, 2026
Merged

bartekus merged 1 commit into
mainfrom
impl/031-checks

Conversation

@bartekus

@bartekus bartekus commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Spec 031 increment 2: the partial-adoption subsets, MSRV and API-compatibility checks, as repository commands (3.5, 3.6.7, 3.8).

  • tools/rustev-release/adoption.sh (make adoption [subset ...]): each subset is a fresh consumer project outside the workspace (its own empty [workspace], the workspace's Cargo.lock and rust-toolchain.toml copied in) depending on the facade by path with default-features = false and exactly the subset's features (plus rustev-pkg-support-routing for embedded decisions). Its test names every module the subset takes and parses a definition through the facade, and must run and pass (a build alone fails); cargo tree -e normal must contain each chosen crate and none of the omitted ones (tokio and hyper included where omitted). Subsets: documents (no feature), embedded (runtime, rules), evaluation (eval), remote over HTTP (runtime, remote-http), and runtime, rules, remote-http alone. serve, bedrock, typesafe, otel, local-embed print "skipped, not passed" with the reason their crate is not in this release.
  • tools/rustev-release/msrv.sh (make msrv): cargo +<MSRV> test --locked of every release member, the MSRV read by the release policy from the members' rust-version.
  • tools/rustev-release/semver.sh (make semver): for each member, the newest earlier non-yanked version in the crates.io sparse index; with one, cargo semver-checks check-release at the exact pin 0.51.0 (refusing any other version); with none, no-baseline, written as "not applicable, not passed". The npm packages report no-baseline while unpublished and refuse a verdict once published until their declaration diff exists; the service API has no crate in this release. Registry reads only, with a project User-Agent; no credential.
  • Makefile: adoption, msrv, semver.
  • Spec 031: implementation record.

The CI jobs that will run these come in a later workflow change, together with spec 027's bindings job (one statecraft-review-exception approval); this PR changes no workflow.

#142 has merged; this PR is rebased onto main.

Local verification (macOS arm64):

  • make adoption: all 7 subsets pass (normal graphs of 30 to 62 crates), 5 skipped with reasons.
  • make semver: 11 crates and 2 npm packages no-baseline; nothing compared.
  • make msrv: every member builds at 1.88 and its tests started, but this Mac's syspolicyd held the freshly built CLI binaries in _dyld_start for over 20 minutes in rustev-cli's actionability test, so I stopped it; the MSRV test run is not locally verified. The CI job is the verdict.
  • make gate, bash scripts/check-authored-content.sh.

Review round 1 (3 findings, fixed):

  1. The record said the CI jobs "are registered"; no workflow changes here. It now says they will be registered by a later workflow change, with spec 027's bindings job, and that this increment changes no workflow (this body likewise).
  2. semver.sh created a temporary file per crate outside any trap; it now uses one scratch directory removed by an EXIT trap.
  3. adoption.sh matched test result: ok. 1 passed as a regex; it is now a fixed-string match (grep -qF).

Review round 2 (2 findings, both mistaken, answered in the diff):

  1. "process.argv.slice(1) is off by one under node -e." Under -e there is no script path, so the first argument after the program is argv[1]: node -e 'console.log(process.argv.slice(1))' a b prints ["a","b"] (checked on Node 24). A comment at the call now says so, and the local make semver run read the index responses this way.
  2. "The documents subset references rustev::decision_core::compile, which may be feature-gated." It is not: contract and decision_core are the facade's always-present modules (031 3.2.1, #[cfg]-free in lib.rs, checked by tests/public_items.rs), and the documents subset passed locally. A comment in the generator now says so.

Review round 3 (1 finding, the round-2 claim again, made moot): the index file and version now reach the inline script as environment variables (INDEX_FILE, CURRENT) rather than arguments, so no argument indexing remains to dispute. Checked locally on a synthetic index (0.0.9, 0.1.0, yanked 0.0.5, current 0.1.0): it selects 0.0.9.

Review round 4 (3 findings: 2 fixed, 1 answered in the diff):

  1. The consumer ran without --locked. --locked cannot hold for a fresh consumer (the copied lockfile names the workspace's packages, which the consumer's root replaces), so the guarantee is now checked directly: after the build, every registry package in the consumer's lockfile must be at a version the workspace's Cargo.lock pins, or the subset fails naming it. Seeded locally on a copy of the lockfile: identical gives nothing; serde at 9.9.9 is reported.
  2. curl had no timeout; every registry request now has --max-time 60.
  3. "use rustev::contract::Document is unused." It is the trait whose parse the generated test calls (Definition::parse is Document::parse); a comment in the generator now says so.

Review round 5 (1 finding, answered and guarded): "a pre-release family version makes the comparator return NaN." The release policy refuses any family version that is not X.Y.Z (check_set, 021 3.2), so none reaches this script. semver.sh now also refuses a non-X.Y.Z version itself before comparing (checked locally: 0.1.0 accepted, 0.1.0-rc.1 and 1..0 refused).

The previous round's review was cancelled at its time limit; it was rerun once by re-signing the commit.

Review round 6 (4 findings, fixed):

  1. A four-part version passed the shape check; the family version must now have exactly two dots and digits only.
  2. The consumer's edition was hard-coded; it is now the workspace's own edition, read from the root manifest (refusing when absent).
  3. Whether the subset test ran was read from the harness's summary text; the generated test now writes a mark file (RUSTEV_ADOPTION_MARK) and the script checks that file instead.
  4. The pinned cargo-semver-checks was probed only when a baseline existed; it is now required up front on every run (exact version), so a missing or wrong tool is found before the first release needs it. The CI job installs it.

Review round 7 (1 finding, answered and made explicit): "a failing node leaves baseline empty and reads as no-baseline." In POSIX sh an assignment's exit status is its command substitution's, so set -e already stops the script (sh -c 'set -eu; b=$(false); echo reached' prints nothing and exits 1). The lookup now also has an explicit || { ...; exit 1; } naming the crate ("could not read its index response; no verdict"), checked against a non-JSON index file.

Rebased onto main after #142 merged. The round-7 review (on 3451a98) repeated the node substitution finding, which 3305bd4 had already answered with the explicit guard (|| { echo "$name: could not read its index response; no verdict" >&2; exit 1; }); that head's review was cancelled at the time limit, so this push is its rerun.

Review round 8 (3 findings, fixed):

  1. A missing node surfaced as "could not read its index response": semver.sh now checks git, cargo, curl and node on PATH before anything else and names the missing one.
  2. make semver computed the report path with an inline node call, so a missing node gave /semver.txt: the script now defaults the report to semver.txt in the cargo target directory it already resolves, and the Makefile target passes nothing.
  3. adoption.sh ignored an unknown subset name: a requested name that is neither a present nor a skipped subset now exits 2 naming it (checked locally: adoption.sh nosuch gives "no subset named 'nosuch'").

Review round 9 (1 finding, mistaken, answered in the diff): "IFS='|' on read persists into the loop body, so the lists split as one token." A prefix assignment to a regular built-in such as read lasts for that command only (POSIX); sh -c 'printf "a|x y z\n" | while IFS="|" read -r n l; do for c in $l; do echo $c; done; done' prints x, y, z on separate lines (macOS sh and bash). The local adoption run is the same evidence: the embedded subset's chosen-crate check passed over three names, which it could not with | as the separator. A comment at the loop now says so.

Review round 10 (1 finding, fixed): an empty member list from the release policy would have run cargo test over the whole workspace; msrv.sh now refuses an empty package list or MSRV.

Review round 11 (1 finding, fixed): Node's role in semver.sh is now documented where a user meets it: the script's header, the Makefile target's comment and the spec record each state that make semver needs curl, Node 20 or later (to read the index's JSON lines) and the pinned cargo-semver-checks; the script still refuses each by name when missing.

Rebased onto main after #146 (profile revision 17, spec-spine 0.31.0): derived shards regenerated with 0.31.0.

Review round 12 (3 findings, fixed):

  1. The pinned cargo-semver-checks is now checked with the other tools, before anything is built.
  2. Node's version is checked too (20 or later), not only its presence.
  3. Both remote subsets now require tokio in their graph (the remote binding depends on it normally), as the runtime-only subset does.

Review round 13 (1 finding, fixed): the embedded subset (which enables runtime) now also requires tokio in its graph, like every subset that takes the runtime or the remote binding.

Rebased onto main after #145 merged (derived shards only).

@github-actions

Copy link
Copy Markdown

AI review (findings)

Reviewing the three new shell scripts and the Makefile and spec additions.


specs/031-public-api-and-release-family/spec.md — CI registration claim vs. diff contents

The increment-2 paragraph ends with: "The CI jobs that run these are registered with spec 027's bindings job." That sentence is written in the present tense as if the registration is included in this increment. No workflow file is changed in this PR (.github/workflows/statecraft-ci.yml and friends are all absent from the diff). The spec text overstates what this PR delivers.


tools/rustev-release/semver.sh — temp-file leak on error paths

body=$(mktemp) is called inside the for name in ... loop (line 41) but there is no trap to clean it up. The two explicit rm -f "$body" calls cover the 404 and the baseline-found-then-checked paths, but several error exits do not:

  • the * branch (echo … exit 1) removes $body before exiting — OK.
  • after the 200 branch, if the node command fails (node not installed, parse error), set -e kills the script and $body is never removed.
  • similarly, cargo semver-checks failure exits via set -e after rm -f "$body" has already been called, so that one is safe; but the node failure case is not.

A trap 'rm -f "$body"' EXIT scoped around each loop iteration, or a single top-level temp-dir approach, would fix this.


tools/rustev-release/adoption.sh line 92 — unescaped . in grep pattern

printf '%s\n' "$result" | grep -q 'test result: ok. 1 passed'

The . is a regex metacharacter that matches any character, not a literal period. The correct form is grep -qF 'test result: ok. 1 passed' (fixed-string) or grep -q 'test result: ok\. 1 passed'. In practice the pattern still matches because no other character naturally appears there in cargo's output, but it is technically wrong and would silently pass for a malformed line like test result: okX 1 passed.


{"head": "2508c35aab17b95546d0a5987b179d4d7e899ce6", "verdict": "findings", "findings": [{"path": "specs/031-public-api-and-release-family/spec.md", "line": 695, "summary": "Increment 2 states CI jobs 'are registered' with spec 027's bindings job, but no workflow file is changed in this PR, making the claim inaccurate."}, {"path": "tools/rustev-release/semver.sh", "line": 41, "summary": "mktemp body file created inside the loop is not covered by a trap; a node or network failure after the HTTP 200 branch leaks the temp file."}, {"path": "tools/rustev-release/adoption.sh", "line": 92, "summary": "grep pattern 'test result: ok. 1 passed' uses an unescaped regex dot instead of a literal period; should use grep -qF or escape the dot."}]}

Subject: 26382b2...2508c35, diff digest f753114082542abf7099646b4b4d648b6e08c44315a4675503615f3597dcff14, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus had a problem deploying to statecraft-review-exception October 21, 2026 13:02 — with GitHub Actions Error
@github-actions

Copy link
Copy Markdown

AI review (findings)

Looking at the three new shell scripts and the Makefile additions.

tools/rustev-release/semver.sh line 56 — wrong process.argv offset

The baseline-finding Node.js snippet is invoked as:

baseline=$(node -e '
    const [file, current] = process.argv.slice(1);
    ...
' "$body" "$version")

When Node.js is run with -e, process.argv[1] is set to an empty string (or '[eval]' in some versions), not to the first user-supplied argument. process.argv.slice(1) therefore assigns file = '' and current = $body (the index file path), leaving $version uncaptured. The subsequent readFileSync(file, "utf8") call on an empty or '[eval]' path throws ENOENT and the entire semver script fails for every package that has a crates.io entry. The fix is process.argv.slice(2).

tools/rustev-release/adoption.sh line 62 — unconditional decision_core::compile reference in the featureless subset

Every generated test file (for every subset) unconditionally emits:

printf '    let _ = rustev::decision_core::compile;\n'

The documents subset is defined with no features (features = []). If decision_core is re-exported from the rustev facade only behind a feature gate (e.g. runtime), the documents subset test will fail to compile, contradicting its purpose of verifying a zero-feature consumer.

{"head": "0d6bda0179b19607f88a91398565057e877a0498", "verdict": "findings", "findings": [{"path": "tools/rustev-release/semver.sh", "line": 56, "summary": "process.argv.slice(1) is off-by-one when node is invoked with -e: argv[1] is empty/[eval], so `file` gets the wrong value and readFileSync throws, breaking baseline lookup for every package."}, {"path": "tools/rustev-release/adoption.sh", "line": 62, "summary": "The generated test unconditionally references rustev::decision_core::compile even for the `documents` subset which declares features=[], causing a compile failure if that symbol is feature-gated in the facade."}]}

Subject: 26382b2...0d6bda0, diff digest 94d3281db8757fa1553a18278482bc391da6389c2a4a4b6f8b5df157e847ce16, 1 call(s). An AI comment is not an approval.

@github-actions

Copy link
Copy Markdown

AI review (findings)

Looking at the three new shell scripts and the Makefile changes.

tools/rustev-release/semver.sh, line 53

The inline node -e script destructures positional arguments as:

const [file, current] = process.argv.slice(1);

In Node.js 12+ (and documented since Node.js 4), when the interpreter is started with -e, process.argv[1] is an empty string (no script file). So process.argv.slice(1) produces ['', body_file, version], making file = '' and current = body_file. The subsequent require("fs").readFileSync(file, "utf8") call then throws ENOENT: no such file or directory, open '' — meaning semver.sh will crash the moment it finds a crate with an earlier baseline on crates.io. The fix is process.argv.slice(2).

The comment on the line tries to explain the intent (node -e '...' a b gives argv.slice(1) = [a, b]) but that assumption reflects pre-12 Node.js behavior.

Everything else looks correct: the crates.io sparse-index path layout (index_path()), the npm URL encoding (sed 's|/|%2f|'), the NDJSON parsing and semver comparison in the node script, the trap-based scratch cleanup, and the cargo-semver-checks pin check. The adoption.sh subshell exit-code propagation via set -e and echo "$subsets" | while is fine because the while-loop subshell's exit code becomes the pipeline's exit code, which the parent shell with set -e observes. The msrv.sh intentional unquoted $packages (for -p splitting) is properly suppressed with a shellcheck disable.

{"head": "b959ac9035834e02844a1538b5e989db26db7b02", "verdict": "findings", "findings": [{"path": "tools/rustev-release/semver.sh", "line": 53, "summary": "process.argv.slice(1) gives ['', body_file, version] under node -e in Node.js 12+, so `file` is assigned the empty string and readFileSync throws ENOENT whenever a crate has a prior release; must be process.argv.slice(2)."}]}

Subject: 26382b2...b959ac9, diff digest cdbfbc52fdb5d4a3b8b3a2964c5e81641964b52a057090435412bc3ca46dcf2c, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus had a problem deploying to statecraft-review-exception October 21, 2026 13:34 — with GitHub Actions Error
@github-actions

Copy link
Copy Markdown

AI review (findings)

Reviewing the three new shell scripts and the Makefile change for bugs, security problems, and inconsistencies.

adoption.sh

The script copies the workspace Cargo.lock into each consumer project with the stated intent that "the consumer resolves the reviewed versions," but neither the cargo test call nor the cargo tree call passes --locked (lines ~86 and ~91). Without --locked, Cargo may silently regenerate the lockfile when the fresh consumer's Cargo.toml doesn't match every entry, resolving different transitive dependency versions than the workspace uses. The fix is to pass --locked to both invocations.

The generated test unconditionally emits use rustev::contract::Document; (in the printf block around line 55) but Document is never referenced in the test body. This produces an unused-import warning in every consumer build. It's benign unless a consumer project enables -D warnings, but it's extraneous.

semver.sh

Both curl calls — the crates.io sparse-index fetch and the npm registry probe — carry no timeout flag (-m/--max-time). If either registry is slow or unreachable, the CI job hangs indefinitely until the runner's global timeout fires. Adding -m 30 (or similar) to both calls is the fix.

Makefile

The semver: target pipes cargo metadata through Node.js solely to extract target_directory. Node is already a repo dependency (conformance suite), so this isn't a blocker, but it's worth noting as an implicit requirement for make semver.

No credential exposure, no injection paths, and the crates.io index_path layout implementation is correct.

{"head": "5c58688d4fddf7c8e569d6114827dbced191278e", "verdict": "findings", "findings": [{"path": "tools/rustev-release/adoption.sh", "line": 86, "summary": "cargo test and cargo tree lack --locked, so Cargo may silently regenerate the copied lockfile and resolve different dependency versions than the workspace uses, defeating the stated 'reviewed versions' guarantee."}, {"path": "tools/rustev-release/semver.sh", "line": 46, "summary": "curl calls to both crates.io and npm carry no timeout flag (-m/--max-time), so an unresponsive registry will hang the CI job indefinitely."}, {"path": "tools/rustev-release/adoption.sh", "line": 55, "summary": "The generated test unconditionally emits 'use rustev::contract::Document;' but Document is never referenced in the test body, producing an unused-import warning in every consumer build."}]}

Subject: 26382b2...5c58688, diff digest c89f95edb894d6ed81a97c3e09ad8fe9d4466c2af81b8b0a9b76c80148e4085a, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus had a problem deploying to statecraft-review-exception October 21, 2026 13:41 — with GitHub Actions Error
@bartekus
bartekus force-pushed the impl/031-checks branch 2 times, most recently from f6a22ef to 37f0d57 Compare October 21, 2026 14:25
@github-actions

Copy link
Copy Markdown

AI review (findings)

Reviewing the three new shell scripts and Makefile additions.

tools/rustev-release/semver.sh

The Node.js version comparator at the core of baseline selection:

const cmp = (a, b) => { const x = a.split(".").map(Number), y = b.split(".").map(Number);
  for (let i = 0; i < 3; i++) if (x[i] !== y[i]) return x[i] - y[i]; return 0; };

b is process.env.CURRENT, sourced from "$release" field version. If version ever carries a pre-release suffix (e.g. 1.0.0-rc.1), "0-rc".split(".") gives ["0-rc"] and Number("0-rc") is NaN. Every comparison x[i] !== NaN is true (NaN is not equal to anything), so cmp returns NaN. Then cmp(e.vers, current) < 0 evaluates NaN < 0 → false for every index entry. The .sort(cmp) call also misbehaves because Array.sort requires a consistent comparator. Net result: vs is always empty, vs.pop() is undefined, and the script silently emits no-baseline for all crates even when a real baseline exists.

tools/rustev-release/adoption.sh

The lockfile-drift awk script (line ~80–97) processes $3 from Cargo.lock TOML lines, so names and versions are captured with their surrounding double-quote characters (e.g. n = '"foo"'). The drift key is therefore '"foo" "1.0.0"'. split(k, a, " ") splits on the literal space between "foo" and "1.0.0", giving a[1] = '"foo"' and a[2] = '"1.0.0"'. Both the pinned array and the used array use the same quoted form, so the lookup is internally consistent and the logic is correct — this is not a bug, just worth noting the implicit quoting.

The edition = "2024" baked into the generated Cargo.toml (line ~51) requires Rust ≥ 1.85. The workspace rust-toolchain.toml is copied to each consumer project, so this is safe as long as the workspace pin is ≥ 1.85; if the workspace ever downgrades, the adoption projects will fail to compile with a confusing error.

The while IFS='|' read … done loop runs in a pipeline subshell; exit 1 inside exits the subshell, and set -e in the outer shell sees the non-zero pipeline result and exits. The outer trap 'rm -rf "$work"' EXIT fires correctly. This pattern is sound for sh.

Makefile

The semver target constructs the report path with node -pe 'JSON.parse(require("fs").readFileSync(0)).target_directory' reading from stdin. This works but silently fails if node is absent, giving a confusing "command not found" error rather than a clear dependency message.

{"head": "37f0d57fd2daf8e559ea5e83f5a3449e0d32aae6", "verdict": "findings", "findings": [{"path": "tools/rustev-release/semver.sh", "line": 54, "summary": "The Node.js cmp() comparator returns NaN when CURRENT ($version) contains a pre-release suffix, making cmp(e.vers, current) < 0 always false and causing every crate to report no-baseline even when a real earlier release exists on crates.io."}]}

Subject: 26382b2...37f0d57, diff digest b89ef437fd4a8177896ee80f440b492dfe426430fe6cf327115b5a038db131f6, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus had a problem deploying to statecraft-review-exception October 21, 2026 14:30 — with GitHub Actions Error
@github-actions

Copy link
Copy Markdown

AI review (findings)

Reviewing the three new shell scripts and the Makefile additions for logic bugs, robustness, and security issues.


tools/rustev-release/semver.sh — version format validation (lines 27–32)

The shell pattern:

case $version in
  *[!0-9.]* | .* | *. | *..*)

rejects non-digit/dot chars, leading/trailing dots, and consecutive dots, but it does not reject a four-segment version like 1.2.3.4. The node comparison function at line 73 only looks at the first three .-split components:

const cmp = (a, b) => { const x = a.split(".").map(Number), y = b.split(".").map(Number);
  for (let i = 0; i < 3; i++) if (x[i] !== y[i]) return x[i] - y[i]; return 0; };

A current of 1.2.3.4 and a crates.io entry of 1.2.3 would give cmp("1.2.3","1.2.3.4") == 0, so 1.2.3 would be excluded from baseline candidates and the crate would incorrectly report no-baseline. The release policy only allows X.Y.Z, so this is low-risk in practice, but the defensive check is incomplete.


tools/rustev-release/adoption.sh — hardcoded edition = "2024" (line 55)

printf '[package]\nname = "rustev-adoption-%s"\nversion = "0.0.0"\nedition = "2024"\npublish = false\n\n' "$name"

edition = "2024" requires rustc ≥ 1.85. The script copies rust-toolchain.toml from the workspace, so the toolchain used is consistent with the workspace. If the workspace ever pins a toolchain below 1.85, all subset checks fail with an opaque "unknown edition" compiler error rather than a clear diagnostic. The edition used by the consumer projects should derive from the workspace edition, not be hardcoded to 2024.


tools/rustev-release/adoption.sh — brittle test-pass sentinel check (line 83)

printf '%s\n' "$result" | grep -qF 'test result: ok. 1 passed' || {

This checks the exact human-readable summary line emitted by Rust's built-in test harness. Rust's test output format is not a stable API; future compiler/harness versions could reword this line (e.g. changing punctuation, adding fields) and cause the subset check to report a false failure even when the test passed. The correct gate is the exit code of cargo test, which is already checked by if ! result=$(... cargo test ... 2>&1). The secondary string-grep guard is fragile and redundant.


tools/rustev-release/adoption.sh — cargo semver-checks version probe inside inner loop (semver.sh line 87)

have=$(cargo semver-checks --version 2>/dev/null || true)
if [ "$have" != "cargo-semver-checks $PIN" ]; then

This check runs on every iteration of the package loop where a baseline exists, and it's suppressed (|| true) when the tool is absent. If the tool is absent and all packages happen to have no baseline, the missing-tool condition is silently skipped rather than flagged. Moving the check before the loop (and failing immediately when the tool is wrong) would make CI failures deterministic and faster.


{"head": "8840641ef1b59b40b2e2de3f24d1cc3a1b94e654", "verdict": "findings", "findings": [{"path": "tools/rustev-release/semver.sh", "line": 27, "summary": "Version format validation does not reject four-segment versions like 1.2.3.4; the JS comparison only checks three segments so 1.2.3 would compare equal to 1.2.3.4 and no baseline would be found even if one exists."}, {"path": "tools/rustev-release/adoption.sh", "line": 55, "summary": "edition = \"2024\" is hardcoded in generated consumer Cargo.toml; if the workspace toolchain ever falls below Rust 1.85 all subset checks fail with an opaque compiler error rather than a clear diagnostic."}, {"path": "tools/rustev-release/adoption.sh", "line": 83, "summary": "Subset pass is gated on the human-readable string 'test result: ok. 1 passed' which is not a stable Rust test harness API and will produce a false failure if the output format changes in a future toolchain."}, {"path": "tools/rustev-release/semver.sh", "line": 87, "summary": "cargo-semver-checks version probe runs inside the package loop with the missing-tool path silenced via '|| true'; if no package has a baseline, an absent or wrong-version tool goes undetected."}]}

Subject: 26382b2...8840641, diff digest 7e0e64ea9b9d840f852587590a826bb4e812948983d331339a0cf0a879e4d6d9, 1 call(s). An AI comment is not an approval.

@github-actions

Copy link
Copy Markdown

AI review (findings)

Reviewing the three new scripts and the Makefile additions.


adoption.sh

The pipe-into-while subshell pattern (echo "$subsets" | while ... done) runs the loop body in a subshell; exit 1 inside exits only that subshell. With set -e in the parent, the pipeline's non-zero exit code does propagate correctly and the parent's EXIT trap fires for cleanup — so this works, but it is the only error propagation mechanism.

The awk drift-check reads TOML fields as raw $3 tokens (including TOML quotes: "foo"). Because both files are parsed with the same pattern, the quotes are consistently present in both pinned[name] keys and used[name version] keys, so the comparison is internally consistent.

The feats construction for an empty features list correctly produces "", which makes features = [] in the generated TOML — valid.

The selected() function uses word-boundary grep (" $1 "), so remote-http and remote-http-alone are correctly distinguished.


msrv.sh

No issues found. Leading-space in packages ( -p foo -p bar) is harmless under POSIX word-splitting.


semver.sh — real bug

baseline=$(INDEX_FILE="$body" CURRENT="$version" node -e '...')
if [ -z "$baseline" ]; then
    echo "$name: no-baseline: ..."
    continue
fi

If node exits non-zero (e.g., a malformed index line causes JSON.parse(l) to throw an unhandled exception), the command substitution inside an assignment does not trigger set -e in POSIX sh / bash — this is a well-known exception to errexit. baseline is silently set to "", the script falls into the no-baseline branch, and the node error message appears on stderr while the script continues and ultimately exits 0. A bad response from the sparse index is therefore falsely reported as "not applicable / no prior release" rather than as a tool error.

The fix is a guard after the substitution, e.g.:

baseline=$(INDEX_FILE="$body" CURRENT="$version" node -e '...') || {
    echo "$name: node failed while computing baseline" >&2; exit 1
}

Makefile

The inline node -pe 'JSON.parse(require("fs").readFileSync(0)).target_directory' in the semver recipe correctly reads cargo-metadata JSON from stdin and extracts target_directory. No issue.


{"head": "3451a987c157e257ec24d73a23a5d7510ea880ca", "verdict": "findings", "findings": [{"path": "tools/rustev-release/semver.sh", "line": 82, "summary": "If `node` exits non-zero during baseline lookup, the command-substitution assignment silently sets `baseline` to empty (POSIX/bash `set -e` does not fire on substitution failures inside assignments), causing a corrupt sparse-index response or a Node exception to be misreported as a valid `no-baseline` result instead of aborting the check."}]}

Subject: 26382b2...3451a98, diff digest fbb9e8407fa438bc1ef481f9851732537f7b254b1cd3c226124359f5d97ed5d4, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus had a problem deploying to statecraft-review-exception October 21, 2026 15:31 — with GitHub Actions Error
Base automatically changed from impl/031-facade to main October 21, 2026 16:32
@github-actions

Copy link
Copy Markdown

AI review (findings)

Reviewing the three new shell scripts and Makefile changes.

tools/rustev-release/semver.sh

The node -e invocation used to extract the baseline version from the crates.io sparse index response (around line 81) is wrapped in || { echo "$name: could not read its index response; no verdict" >&2; exit 1; }. If node is not installed, the command fails with exit 127 and the handler fires, but the printed message blames the index response rather than the missing tool. The root cause is obscured. The script explicitly checks for cargo semver-checks before use but applies no equivalent guard to node, making the error handling inconsistent and the diagnostic misleading in a bare CI image.

Makefile — semver target

The report path is computed inline via node -pe 'JSON.parse(require("fs").readFileSync(0)).target_directory'. If node is absent the command substitution returns empty, the argument becomes the bare string /semver.txt, and semver.sh fails on > "$report" with a permission-denied error that has nothing to do with the real problem.

tools/rustev-release/adoption.sh — unknown subset names

selected() checks whether a name appears in the space-separated $want argument. If the caller passes a name that appears in neither $subsets nor $skipped (e.g. a typo), the outer while loop skips it silently and both loops exit 0. The script gives no warning that the requested subset was unrecognised; silent success on invalid input can hide mistakes in CI scripting.

tools/rustev-release/adoption.sh — awk drift check

The awk reads $3 from Cargo.lock lines like name = "tokio", capturing the value with its surrounding TOML double-quotes (e.g. "tokio"). Keys are constructed as n " " v (e.g. "tokio" "1.28.0") and later recovered with split(k, a, " "). This is internally consistent and works, but if cargo ever changes the lock-file encoding (TOML inline tables, extra whitespace) the values captured in n and v change silently, causing the drift check to false-pass. The approach is fragile enough to warrant a comment, and split with a literal-space separator on a key that embeds literal quote characters is easy to misread as a bug.

{"head": "6fe78e7140b64eb4c91e2377b76440c4bcacb5db", "verdict": "findings", "findings": [{"path": "tools/rustev-release/semver.sh", "line": 83, "summary": "When `node` is not installed the error handler prints 'could not read its index response' rather than the real cause (missing tool), obscuring diagnostics; `node` is never checked upfront the way `cargo semver-checks` is."}, {"path": "Makefile", "line": 80, "summary": "If `node` is absent the inline command substitution that computes the report path returns empty, making the argument to semver.sh the bare path `/semver.txt` and producing a misleading permission-denied failure."}, {"path": "tools/rustev-release/adoption.sh", "line": 46, "summary": "A subset name passed by the caller that matches neither the active subsets nor the skipped list is silently ignored and the script exits 0, hiding typos or stale names in CI invocations."}]}

Subject: 541f3ca...6fe78e7, diff digest 772dc07d69731e75c8dd80cb208acd1f99f168a08ca1e12d9ceaab2d236ddf3c, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus had a problem deploying to statecraft-review-exception October 21, 2026 17:24 — with GitHub Actions Error
@bartekus
bartekus had a problem deploying to statecraft-review-exception October 21, 2026 17:40 — with GitHub Actions Error
@bartekus
bartekus force-pushed the impl/031-checks branch 2 times, most recently from 51447a9 to f86875c Compare October 21, 2026 17:41
@github-actions

Copy link
Copy Markdown

AI review (findings)

Reviewing the three new shell scripts and the Makefile/spec additions.

adoption.sh

The while IFS='|' read -r loops run in pipeline subshells; exit 1 exits the subshell, not the parent directly. With set -eu the pipeline's non-zero exit does propagate to the parent, so behaviour is correct, but it is subtle and shell-implementation-dependent.

The awk drift-check (lines 123-132) correctly handles TOML-quoted crate names because both lockfiles use the same quoting, so $3 in both files carries identical surrounding double-quotes.

cargo tree --format '{p}' outputs name vX.Y.Z; awk '{print $1}' correctly strips the version, so the $chosen/$omitted membership checks are sound.

The IFS='|' prefix assignment to read is a POSIX per-command assignment: inside the loop body IFS is restored to default, so for c in $chosen word-splits on spaces as intended — confirmed by the inline comment.

msrv.sh

The packages variable is built with a leading space ( -p foo -p bar). Word-splitting by the unquoted $packages in cargo "+$msrv" test --locked $packages silently discards that leading space, so the command is correct. The empty-package guard prevents cargo from testing the whole workspace.

semver.sh

index_path correctly implements the crates.io sparse-index layout (1-char, 2-char, 3-char, 4+-char buckets).

The Node.js inline script correctly uses newline-delimited JSON from the sparse index, and ?? (nullish coalescing) requires Node.js ≥ 14, which is ubiquitous in 2026.

The one real finding: semver.sh requires node on PATH (line 17 check, line 80-91 usage), but neither the spec addition, the Makefile target comment, nor the script's own top-of-file doc comment mentions this dependency. The spec text describes the tool only in terms of cargo semver-checks and reading the sparse index. When someone runs make semver without Node.js the error is clear (semver.sh needs node on PATH), but the requirement is invisible until that point. All other external tools (git, cargo, curl, cargo-semver-checks) are either obvious from context or explicitly documented.

{"head": "f86875ce30bc2e9e398b8ae948e81a96424d5af4", "verdict": "findings", "findings": [{"path": "tools/rustev-release/semver.sh", "line": 17, "summary": "Node.js is a hard runtime dependency (needed to parse the JSON sparse-index response) but is undocumented in the spec, the Makefile comment, and the script's own header; the requirement is only discovered at runtime when the tool check fires."}]}

Subject: 541f3ca...f86875c, diff digest 9443606928c0bb2fa72f1e92cb4b3d5e7ea522ba6f064d6b4e96a3e28436b667, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus had a problem deploying to statecraft-review-exception October 21, 2026 17:48 — with GitHub Actions Error
@bartekus
bartekus force-pushed the impl/031-checks branch 2 times, most recently from f98ebd1 to 8ba58f9 Compare October 21, 2026 18:11
@github-actions

Copy link
Copy Markdown

AI review (findings)

I reviewed the Makefile, spec increment text, and all three new scripts. Here are my findings.

semver.sh — cargo-semver-checks absent from upfront tool check loop

The spec text added in this PR states: "curl, Node 20 or later to read the index's JSON lines, and the pinned checker, each refused by name when missing." The script checks git, cargo, curl, and node in the upfront loop (lines 18–21), but cargo-semver-checks is validated only at lines 34–38, after cargo build and cargo run have already run. A user without the pinned tool installed will wait through a full workspace build before receiving the named refusal. This contradicts the spec's explicit "each refused by name" guarantee and is inconsistent with how the other tools are handled.

semver.sh — Node version not verified against the stated minimum

Both the inline comment (line 14) and the spec text say "Node 20 or later." The upfront check (line 19) only tests that node exists on PATH; it does not check node --version against 20. The Node script uses ?? (nullish-coalescing, available since Node 14) and otherwise only uses stable APIs that predate Node 20, so an older Node will silently succeed where the spec requires a refusal.

adoption.sh — remote-http subset omits tokio from its chosen list inconsistently with the runtime subset

The runtime subset (runtime|runtime||rustev-runtime tokio|…) explicitly places tokio in its chosen crates, reflecting that rustev-runtime pulls in tokio. The remote-http subset (remote-http|runtime remote-http||rustev-runtime rustev-remote-http hyper|rustev-eval rustev-backend-rules) also enables the runtime feature and therefore rustev-runtime, but tokio appears in neither chosen nor omitted. The graph check therefore never verifies tokio's presence for this subset, leaving the adoption verification incomplete for the same crate that is positively asserted in the sibling subset.

{"head": "8ba58f960c6a5911ba2c445b15a19c18bfe059fa", "verdict": "findings", "findings": [{"path": "tools/rustev-release/semver.sh", "line": 18, "summary": "cargo-semver-checks is not included in the upfront tool-existence loop, so a missing pinned checker is only discovered after cargo build and cargo run complete, violating the spec's 'each refused by name when missing' requirement."}, {"path": "tools/rustev-release/semver.sh", "line": 19, "summary": "Only the presence of 'node' is checked, not that its version meets the Node 20 minimum required by both the spec text and the inline comment."}, {"path": "tools/rustev-release/adoption.sh", "line": 33, "summary": "The remote-http subset enables the runtime feature (which carries tokio) but places tokio in neither chosen nor omitted, leaving the graph check incomplete relative to the runtime-only subset which does verify tokio's presence."}]}

Subject: 1204bc8...8ba58f9, diff digest e6fd8240ae2f9dcfb90e01056b63492d5da8a27e876d11a163dd5c9fa4e79047, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus had a problem deploying to statecraft-review-exception October 21, 2026 18:17 — with GitHub Actions Error
@github-actions

Copy link
Copy Markdown

AI review (findings)

I'll review the three shell scripts and the spec update for bugs, security issues, and inconsistencies.

Reviewing tools/rustev-release/adoption.sh

Subset table (lines 23–31) defines chosen and omitted crate sets. The runtime subset (line 29) uses the runtime feature and explicitly lists tokio as a chosen crate that must appear in the normal dependency graph:

runtime|runtime||rustev-runtime tokio|rustev-eval rustev-backend-rules rustev-remote-http hyper

The embedded subset (line 26) also enables the runtime feature, so the same tokio dependency must be present, but tokio appears in neither its chosen nor its omitted list:

embedded|runtime rules|rustev-pkg-support-routing|rustev-runtime rustev-backend-rules rustev-pkg-support-routing|rustev-eval rustev-remote-http hyper

Consequence: the boundary check for the embedded subset never verifies that tokio is in the graph. If a cargo-feature reorganisation were to accidentally drop tokio from the embedded transitive closure, the runtime subset would catch it but the embedded subset would silently pass — defeating the purpose of the per-subset graph check.

The same gap exists for remote-http (line 27), which combines runtime and remote-http features: tokio does appear in its chosen list, showing the author knew runtime brings tokio. The omission in embedded is inconsistent with that.

tools/rustev-release/msrv.sh and tools/rustev-release/semver.sh — no defects found. The set -eu propagation through echo … | while works correctly via pipeline exit status. The AWK lockfile-drift detection is internally consistent with quoted TOML values. The Node.js semver comparison and index_path() implementation are correct. The pinned-version guard and missing-tool checks are correctly ordered.

specs/031-public-api-and-release-family/spec.md and Makefile — consistent with the scripts.

{"head": "2434e4984d21bc5c064588ef082b73ace338de82", "verdict": "findings", "findings": [{"path": "tools/rustev-release/adoption.sh", "line": 26, "summary": "The `embedded` subset enables the `runtime` feature but omits `tokio` from its `chosen` crates list, so the graph-boundary check never verifies `tokio` is present, inconsistent with the `runtime` subset (line 29) which lists `tokio` as a required chosen crate for the same feature."}]}

Subject: 1204bc8...2434e49, diff digest 4f6ed5f07f925e41eed029b9fd33e0717f80f0d5a3502ed596890841b6ed4192, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus had a problem deploying to statecraft-review-exception October 21, 2026 18:24 — with GitHub Actions Error
@github-actions

Copy link
Copy Markdown

AI review (no-findings)

I reviewed the Makefile additions, spec increment 2 text, and the three new shell scripts.

Makefile — The three new targets (adoption, msrv, semver) are added to .PHONY and each delegates to the correct script. No issue.

specs/031-public-api-and-release-family/spec.md — The increment 2 paragraph accurately describes what the scripts implement: subset checks, MSRV check, semver check with no-baseline semantics, npm no-baseline handling, and the deferral of CI workflow registration. Spec text and implementation are consistent.

tools/rustev-release/adoption.sh — Examined in detail:

  • IFS='|' read prefix correctly splits pipe-delimited records; the note about it not persisting is accurate.
  • for f in $features and for c in $chosen/$omitted word-split correctly after IFS reverts to default.
  • The feats awk produces correct TOML array content, including the empty-features case (features = []).
  • The pipe-into-while subshell: exit 1 inside exits the subshell, making the pipeline return 1; set -e propagates this to abort the parent script. Correct.
  • The drift awk: FNR==1 { file++ } increments correctly for two files; the workspace lockfile goes to pinned, the consumer lockfile to used; the index(... " ", " " a[2] " ") sentinel-space trick prevents false substring matches. Correct.
  • cargo tree --format '{p}' | awk '{print $1}' extracts bare crate names for grep -qx. Correct.
  • Lockfile copy + manual drift check is an intentional substitute for --locked. Documented and sound.
  • RUSTEV_ADOPTION_MARK env var passes through cargo test to the test process; mark-file check confirms the test body actually ran.
  • Temp directory cleanup via trap 'rm -rf "$work"' EXIT is correct.

tools/rustev-release/msrv.sh — Short and clean. Guards against an empty package list before expanding $packages unquoted into the cargo invocation (crate names contain no spaces). unset CARGO_BUILD_TARGET prevents cross-compile contamination. Correct.

tools/rustev-release/semver.sh — Examined in detail:

  • All four tool pre-checks (git, cargo, curl, node) run before any work.
  • Node version check: Number(process.versions.node.split(".")[0]) >= 20 is correct.
  • cargo semver-checks --version string comparison is exact and intentional.
  • index_path(): lengths 1/2/3/4+ match crates.io sparse index layout. Correct.
  • Node script uses JSON.parse (not eval) on the index body; accesses only e.yanked and e.vers; filters on /^\d+\.\d+\.\d+$/ before Number() conversion, so no NaN in cmp. vs.sort(cmp).pop() picks the highest version below current. Correct.
  • npm 404 → no-baseline; 200 → error exit (refuses verdict until declaration diff is implemented). Matches spec.
  • sed 's|/|%2f|' for scoped package URL encoding is accepted by the npm registry. Correct.
  • Scratch directory cleaned via trap 'rm -rf "$scratch"' EXIT. Correct.

No concrete defects found.

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

Subject: 1204bc8...da2933e, diff digest 2bada3d0c01d3f1c189bb9e1f05a9d68f01ad5a246faebcbb735351f7cf0d24a, 1 call(s). An AI comment is not an approval.

…checks

make adoption builds each partial-adoption subset as a fresh consumer of the facade and checks its graph; make msrv tests every release member at the MSRV; make semver runs cargo-semver-checks against the previous release or records no-baseline.
@bartekus
bartekus enabled auto-merge (squash) October 21, 2026 18:40
@github-actions

Copy link
Copy Markdown

AI review (no-findings)

Looking at the three new shell scripts and the associated spec and Makefile changes.

Makefile - clean additions to .PHONY and three new targets invoking the scripts. No issues.

specs/031-public-api-and-release-family/spec.md - the Increment 2 prose is consistent with what the scripts implement: 5 skipped subsets named, no-baseline semantics described correctly, Node 20+ and curl declared as prerequisites, CI jobs deferred explicitly.

tools/rustev-release/adoption.sh

  • IFS scoping is correct: IFS='|' read applies | splitting only during read; inside the loop body IFS reverts to the default so for f in $features splits on spaces.
  • The pipeline subshell (echo "$subsets" | while): exit 1 exits the subshell, the pipeline exits non-zero, and set -e in the outer shell propagates the failure. Reliable in POSIX sh.
  • The drift awk script reads two lock files via FNR == 1 { file++ }. Both files parse $3 from name = "..." lines with quotes intact; comparisons are symmetric so this works correctly.
  • cargo tree -e normal --format '{p}' + awk '{print $1}' correctly extracts just the crate name.
  • Mark-file pattern (RUSTEV_ADOPTION_MARK) correctly verifies the test body actually ran, not just compiled.
  • The 7 active subsets and 5 skipped ones match the spec text exactly.

tools/rustev-release/msrv.sh

  • packages accumulation (packages="$packages -p $p") is intentionally unquoted at call site; the # shellcheck disable=SC2086 comment is present.
  • Guards against empty $packages or $msrv before running cargo +$msrv test.

tools/rustev-release/semver.sh

  • index_path correctly implements crates.io sparse-index layout for 1/2/3/4+ character names.
  • Node semver comparison script correctly filters non-yanked, X.Y.Z only, strictly less than current, then picks the largest.
  • npm URL encoding (sed 's|/|%2f|') is correct for scoped package names (only one / present).
  • The npm loop refuses a verdict if either package has a published baseline, which matches the spec.
  • Exact-pin check on cargo-semver-checks ("$have" != "cargo-semver-checks $PIN") is strict and correct.
  • || true after cargo semver-checks --version means a missing tool produces an empty string, which correctly triggers the error message.

No concrete defects found.

{"head": "8ff8e80fc521ed53feac27184e2f8f4aa494b2a1", "verdict": "no-findings", "findings": []}

Subject: df053f6...8ff8e80, diff digest 3ebbd611eb1b4431be8c8d244cb011d9c3bc3c837cff0cb81e1e62270baf1ffc, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus merged commit 7d65c1b into main Oct 21, 2026
7 checks passed
@bartekus
bartekus deleted the impl/031-checks branch October 21, 2026 18:58
bartekus added a commit that referenced this pull request Oct 21, 2026
…#144)

Spec 031 increment 3: the release changelog generated from the governed
corpus (3.10, R-4), and the crates' SBOMs in the candidate (3.9.1).

- `tools/rustev-release/src/changelog.rs` (new): `render(&Inputs)` is a
pure function of the specs at the previous release and now (`spec-spine
registry list --json`), the decision rows that ratified or approved each
spec, the commits since the previous release that touched it, and the
compatibility facts of 3.6 and 3.7. A spec is listed when new, when its
status or implementation state changed, or when its approved text
changed (every section digest except the implementation record's).
Compatibility comes first: MSRV and edition, each reference plan's
`PlanId` (a change stated as breaking under 3.6.4), superseded versions
with end dates. Unit tests: what is listed and in what order, order
independence of the inputs, a changed `PlanId`, an
implementation-record-only change, decision-row parsing.
- `rustev-release changelog <out> [<previous tag>]` (`make changelog`,
`PREVIOUS=<tag>`): gathers those inputs at a clean commit (the previous
corpus from the tag's tree via `git archive`, never from
`.statecraft/derived/` directly) and prints the changelog's digest.
- `candidate.sh`: requires `cargo-cyclonedx` 0.5.9 exactly; run a's
clean tree writes one CycloneDX 1.5 SBOM per crate member (all targets'
dependencies) at the source date; the changelog of the candidate commit
is generated as a step.
- `release-manifest.json`'s evidence map now carries each
`sbom-<member>.cdx.json` and `changelog.md` digest; a missing one fails
the candidate.
- Spec 031: implementation record.

#143 has merged; this PR is rebased onto `main`.

Local verification (macOS arm64): `cargo test -p rustev-release` (all
pass, changelog 5 unit tests), `cargo clippy -p rustev-release
--all-targets -D warnings`, `cargo fmt --check`, `sh -n candidate.sh`;
`rustev-release changelog` at one commit twice gives byte-identical
output (47 specs for the first release, both reference `PlanId`s
listed). `cargo cyclonedx` 0.5.9 run on the workspace writes
`<member>.cdx.json` files with no serial number and the
`SOURCE_DATE_EPOCH` timestamp. The full candidate with SBOMs runs at the
release-candidate step; `make gate`, `bash
scripts/check-authored-content.sh`.

Review round 1 (2 findings, fixed):
1. A missing `changelog.md` was reported under "031 3.9"; each evidence
file now carries its own clause (SBOMs 3.9.1, changelog 3.10).
2. The SBOM lookup's first search (`git ls-files --others --ignored`)
could never match, since the generated files are untracked but not
ignored; it is removed, and the lookup is the `find` (outside `target/`)
that always did the work.

Rebased onto #143's review rounds.

Review round 2 (2 findings, fixed):
1. The changelog's temporary tree was left behind when `git archive` or
`tar` failed (`?` returned first); the three steps are now chained and
their result taken after the directory is removed.
2. The SBOM lookup took the first `find` match. It now requires exactly
one `<member>.cdx.json` outside `target/` and fails naming the count and
paths otherwise (`cargo cyclonedx` without `--target-in-filename` writes
one per member, which the local run showed).

Rebased onto #143's round 4.

Review round 3 (3 findings, fixed):
1. MSRV and edition came from the first member alone. The release policy
already refuses a member that differs, and the changelog now also checks
every member and refuses to state an MSRV the members disagree on.
2. A failing `cargo cyclonedx` stopped the candidate with its output
only in `sbom.log`; the log is now printed to stderr first.
3. The implementation-record exclusion matched by substring, which would
have excluded spec 031's own section
`3-10-changelog-from-implementation-records` from approved-text
detection. It now matches `implementation-record` or a numbered
`<n>-implementation-record` exactly; a unit test covers both anchors and
the 3.10 section counting as text.

Review round 4 (2 findings: 1 fixed, 1 answered in the diff):
1. "The commit may carry a trailing newline into the Markdown."
`command_line` returns `stdout.trim()`, so it cannot; the generated
changelog's first line showed the bare hash. A comment at the call now
says so.
2. Only one leading section number was stripped.
`is_implementation_record` now drops every leading `<digits>-` group, so
`3-2-implementation-record` counts as the record too; the unit test
covers it.

Review round 5 (3 findings, fixed):
1. `make changelog` passed `$(PREVIOUS)` unquoted; it is now quoted when
given and omitted when not (`make -n` shows both forms).
2. The SBOM count counted lines of the path list; it now counts files
(one character per file found), so no path content can change it
(checked on a scratch tree with two matches: 2).
3. The changelog's temporary tree used a PID-named path and removed it
first; it now comes from `mktemp -d` (fresh, private), with nothing
removed beforehand.

Rebased onto #143's round 5. Local note: the run of `changelog` against
a previous ref after this change is waiting on this Mac's `syspolicyd`,
which has held the freshly built binary in `_dyld_start` for 30 minutes;
the first-release path ran earlier.

Review round 6 (3 findings, fixed):
1. The SBOM was located by `find` (twice); each member's SBOM path now
comes from its manifest directory in `cargo metadata`, so there is no
search to race or miscount.
2. Any `git show` failure for a previous `PlanId` read as "unchanged"; a
golden absent at the previous release is `None`, and one present but
unreadable (or without a `plan_id`) is an error.
3. A spec whose only change was its amendment edges was omitted; a
change of `amends` is now listed, with a unit test.

Rebased onto #143's round 6. Locally against `origin/main` as the
previous ref (after round 5): 3 specs listed as changed, both `PlanId`s
unchanged, and the temporary tree removed.

Review round 7 (2 findings, fixed):
1. A removed spec was listed without its title; it now prints `### <id>:
<title>` from the previous registry, with a unit test.
2. The candidate reads SBOM paths with Node; it now checks `node` is on
PATH first and says so, rather than reporting a missing SBOM.

Local note: this Mac's `syspolicyd` currently holds new build scripts
and test binaries in `_dyld_start` for 30 minutes or more, so the new
unit test is verified by CI on this push.

Review round 8 (1 finding, answered in the diff): "`render(&inputs())`
compared with `a` is a tautology." It is the repeatability check 3.10
asks for (a second run on the same inputs gives identical bytes); the
next assertion is the order-independence one. Both now carry a comment
and an assertion message saying which is which.

Review round 9 (1 finding, fixed): a `plan check` golden at HEAD without
a `plan_id` was skipped silently while the same condition at the
previous release was an error; both are errors now (every `plan check`
golden carries one).

Review round 10 (1 finding, mistaken, answered in the diff): "`cargo
cyclonedx` needs `--workspace` in a virtual workspace." The pinned
cargo-cyclonedx 0.5.9 has no such flag: `cargo cyclonedx --workspace`
exits with "unexpected argument '--workspace' found". Run at the root of
this virtual workspace, it writes `<name>.cdx.json` beside every
member's manifest (the local run did, for every member). The candidate
then requires each release member's file by its `cargo metadata` path
and fails if one is missing. A comment at the call now says so.

Rebased onto #143's rebase onto `main`.

Review round 11 (2 findings, fixed):
1. `make changelog` ran `cargo run ... field target` twice in one line;
it now resolves the target directory once into a shell variable and uses
it for both the binary and the output path.
2. A `cargo metadata` failure in the SBOM step surfaced as "no SBOM
generated": the metadata is now read once before the loop with an
explicit failure message, and a failed path lookup for a member says so.

Rebased onto #143's round 8.

Review round 12 (1 finding, mistaken, answered in the diff):
"`${PREVIOUS:-}` passes `""` when unset." Unquoted, an empty expansion
is removed by field splitting and passes no argument: `sh -c 'set --
${PREVIOUS:-}; echo $#'` prints `0`. So the first-release form
(`changelog <out>`) runs. A comment at the call now says this is
deliberate.

Rebased onto #143's round 9.

Rebased onto #143 after #146 (profile revision 17, spec-spine 0.31.0):
derived shards regenerated with 0.31.0.

Review round 13 (1 finding, fixed): a member absent from `cargo
metadata` gave an empty directory and the message "expected
/<name>.cdx.json"; the lookup now fails, and the candidate says "cargo
metadata lists no package <name>".

Rebased onto #143's round 12.

Rebased onto `main` after #143 merged (derived shards only).

Review round 14 (2 findings, fixed):
1. `make changelog` spliced `$(PREVIOUS)` into the recipe's text; the
recipe now reads it from the environment (`${PREVIOUS:+"$PREVIOUS"}`;
make exports command-line variables), so its contents are never shell
syntax. Checked with a scratch Makefile: `PREVIOUS='a"b; echo pwned'`
arrives as one literal argument.
2. `SPEC_SPINE` could point the changelog at any binary; the generator
now accepts a spec-spine only when `--version` equals the exact pin in
`spec-spine.toml` (`=0.31.0`), whichever path supplies it.
bartekus added a commit that referenced this pull request Oct 21, 2026
Spec 026, increments 1 and 2: live re-execution of a recorded decision
shape as a new decision, behind a host authorization seam, and its
comparison with the verified historical case.

- `crates/rustev-contract` (`src/live.rs`, new): the
`rustev.live-reexecution/1` document (`LiveReexecution`): the new
decision, plan and computed snapshot identities, evaluation time, opaque
subject and scope, the historical case as a `HistoricalLink`
(identities, evaluation time and the bundle's record digest, never
content) or explicit `none`, admission, the new run record's digest,
termination and cost summary, one `LiveEffect` per proposed external
attempt (with the host's `AuthorizationReference` or the typed refusal,
and the dispatch observation), unreconciled attempts, delivery, capture
and retention posture, and the comparison section. `check` bounds every
list and free text and refuses an effect or liability not attributable
to the new decision, or a new decision id equal to the historical one.
`AuthorizationRequest` and its tagged digest
(`rustev.live-authorization/1`) bind an answer to exactly one attempt;
refusals are `missing`, `expired`, `mismatched`, `errored` and
`refused`.
  - `tests/live.rs`: bounds, refusals, digest binding and round trips.
- `crates/rustev-runtime` (`src/live.rs`, new; `src/driver.rs`):
`Runtime::reexecute_live(plan, LiveRequest, &dyn LiveAuthorizer,
cancel)`, the only function that takes an authorizer. Before admission
it refuses a reused historical decision id, a snapshot whose computed
`SnapshotId` differs from the stated one, an invalid capture
configuration, an out-of-range historical decision id, and a plan whose
worst-case attempts exceed the document bound. It then runs an ordinary
spec 003 decision; in the attempt driver, after the full worst-case
reservation and the deadline and cancellation re-check, the host is
asked about that exact attempt (a panic is contained as `errored`). An
allow counts only if it names the presented digest and is still valid by
the runtime clock. A refusal releases the reservation, sends nothing and
stops the request; retries and fallbacks are each authorized again.
- `tests/live.rs`: section 5 rows 2 to 6 and 9; allow, refusal,
mismatch, error, panic, expiry, retry, fallback, cancellation, unknown
charge, possibly continuing work and sink failure with exact attempt
attribution; exact steps still judge when the host refuses all external
work; cache and batch bypass; capture. Compile-fail examples show
`decide` and `decide_with_capture` take no authorizer.
- `crates/rustev-eval` (`src/live.rs`, new): `compare_live(LiveCase)`, a
pure function over host-supplied documents. It refuses a document that
does not check, an unbound run record, a plan that is not the
document's, and a bundle other than the linked one; verifies the
historical case by spec 004 reproduction (an unavailable item makes the
comparison `unavailable`, nothing restored); then reports `agreement`,
`live-diverged` (`proposal_changed` or `unresolved_category_changed`) or
incomparable, with snapshot, plan, evaluation-time, artifact, backend,
definition, policy, calibration, runtime count, cost, termination,
cancellation, remote-state, retention and delivery differences reported
apart. `with_comparison` returns a copy; no source is modified.
- `tests/live.rs`: section 5 rows 1, 7 and 8; byte-identical sources
after a live run and its comparison; a source scan showing eval names no
runtime, backend or authorizer.
- Mutation seeds: eight `live:` seeds in
`crates/rustev-runtime/mutation/seeds.py` and two `live-comparison`
seeds in `crates/rustev-eval/mutation/seeds.py`; all ten detected.
- `Makefile`: 026 joins `VERIFIED_SPECS`.
`tools/rustev-release/archive-policy.json`: the new source files in the
contract, runtime and eval archives.
- Spec 026: implementation record. Derived shards regenerated.

What remains: the comparison reports the first unavailable item
reproduction meets, not every item; served identity stays `unknown`
until a run record carries it; the live document's later members (spec
043 3.9) are not part of this implementation.

Owner decisions (engineering choices made within the spec, open to
review; see the implementation record):
- E-26-1: an authorization refusal is typed in the live document, and
the core is supplied `backend_unavailable` with detail
`authorization_refused: <refusal>` (the spec 003 3.6.4 form). Spec 002's
four runtime reasons, `rustev.run/1` and the core are unchanged.
- E-26-2: the authorizer is synchronous and lives in `rustev-runtime`,
not in the core seams; its answer is neither serializable nor clonable,
and only its reference is kept. Validity is a duration judged by the
runtime's clock.
- E-26-3: live runs bypass the memory cache and general batching (a
diagnostic says so when the plan enables either); each attempt is fresh
work, authorized on its own.
- E-26-4: no JSON Schema yet: the live document is not added to spec
027's emitted schemas, since that would regenerate the committed
TypeScript declarations. A spec 027 follow-up.

Local verification (macOS arm64): `make gate`, `make code` (build, test,
clippy `-D warnings`, fmt, boundaries), `.bin/spec-spine verify 026` (10
commands, 10/10 seeds detected), `bash
scripts/check-authored-content.sh`.

Review round 1 (1 finding, fixed): `LiveReexecution::check` refused a
historical decision id longer than 256 bytes but not an empty one, so a
parsed document linking an empty historical id passed `check` although
`reexecute_live` refuses it. `check` now refuses it too;
`the_historical_decision_id_is_one_to_256_bytes` checks 0 and 257 bytes
(refused) and 256 bytes (accepted).

Rebased onto `main` after #143, #144 and #145 merged (derived shards
regenerated).

Review round 2 (0 findings).

Review round 3 (0 findings), after the rebase onto #144.
bartekus added a commit that referenced this pull request Oct 21, 2026
Spec 020: remote protocol refinements, increments 1 to 6 (phase
ceilings, the host-endpoint principal reference and `rustev.remote/2`,
bounded connection reuse, `rustev.run/2`, runtime-planned remote
batches, Jev and verification). Every refinement is disabled by default,
and a binding with every refinement disabled keeps its spec 009 bytes,
artifact and `PlanId`.

**Awaiting the owner.** Spec 020 stays `implementation: pending`, and so
stays out of `make verify`, because two acceptance items are not
verifiable as written (recorded in the spec's implementation record):

1. Multiplex cancellation (pool acceptance). The HTTP binding speaks
HTTP/1.1 only, so a pool policy must declare one stream per connection;
nothing is multiplexed and there is no multiplexed cancellation to test.
Covering it needs an HTTP/2 binding, a new dependency that spec 021's
audit would have to admit.
2. "New qualification evidence for every enabled refinement" (Jev). No
refinement is enabled on the Jev adapter, so there is none to produce;
enabling one would need a new mapping version and a newly authorized
qualification, which this spec does not authorize (3.7).

The ruling on these two decides whether 020 can be marked implemented.

## Per increment

- **1, phase ceilings (3.4, 3.1).** `rustev-remote-http/src/phases.rs`
(new): `PhasePolicy` (a positive ceiling per phase; zero refused at
construction), `TransportPhases` (disabled by default), `PhaseClock`
(each phase's allowance is the lesser of its ceiling and the budget left
when it starts; phases only move forward) and `phased`.
`HttpTransport::with_phases` enters resolution, connect, TLS handshake,
request write, first response byte and response body on the real
connection; `TransportError::PhaseExpired`. An expiry before request
bytes is `transport_unsent`, after them `transport_interrupted`; no
retry is added. The cancellation acknowledgement ceiling bounds every
cancel exchange. `rustev.remote-exchange/1` gains an optional
`phase_expiry`; `AdapterBinding::transport_phases` is not written when
disabled.
- **2, principal reference and `rustev.remote/2` (3.6, 3.7).**
`rustev-contract`: `PROTOCOL_V2`, `InferRequest::principal`
(`WirePrincipal`, omitted when absent, refused in version 1 or when not
canonical) and its domain-separated evidence digest; the exchange
record's optional `principal` holds only that digest.
`rustev-remote-http/src/principal.rs` (new): `EndpointOperator`,
`PrincipalSource`, `HandleAsReference`, `PrincipalPosture`,
`PrincipalWire`. The client negotiates exactly `protocol_major` (1 by
default) and refuses a principal for a third-party endpoint, over
version 1, or with a bad label. The server serves
`ServerConfig::versions` (`[1]` by default) and includes the principal
in idempotency content. Redirects stay unfollowed.
- **3, bounded connection reuse (3.5).**
`rustev-remote-http/src/pool.rs` (new): `PoolPolicy`, host-owned
`ConnectionPool`, `KeyMaterial` (every isolation member; credential and
principal only as digests; unknown material never reuses).
`HttpTransport::post_observed` swaps stream hooks per exchange, so the
tracker and phase clock are always the current exchange's. A stale
connection is never replaced mid-exchange; exhaustion is
`transport_unsent` with `observed{0}`. The exchange record gains an
optional `connection`; the binding gains `connection_pool`, not written
when disabled.
- **4, `rustev.run/2` (3.2, I-4).** `rustev-contract`: `RUN_V2`,
`RunRecord::remote_evidence` and `remote_evidence_truncated` (absent in
every other version, so version 1 and 3 bytes are unchanged), bounded
`RemoteEvidence`, `check_version_members`, `project_v1`. `rustev-core`:
`EvidenceSink::run_schema` and `DecisionBackend::take_remote_evidence`,
both defaulted. `rustev-runtime`: version 2 exactly when the sink
selects it; one entry per remote attempt in order; a rejected version 2
record is never retried as version 1. `rustev-remote-http`:
`ClientConfig::run_evidence`, `ExchangeSink::deliver_located`, and
`Exchanges::deliver` now returns the record digest and delivery result.
`rustev-eval`: bundles hold the version 1 projection, so replay is
unchanged and offline; `remote_evidence::availability` checks references
against a host store, apart from judgment parity.
- **5, runtime-planned remote batches (3.3).** `RemoteClient` offers
spec 017's `batch_capability` only when `ClientConfig::batch_dispatch`
and the negotiated terms both allow shared-state batching (bound is the
lesser). `infer_batch` refuses an oversized or mixed batch before any
byte, checks each member as an independent attempt, sends one exchange
in the runtime's order bounded by the earliest member budget, and
answers each member from its own answer. New exchange attribution
`runtime_planned`.
- **6, Jev, drift, verification.** A negotiated endpoint answering
another protocol version is `identity_mismatch`.
`rustev-jev/tests/refinements.rs`: Jev offers no general batch seam, its
adapter-scoped batch stays shared-state, and no spec 020 member or
remote evidence appears; its binding and mapping are unchanged. Spec
020: acceptance mapped item by item and a declared `verify:cli` block.

Amended specs whose shared APIs change: 003 (runtime run/2 delivery),
004 (eval bundles and availability), 009 (binding members, exchange
record, `TransportError`, `Exchanges::deliver`), 012 (Jev), 017 (the
batch seam's remote side). Their verify passes.

## Interpretations recorded in the implementation record

- 3.1's explicit `disabled` values are explicit in the configuration
types but not written into the binding document, so every existing
adapter's artifact and `PlanId` stay byte-identical (section 2).
- The request-write phase ends at the first completed flush after the
connection took the request body; the response-body phase includes the
response head.
- The cancellation acknowledgement ceiling bounds the whole cancel
exchange, whose own transport phases also apply.
- `rustev.remote/2` keeps the HTTP paths `/rustev/remote/1/...` and the
schema strings; the `version` member distinguishes it. A version 1
server refuses a version 2 describe with 400, reported at construction
as a negotiation failure.
- The isolation key's authority is the configured scheme, host and port,
not the resolved address.
- Replay never consults an exchange store; "without a transport or store
call" is read as that, and availability is a separate, explicit check.
- A plan 3 decision's record stays `rustev.run/3` without remote
evidence even for a sink that selected version 2.
- Spec 017's batch report has one cancellation answer and one remote
state, so one possibly continuing member makes every member of its batch
possibly continuing with charge unknown: never understated, possibly
overstated until the host reconciles.
- A host-operated server hands a version 2 request's reference to the
hosted backend as `CallContext::principal_handle`; version 1 keeps spec
009's empty handle.

## Local verification (macOS arm64)

Rebased onto `main` at df053f6 (4cecab0 dropped as already applied as
#146), then onto 2d6a1f2 after #143 and #144 merged, then onto c58c52e
after #150 (spec 026) merged; no conflicts and no call sites to fix.
`.bin/spec-spine verify 026` also passes. `make gate`, `make code`
(build, test, clippy `-D warnings`, fmt, boundaries), `.bin/spec-spine
verify` for 020, 003, 004, 009, 012 and 017 (spec-spine 0.31.0), `bash
scripts/check-authored-content.sh`.

Review round 1 (1 finding, reported by two groups, fixed): the
`RustevRun1` and `RustevRun3` declarations (both packages) carried
`remote_evidence` and `remote_evidence_truncated`, which spec 020 says
are `rustev.run/2` only. The declarations were faithful to the schemas,
and the schemas to the parser: the run record's parser read every
version with one type and did not refuse those members outside version
2. Fixed at the source: `versioned_document!` takes an optional `check =
f` rule, and the run record's parser applies `check_version_members`
(refusing either member in version 1 or 3, and a version 2 record
without the list or beyond its bounds, as `ParseError::Schema`). The run
schemas now state that rule: `rustev.run-1` and `rustev.run-3` drop both
members and their now-unreferenced `$defs` (byte-identical to `main`
again), and `rustev.run-2` requires a non-null list. Declarations
regenerated with `gen-types.mjs`.
`crates/rustev-contract/tests/run_v2.rs`
(`the_parser_and_the_schemas_hold_the_version_rule`) checks parser and
schemas agree for each case; the implementation record says so.

Review round 2 (1 finding, fixed): an attempt that passed `prepare`
(which records its evidence as `pending`) and was then withdrawn from a
coalescing exchange before it sent kept `pending`: `finish` completes
only the members in the exchange record, and `note_unexchanged` leaves
an existing entry alone. Both "stopped before sending" paths of
`cancel_member` (withdrawn while collecting, and a lone member that
stops the send) now go through `stopped_unsent`, which turns a
still-pending entry into `no_exchange` with code `cancelled` and charge
provenance `nothing_sent`. `tests/batching.rs`
(`a_member_withdrawn_before_sending_has_no_exchange_in_its_evidence`)
fails without the fix and passes with it; the implementation record says
so. Round 2's review job reached its 15-minute limit right after posting
its comment, so that run recorded no evidence artifact; this push runs a
fresh review.

Review round 3 (0 findings), after the rebase onto #150. The first
attempt of this round reached the review job's 15-minute limit without a
verdict; the rerun returned no findings in both groups.
bartekus added a commit that referenced this pull request Oct 21, 2026
Spec 019, increments 1 and 2: dynamic questions as a narrow evaluated
class. The documents, pure validation and identity, `ask_dynamic`,
offline reproduction and the dynamic evaluation report. Scripted
backends only; nothing here selects a backend, authorizes live inference
or spend, or claims accuracy or calibration.

- `crates/rustev-contract/` (`src/dynamic.rs`, `ids.rs`, `limits.rs`):
`rustev.dynamic-question/1`, `rustev.dynamic-capability/1` (identified
by `DynamicCapabilityId`) and `rustev.dynamic-outcome/1` (`RECORD_V1`);
`DynamicRequestId`, `TemplateId`; the `DYNAMIC_QUESTION_V1` scan limits.
Parsing scans the bytes first, then checks the structural bounds of 3.2
(sizes, counts, byte-exact uniqueness of labels and context names, 64
KiB of context values, 128 KiB canonical); unknown members are refused.
The canonical request identity covers what a backend computes from,
including label order, template and preprocessing; the backend receives
a projection under fixed member names only.
- `crates/rustev-core/` (`src/dynamic.rs`, `seams.rs`): `validate`
builds the only `ValidatedQuestion`; `admit` (capability fit, no
truncation, `bounded` cost model only), `admit_cost` (enforceable bound
at or below the hard cap), `judge` (exact support, non-answer material
is invalid, pinned served identity, named abstention rules), `proposal`
(`model-derived`, with lineage). `DynamicBackend` and
`DynamicEvidenceSink` seams, separate from `DecisionBackend`, with no
tool, function or retrieval surface. Compile-fail tests with a compiling
control keep dynamic outcomes, raw outputs and proposals out of
`Supplied`, `Evaluation::supply` and `Judgment`, and keep
`ValidatedQuestion` unforgeable.
- `crates/rustev-runtime/` (`src/dynamic.rs`): `ask_dynamic`, one
attempt under a fresh hard ledger at the request's cap (and the optional
host ledger), deadline over every phase, spec 003/013 cancellation
evidence, optional sink whose delivery never changes the outcome. No
retry, fallback, batching or cache on this path.
- `crates/rustev-eval/` (`src/dynamic.rs`): `reproduce` takes no
backend; a changed canonical identity is `incomparable{request_changed}`
(section 5's last row: reordered labels), another declaration
`capability_changed`, a missing raw response `raw_response_unavailable`,
a different judgment `diverged`. `rustev.dynamic-dataset/1` and
`rustev.dynamic-evaluator-config/1` bind task family, exact question
schema, artifact and template; the dataset requires an
injection-adversarial case and refuses leakage across splits.
`rustev.dynamic-eval-report/1`: coverage, abstention by reason, accepted
error, uncalibrated Brier and log loss or mean level distance, overall
and over adversarial cases; `uncalibrated`, `mechanics_only` on
synthetic data, every gate `unknown`.
- Tests: `rustev-contract/tests/dynamic_wire.rs`,
`rustev-core/tests/dynamic.rs` (including adversarial text in every
caller-controlled field), `rustev-runtime/tests/dynamic.rs` (section 5
rows 1 to 7 with a dispatch counter), `rustev-eval/tests/dynamic.rs`.
- `tools/rustev-release/archive-policy.json`: the four new source files
join the reviewed archive lists; 019 now `extends`
`tools/rustev-release/` (additive) for it.
- `tools/rustev-conformance/fp-corpus` (spec 027, 3.11.3): the dynamic
log loss's `rustev_core::math::ln` call joins the differential corpus as
`eval.dynamic_log_loss.ln` (probability domain, as the existing log-loss
site), with its digests committed in `expected.json`; 019 `extends`
`tools/rustev-conformance/` (additive) and its verification runs the
corpus test.
- `Makefile`: 019 joins `VERIFIED_SPECS`.
- Spec 019: `implementation: complete`, Verification declares the
acceptance commands, implementation record. No existing document,
golden, plan id or test changed.

What remains: nothing in 019's acceptance. Calibration of a dynamic task
family needs a separately fitted artifact with its own binding; none
exists and none is claimed.

Owner decisions:
1. Whether the dynamic documents join spec 027's JSON Schema emitter
(3.2.2, "every public document type"). They are not emitted here: doing
so adds schema files under `crates/rustev-contract/schema/` and changes
the generated binding types under `integrations/rustev-wasm/types/` that
spec 027 owns, and neither spec says whether dynamic documents belong in
the binding surface.
2. Defaults chosen where the spec is silent, recorded in the
implementation record:
- `DISTRIBUTION_TOLERANCE` is 0.000001, equal to the reference plans'
tolerance.
- `min_margin` is top mass minus the second mass; ties go to the earlier
declared label.
- Free-text backend output retained in an outcome is cut to 256 bytes.
- Every evaluation gate is reported `unknown`: over synthetic data a
gate would claim quality from mechanics, and real data needs separately
governed admission (spec 023) that no dynamic dataset binds yet.

Local verification (macOS arm64): `make gate`, `make code` (build, test,
clippy `-D warnings`, fmt, boundaries), `.bin/spec-spine verify 019` (12
commands, passed), `rustev-fp-corpus check` (5 sites agree natively).
The WebAssembly corpus runs (`make bindings`) were not run locally: this
toolchain lacks the `wasm32-unknown-unknown` target. Rebased onto `main`
after #146, again after #143 to #145 merged (#145's corpus test required
the new site), and again after #150 (`VERIFIED_SPECS` and the contract's
schema constants unioned); derived shards regenerated each time.

Review round 1 (1 finding, fixed): `bounded_raw` kept NaN and infinite
distribution masses, so the outcome for that invalid output could not be
serialized and the evidence was lost. Such a distribution is now
recorded, and judged, as `Unrecognized { shape: non_finite_mass }` with
the masses as text (a new `ResponseShape` variant), so the outcome stays
a writable record and offline reproduction judges exactly what was
recorded.
`adapter_failures_and_malformed_outputs_are_named_and_never_retried` now
includes a NaN and an infinite distribution, asserts the recorded shape
and round-trips both outcomes. The implementation record says so.

Review round 1 (1 finding, fixed): `bounded_raw` kept NaN and infinite
distribution masses, so the outcome for that invalid output could not be
serialized and the evidence was lost. Such a distribution is now
recorded, and judged, as `Unrecognized { shape: non_finite_mass }` with
the masses as text (a new `ResponseShape` variant), so the outcome stays
a writable record and offline reproduction judges exactly what was
recorded.
`adapter_failures_and_malformed_outputs_are_named_and_never_retried` now
includes a NaN and an infinite distribution, asserts the recorded shape
and round-trips both outcomes. The implementation record says so.

Review round 2 (0 findings) on the rebased head 48c6c15.

Review round 3 (1 finding, fixed in the docs, behavior kept):
"`proposal()` omits `abstention` from `exact_processing` for label
answers, contradicting its doc comment and the implementation record."
The behavior is intended: under the explicit `label_only` posture no
abstention rule runs (`judge` returns `AbstentionDecision::LabelOnly`),
so listing `abstention` would claim an exact step that never ran. The
doc comment and the implementation record were wrong and now say
`validate` always, `abstention` only when thresholds were applied. The
core test for label output now builds the proposal and asserts its
lineage is exactly `["validate"]`.

Review round 4 (0 findings) on f9c4045. Rebased onto `main` after #152
(no conflicts, shards current).

Review round 5 (0 findings) on 54587eb; ci-gate passed.
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