Repository navigation
fix(029): the selection gate compares tolerance boundaries in exact decimal (#474) - #479
Conversation
AI review (findings)Reviewing the three changed files. The core logic is the new
The module unit tests exercise Everything else looks correct
{"head": "86b36e2e786a0414126fd94b779515ac89eecf38", "verdict": "findings", "findings": [{"path": "crates/rustev-eval/src/selection.rs", "line": 536, "summary": "shortest() panics on NaN and infinity because format!(\"{v:e}\") produces \"NaN\", \"inf\", or \"-inf\" (no 'e'), causing split_once('e').expect() to panic; there is no guard in the function or at the call sites visible in the diff."}]}Subject: cf3ae8d...86b36e2, diff digest 51619015200c4312b2a4caa1e332a5387fe681fa8aa07d9cd7cade016f5792c1, 1 call(s). An AI comment is not an approval. |
86b36e2 to
41dd8b8
Compare
…ecimal (#474) Every selection clause comparison, with an absolute tolerance or a noise band, is computed in exact decimal over the shortest round-trip decimals of the baseline, candidate and band, so a candidate exactly on a non-dyadic boundary is decided by the rule as written. A non-finite value is refused, leaving the clause unknown. Spec 029 3.12.3 states the rule; band computation is unchanged.
41dd8b8 to
f4d06f5
Compare
AI review (no-findings)Reviewing the three changed files: the core arithmetic in
The four cases in
The
The two new tests (
The normative addition to §3.12.3 is consistent with the implementation: shortest round-trip decimals for binary64 values, exact decimal for No concrete defects found. {"head": "f4d06f50249dc942a023776d190b4cfd095d9e24", "verdict": "no-findings", "findings": []}Subject: cf3ae8d...f4d06f5, diff digest be62b8d9ed03e31d51d35c57bc90202620968cd722a5b5ef569b8289598b0c16, 1 call(s). An AI comment is not an approval. |
…A-76); every PlanId changes, re-derive PlanId-keyed baselines, ledgers and caches The release family moves from 0.3.0 to 0.4.0 in lockstep, within the 0.4.0 scope the owner decided on 2026-11-02 (no service image, no spec 011). No behavior changes from the bump itself. - Version sites: the workspace version and its internal =0.4.0 pins, Cargo.lock, the nine npm package.json files, and tools/rustev-release/release-set.json (version and tag). - Regenerated fixtures: every PlanId embeds the compiler identity rustev-core/<crate version> (spec 002 3.3.4), so every golden, conformance case and fixture carrying one is regenerated through its bless or harvest path, with byte copies where a file mirrors another. The rustev-serve Sigstore fixture is re-signed with its throwaway local keys. - Archive policy (spec 021 3.5): a reviewed raise of rustev-runtime's unpacked bound from 524,288 (512 KiB) to 589,824 (576 KiB); it unpacks to 542,825 after specs 044 and 043 (release dry run 41628699504 and the local candidate refused it); and rustev-eval's from 720,896 (704 KiB) to 786,432 (768 KiB), since #479 (spec 029's exact-decimal comparison) takes it from 719,021 to 724,041, measured by packaging the release set with that change. Archives (128,868 of 160 KiB; 180,011 of 192 KiB), file lists and every other bound are unchanged. Spec 021 records the candidate run. - Spec 058: a dated Implementation record entry for the version move, with the consumer note: every PlanId changes from 0.3.0 to 0.4.0, so baselines, ledgers and cache keys keyed by a PlanId are re-derived on upgrade. Includes spec 060's ratification by the owner on 2026-11-03 (A-76: "I ratify 060") and its first increment (3.7.2): status approved, implementation in-progress; 060 also amends 056; publish_release leaves present qualification- assets out of its comparison (058 3.5.2) and refuses a run's own asset with that prefix, with the test qualification_assets_beside_a_release_are_ignored_never_published; the A-76 row in docs/decisions/00-founding-decisions.md. 0.4.0 still ships without the image. Spec-Drift-Waiver: family version bump to 0.4.0 (release 0.4.0, scope decided by the owner on 2026-11-02). Every PlanId embeds the compiler crate version (spec 002 3.3.4), so fixtures are regenerated mechanically through their bless and harvest paths; no behavior changes. Approved by the owner on 2026-11-03 ("everything necessary for the 0.4.0 release").
within: { absolute: t }or a noise band, is computed in exact decimal over the shortest round-trip decimals ofb,cand the band; a candidate exactly on a boundary is decided by the comparison as written (passes>=/<=, fails>/<). Band computation (3.5) is unchanged. Dated 2026-11-03 Implementation record paragraph cites Selection gate: a candidate exactly at a decimal tolerance boundary passes or fails on binary rounding (spec 029) #474 and the owner's decision.metric_clause(crates/rustev-eval/src/selection.rs) no longer forms a binary64 threshold; a small local exact digit sum does the comparison (no new dependency). A non-finite value or band is refused, leaving the clause unknown (3.12.4), never panicking.absolute_tolerance_edges_compare_in_exact_decimal(the four rows of Selection gate: a candidate exactly at a decimal tolerance boundary passes or fails on binary rounding (spec 029) #474 qualify, the next binary64 value past each boundary is rejected),noise_band_edges_compare_in_exact_decimal(87.5/87.6 with a 0.1 band, both directions,not_worse_thanandbetter_than), and unit tests for the exact sum and for NaN and the infinities. No golden or fixture changes.Fixes #474.
Checks run locally:
cargo test -p rustev-eval --locked,cargo clippy -p rustev-eval --all-targets -- -D warnings,cargo fmt --all --check,make gate,spec-spine verify 029.