Repository navigation
impl(031): increment 1, the facade crate and the two new members - #142
Conversation
AI review (findings)Looking at this PR, which introduces the 1. Test calls wrong function for "not alone in last layer" assertion In 2. Double violation for unreleased feature dependency In 3.
{"head": "bd012cdc5eb8c31d0589aea4e9453d335f53cc10", "verdict": "findings", "findings": [{"path": "tools/rustev-release/tests/manifests.rs", "line": 278, "summary": "The first case calls `check_manifests` but the 'not alone in the last layer' violation is emitted only by `check_set`; if these functions are not composed, the assertion never fires and the test fails."}, {"path": "tools/rustev-release/src/lib.rs", "line": 554, "summary": "When a facade feature names a crate outside the release, `check_facade_features` emits two violations for the same feature (both 'not a member' and 'not an optional normal dependency') because it does not short-circuit after the membership check."}, {"path": "tools/rustev-release/archive-policy.json", "line": 270, "summary": "`README.md` is listed in the `rustev` archive-policy entry but the facade's `include = [\"/src/**/*.rs\", \"/LICENSE\"]` excludes it, and `readme.workspace = true` pointing to the workspace root is not copied into the package archive by Cargo."}]}Subject: cbd5bfb...bd012cd, diff digest 57b2fad1e24833e7e644bd15bf0b45dc228f9e5b0e1932080e0559eb45693f7d, 1 call(s). An AI comment is not an approval. |
bd012cd to
8a0bf08
Compare
AI review (findings)Reviewing the PR, which introduces the Key findingsDouble violation when a workspace crate depends on the facadeIn // fires for rustev-core → rustev
} else {
out.insert(Violation::DependsOnIntegration { krate: pkg.name.clone(), dependency: dep.name.clone() });
}
// also fires, independently
if dep.name == FACADE && member_names.contains(FACADE) {
out.insert(Violation::DependsOnFacade { krate: pkg.name.clone() });
}The test at line ~1196 only asserts
|
8a0bf08 to
5772ac7
Compare
AI review (findings)Reading the diff carefully, focusing on the boundary checker, release tooling, and facade test logic. Finding 1 — order-sensitive assertion in
let named: Vec<&str> = declared.iter()
.map(|(n, _)| n.as_str())
.filter(|n| *n != "default")
.collect();
let gated_names: Vec<&str> = gated.iter().map(|(f, _)| f.as_str()).collect();
assert_eq!(named, gated_names, "every feature gates exactly one module");
Finding 2 — fragile homegrown TOML parser
let table = MANIFEST
.split("\n[features]\n")
.nth(1)
...
.split("\n[")
.next()
.unwrap();The split on the literal Everything else looks correct. The boundary check for {"head": "5772ac7929360fc6778212d30a11cddda9b03fc6", "verdict": "findings", "findings": [{"path": "integrations/rustev/tests/public_items.rs", "line": 121, "summary": "assert_eq!(named, gated_names) enforces the same ordering between Cargo.toml features and lib.rs re-exports, which is stricter than the spec constraint being verified (a set property, not an order property), and will produce a misleading failure message if either file is reordered independently."}, {"path": "integrations/rustev/tests/public_items.rs", "line": 41, "summary": "The homegrown TOML feature parser splits on the literal string \"\\n[features]\\n\" and strips brackets with trim_start/end_matches, so a blank line before the section heading, an inline comment, or a future multi-line feature value will silently mis-parse rather than fail fast."}]}Subject: cbd5bfb...5772ac7, diff digest 55906e786a9f776cdf045c41b72649c84ce2ee0e5f78a65b51ac340656528e79, 1 call(s). An AI comment is not an approval. |
5772ac7 to
26382b2
Compare
AI review (no-findings)Reviewing the diff carefully across all changed paths.
No bugs, security problems, or inconsistencies found. {"head": "26382b2c30e1f3ae25cfbfcd08b72bae0793a1b6", "verdict": "no-findings", "findings": []}Subject: cbd5bfb...26382b2, diff digest b57303e7bb3054845b0fd07088e9a7c303bbaa11bd45a2d95be098c871204f29, 1 call(s). An AI comment is not an approval. |
26382b2 to
a8112c9
Compare
AI review (findings)The PR introduces the
The
The Everything else looks correct:
{"head": "a8112c9b6d5c26222a1f14ec516e66bdbdc5d66f", "verdict": "findings", "findings": [{"path": "tools/rustev-release/archive-policy.json", "line": null, "summary": "The facade entry sets max_archive_bytes to 131072 (128 KB), twice the 65536 (64 KB) ceiling of rustev-pkg-lodging, despite the facade having far fewer files and no data assets, making the size guard ineffective for the facade."}]}Subject: a99f7bf...a8112c9, diff digest 7745617ab4f71e38ca73c147bc8b1bc5e9ac4d3f5917ee2ffb9bbe0168c3ecf3, 1 call(s). An AI comment is not an approval. |
The facade rustev (no default features; runtime, eval, rules and remote-http each one optional dependency and one module), its boundary rules of 031 3.3, and rustev-pkg-lodging and the facade joining the release set, the facade alone in the last crate layer.
a8112c9 to
fd00730
Compare
AI review (no-findings)Reviewing the PR, which introduces the
let expected = if *name == FACADE {
expected.max(set.layers.len())
} else {
expected
};This forces the facade's expected layer to
No bugs or security problems found. {"head": "fd00730bfe7d19b0e20e1bcf5242568378b4bd2a", "verdict": "no-findings", "findings": []}Subject: a99f7bf...fd00730, diff digest 5183c3064c9714b764a5cd8dc896806f99241737cd97f4a129821129f96d62b2, 1 call(s). An AI comment is not an approval. |
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: `exp` in core's softmax, `ln` in core's calibration, `ln` in evaluation's log loss, `ln` in its temperature fit. - `tools/rustev-conformance/fp-corpus/` (new crate `rustev-fp-corpus`, `publish = false`, excluded from the release set as tooling; an explicit workspace member, since it sits inside the conformance suite's directory): - 131,072 inputs per site, drawn as each site sees them (non-positive `exp` arguments; 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, where `exp` leaves 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. - Per site, the SHA-256 of the input bits and of the output bits, both committed in `expected.json`. - A native runner (`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 relaxes `unsafe_code` to `deny` and allows it on those three functions only; there is no `unsafe` block. - Tests: every `rustev_core::math` call 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. - Release set: `rustev-fp-corpus` excluded with its reason. - Spec 027: implementation record. 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 bindings` passes end to end with the corpus steps; `cargo test -p rustev-fp-corpus` (3 tests); clippy `-D warnings`; `cargo test -p rustev-release` with the new exclusion. Seeded check: putting the platform's `exp` and `ln` back into `rustev_core::math` makes 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 the `bindings` job, the next PR. Rebased onto `main` after #142 merged. One conflict, in `tools/rustev-release/release-set.json`, resolved by hand: #142 removed lodging's exclusion (lodging became a member), and this PR adds `rustev-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 sentinel `u32::MAX` reaches JavaScript as -1 (a wasm `i32` result is signed), so `b > 255` never 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): 1. `check` compared the committed file byte for byte, so a CRLF checkout (Windows with `core.autocrlf`) would fail with correct digests; the committed text is now compared with carriage returns removed. 2. The call-site guard stripped only `//` 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-corpus` 4/4, clippy `-D warnings`. Review round 3 (1 finding, fixed): `code_only` did not blank raw string literals. It now recognizes `r"..."`, `r#"..."#` with any number of `#`, and the `br` forms (not when `r` ends an identifier), and the scanner test includes a raw string and a raw byte string holding `math::exp(` and `math::ln(`, which are not counted. Local: `cargo test -p rustev-fp-corpus` 4/4, clippy `-D warnings`. Rebased onto `main` after #146 (profile revision 17, spec-spine 0.31.0): derived shards regenerated with spec-spine 0.31.0; no other conflict.
…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).
Spec 031 increment 1: the facade crate
rustev, its boundary rules, andrustev-pkg-lodgingand the facade joining the release family.integrations/rustev/(new, craterustev):#![forbid(unsafe_code)], no binary.rustev::contractandrustev::decision_corealways (3.2.1); featuresruntime,eval,rules,remote-http(the four whose crates are in this release, 3.4), eachdep:exactly one optional dependency and gating one module named after it;default = []; documented with module, crate and subset (3.2.5).tests/public_items.rs: the source is only those re-exports; each feature enables exactly its onedep:;defaultis empty; every feature is documented.tests/plan_ids.rs(3.7): both reference plans compiled throughrustev::decision_corefrom the conformance suite's pinnedplan checkfixtures equal the plan identities the CLI goldens pin. Passes with no feature and with all features.tools/rustev-boundaries(3.3):FacadeIntegration(an integration dependency of the facade that is not optional, not normal, or not enabled by exactly one feature),DependsOnFacade(any workspace crate, any dependency kind),FacadeDefault(non-empty default),FacadeFamily(the facade naming an ecosystem, HTTP or binding family itself), and the facade's no-feature graph checked transitively like the pure crates. Integration crates still may not depend on one another. Eight synthetic-metadata fixtures.tools/rustev-release:release-set.json:rustev-pkg-lodgingin layer 3 (uploading after the CLI it dev-depends on, as support-routing does);rustevalone in a new last layer, uploading last; lodging's exclusion removed.FacadeFeature); the facade's layer is the last one and the set refuses a facade sharing it or not uploading last. Tests for each; three existing tests that used lodging as their excluded example now userustev-boundaries.archive-policy.json: the reviewed file lists of both new archives (equal tocargo package --list, which the existing test checks).packages/rustev-pkg-lodging: family metadata,publish = ["crates-io"],include,LICENSE, workspace dependencies (031 amends 008's out-of-scope publication). Its tests pass unchanged.Cargo.toml: the two packages as exact-pinned workspace dependencies.integrations/rustev/established (no longer planned), anextendsedge for lodging'sLICENSE, implementation record.Later increments: subset jobs, MSRV and semver checks, SBOMs, the changelog, the extended dry run and the release workflow.
Local verification (macOS arm64):
cargo test -p rustev(with no feature and with--all-features),cargo test -p rustev-boundaries(28),cargo test -p rustev-release(all pass, manifests 17),cargo test -p rustev-pkg-lodging,make boundaries,cargo clippy --workspace --all-targets -D warningsand-p rustev --all-features,cargo fmt --check,make gate,bash scripts/check-authored-content.sh.Review round 1 (3 findings: 1 fixed, 2 answered in the diff):
check_manifests, but the message comes fromcheck_set."check_manifestsbegins withlet mut v = check_set(set);, so it carries that verdict; the test passed locally. A comment at the test now says so.continue), and the test now asserts exactly one violation withonly().README.mdis not in the facade's or lodging's archive." It is: Cargo adds the workspaceREADME.mdthatreadme.workspacenames regardless ofinclude,cargo package --list -p rustevprints it, andtests/archives.rs(the_reviewed_lists_equal_cargo_package_list) checks the reviewed lists against that output and passes. Both manifests now say so besideinclude.Review round 2 (2 findings, fixed):
DependsOnIntegration, since the facade lives underintegrations/, andDependsOnFacade). A dependency on the facade is nowDependsOnFacadealone; the fixture usesrustev-eval(which no other rule restricts) and asserts exactly that one violation for normal, dev and build dependencies. The "integration crates still may not depend on one another" fixture now has a second integration crate depending on the remote binding and asserts exactlyDependsOnIntegration.every_feature_is_documentedindexedentries[0]; a feature enabling nothing now fails with a message naming it.Review round 3 (2 findings, fixed):
tests/public_items.rsno longer parsesCargo.tomlby hand; it reads the facade's features fromcargo metadata --no-deps(Cargo's own parse), and compares the declared features with the gated modules as sorted sets, so neither file's order matters.Rebased onto
mainafter #138 to #141 merged (derived shards regenerated).Review round 4 (1 finding, fixed): the facade's archive bounds (128 KiB compressed, 256 KiB unpacked) were looser than lodging's although the facade holds less. They are now 64 KiB compressed and 128 KiB unpacked, the ceilings of the other small library crates: its archive is
src/lib.rs, the workspace README and LICENSE (16.5 KB together), the manifests and aCargo.lockof its all-features graph (about 25 KB). The release candidate measures every archive against these bounds and fails on any excess.