Repository navigation
impl(027): increment 7, the differential floating-point corpus - #145
Conversation
AI review (no-findings)Reviewing the differential floating-point corpus crate ( lib.rs — generator correctness The The
lib.rs — WebAssembly exports and Mutex
main.rs — check command The tests/corpus.rs — coverage test
The root derivation fp-corpus.mjs
No bugs, security issues, or spec-027 inconsistencies found. {"head": "354f471e4ff6d69ed19b36cc148d279267cae37f", "verdict": "no-findings", "findings": []}Subject: a99f7bf...354f471, diff digest 26adab080b990852196c3d89d2be030bcc7512b5c8919532b5a609d4ac3f8ac6, 1 call(s). An AI comment is not an approval. |
354f471 to
a2df2f6
Compare
AI review (findings)Reviewing the new Finding 1 –
if (b > 255) throw new Error(...) // line 37is never true for -1, so the error is swallowed silently. The subsequent line s += b.toString(16).padStart(2, '0') // "-1"would produce a corrupted hex string. In the normal code path indices are always valid (0–1 for Finding 2 – minor: Everything else looks sound. The SplitMix64 generator, SHA-256 chaining, WASM export shape, Makefile wiring, workspace membership, {"head": "a2df2f6402eef8aaccc59867149b44a34bc04439", "verdict": "findings", "findings": [{"path": "tools/rustev-conformance/js/fp-corpus.mjs", "line": 37, "summary": "The out-of-range sentinel `u32::MAX` returned from `corpus_digest_byte` is converted by the WebAssembly JS ABI to -1 (signed i32), so the guard `if (b > 255)` never fires; the error path silently produces a corrupted hex string instead of throwing."}]}Subject: 541f3ca...a2df2f6, diff digest 13f87557ad3cc904bb7722176d231fc30bef7db18a10f440478b2f77de817f96, 1 call(s). An AI comment is not an approval. |
a2df2f6 to
f6bf718
Compare
AI review (findings)Reviewing the new
The
Everything else looks correct: the SplitMix64 generator is standard, the admissibility filters are sound for each domain, the wasm export interface is consistent with the JS consumer, the poison-guard {"head": "f6bf718ba247ac68e9f2f88b9d9f0ff073d09f61", "verdict": "findings", "findings": [{"path": "tools/rustev-conformance/fp-corpus/src/main.rs", "line": 27, "summary": "Exact string comparison of file content against generated JSON will fail on Windows where git autocrlf produces CRLF line endings, even when all floating-point digests are correct."}, {"path": "tools/rustev-conformance/fp-corpus/tests/corpus.rs", "line": 44, "summary": "math_calls() strips only // line comments, so math::exp( or math::ln( inside a block comment or string literal would be counted as a call site, breaking the all-sites-covered guard."}]}Subject: 541f3ca...f6bf718, diff digest d44fddadae6f855b04d8c6950bfaa8c60d0b634a5d08faeecb21743e456faded, 1 call(s). An AI comment is not an approval. |
f6bf718 to
cc36eb1
Compare
AI review (findings)Looking through this PR, which adds the differential floating-point corpus tool (spec 027, section 3.11.3), I found one notable issue.
The scanner in Everything else looks correct:
{"head": "cc36eb125b2063a90617ed4f64b9877bb3d89df2", "verdict": "findings", "findings": [{"path": "tools/rustev-conformance/fp-corpus/tests/corpus.rs", "line": 17, "summary": "code_only does not strip raw string literals (r\"...\", r#\"...\"#), so a raw string in a scanned file containing \"math::exp(\" or \"math::ln(\" would be miscounted as a call site and cause every_call_site_is_in_the_corpus to fail spuriously."}]}Subject: 541f3ca...cc36eb1, diff digest 675fece8682aa1584491b4263fd628636735b01f99537c6a3c15e6c12f00ad3b, 1 call(s). An AI comment is not an approval. |
cc36eb1 to
cf3a50a
Compare
AI review (no-findings)Reviewing the new Cargo.toml / Cargo.lock / release-set.json: Workspace membership and exclusion from the release set are consistent; lib.rs -- lib.rs -- input generation: lib.rs -- u32::MAX sentinel: main.rs -- check comparison: CRLF normalisation on the expected file ( tests/corpus.rs -- tests/corpus.rs -- fp-corpus.mjs: No bugs, security issues, or spec inconsistencies found. {"head": "cf3a50aff163b7955bf5f3ee082b79afc01d99f0", "verdict": "no-findings", "findings": []}Subject: 541f3ca...cf3a50a, diff digest 312892e87ce0cf4ad75e6fa040375325103ed2d9c72c69edc146b375f59c2104, 1 call(s). An AI comment is not an approval. |
cf3a50a to
cc53f11
Compare
AI review (no-findings)I reviewed the PR carefully across all changed files: the new SplitMix64 / input generation — the PRNG and domain generators are correct.
WebAssembly exports —
CRLF normalisation in
Makefile — wasm artifact name No concrete bugs, security defects, or governance inconsistencies found. {"head": "cc53f1102306fff7c29df02cb864d603ede83310", "verdict": "no-findings", "findings": []}Subject: 1204bc8...cc53f11, diff digest 312892e87ce0cf4ad75e6fa040375325103ed2d9c72c69edc146b375f59c2104, 1 call(s). An AI comment is not an approval. |
…checks (#143) 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).
After rebasing onto #145, the corpus test refuses an unmeasured rustev_core::math call. The dynamic report's log-loss ln joins the corpus as eval.dynamic_log_loss.ln with its committed digests; 019 extends tools/rustev-conformance/ for it and verifies the corpus test.
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.
After rebasing onto #145, the corpus test refuses an unmeasured rustev_core::math call. The dynamic report's log-loss ln joins the corpus as eval.dynamic_log_loss.ln with its committed digests; 019 extends tools/rustev-conformance/ for it and verifies the corpus test.
After rebasing onto #145, the corpus test refuses an unmeasured rustev_core::math call. The dynamic report's log-loss ln joins the corpus as eval.dynamic_log_loss.ln with its committed digests; 019 extends tools/rustev-conformance/ for it and verifies the corpus test.
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.
Spec 027 increment 7, third change: the differential floating-point corpus (3.11.3, 3.11.5).
After spec 047 (#138, #139) every transcendental call reachable from a pure command is a call of
rustev_core::math, at four sites:expin core's softmax,lnin core's calibration,lnin evaluation's log loss,lnin its temperature fit.tools/rustev-conformance/fp-corpus/(new craterustev-fp-corpus,publish = false, excluded from the release set as tooling; an explicit workspace member, since it sits inside the conformance suite's directory):exparguments; positive finite masses; probabilities in (0, 1] and just above). Each set starts with boundary values: zeros, the smallest and largest subnormals,MIN_POSITIVE, one ulp either side of 1, whereexpleaves the normal range and where it rounds to 0, and the format's extremes. It continues with a seeded SplitMix64 using integer arithmetic and correctly rounded basic operations only, so every target draws the same bits.expected.json.rustev-fp-corpus check expected.json) and a WebAssembly build of the same crate with plain exports and no imports (corpus_sites,corpus_run,corpus_digest_byte). The exports need#[unsafe(no_mangle)], so the crate relaxesunsafe_codetodenyand allows it on those three functions only; there is nounsafeblock.rustev_core::mathcall in the pure crates is a corpus site and vice versa (a new call site cannot go unmeasured); the inputs meet 3.11.3 (at least 100,000, no NaN, subnormal and extreme magnitudes, distinct draws for the two evaluation sites); this target reproduces the committed digests.tools/rustev-conformance/js/fp-corpus.mjs: the WebAssembly module in Node and in headless Chromium against the committed digests, writing a result document.make bindings: the corpus natively, then in Node and Chromium.rustev-fp-corpusexcluded with its reason.Local verification (macOS arm64, before the rebase onto
main): native, Node 24.6.0 and Chromium 153.0.8010.12 agree on all four sites;make bindingspasses end to end with the corpus steps;cargo test -p rustev-fp-corpus(3 tests); clippy-D warnings;cargo test -p rustev-releasewith the new exclusion. Seeded check: putting the platform'sexpandlnback intorustev_core::mathmakes the native macOS run differ from the committed digests and fail, while WebAssembly (whose standard library already uses the pure implementation) still matches. That is the divergence spec 047 removed. After the rebase:make gate,bash scripts/check-authored-content.sh. The results on every CI target come with thebindingsjob, the next PR.Rebased onto
mainafter #142 merged. One conflict, intools/rustev-release/release-set.json, resolved by hand: #142 removed lodging's exclusion (lodging became a member), and this PR addsrustev-fp-corpus's, so the result keeps the new exclusion and not lodging's.Review round 1 (1 finding, fixed):
corpus_digest_byte's out-of-range sentinelu32::MAXreaches JavaScript as -1 (a wasmi32result is signed), sob > 255never caught it. The runner now accepts only integers 0 to 255 and throws naming the value otherwise; the Rust doc comment states the -1. Checked locally against the module:corpus_digest_byte(5, 0)and(0, 99)return -1, which the new guard refuses.Review round 2 (2 findings, fixed):
checkcompared the committed file byte for byte, so a CRLF checkout (Windows withcore.autocrlf) would fail with correct digests; the committed text is now compared with carriage returns removed.//comments; it now scans code alone, with line, block (nested) comments and string and character literals blanked (code_only, with its own test), counts every occurrence rather than one per line, and compares/-separated paths on every host.Local:
cargo test -p rustev-fp-corpus4/4, clippy-D warnings.Review round 3 (1 finding, fixed):
code_onlydid not blank raw string literals. It now recognizesr"...",r#"..."#with any number of#, and thebrforms (not whenrends an identifier), and the scanner test includes a raw string and a raw byte string holdingmath::exp(andmath::ln(, which are not counted. Local:cargo test -p rustev-fp-corpus4/4, clippy-D warnings.Rebased onto
mainafter #146 (profile revision 17, spec-spine 0.31.0): derived shards regenerated with spec-spine 0.31.0; no other conflict.