Repository navigation
impl(027): increment 1, binding dependency boundaries - #125
Conversation
AI review (no-findings)The diff adds:
lib.rs analysis:
Tests:
No bugs, security issues, or spec inconsistencies found. {"head": "a55c4c15a4aca556cce68e89c8faca07f275bb12", "verdict": "no-findings", "findings": []}Subject: ede2630...a55c4c1, diff digest dcda411c14a1b03b7147873d0c8d5085b126bff4f0b3a8b43707bd4f87de7381, 1 call(s). An AI comment is not an approval. |
a55c4c1 to
07f495e
Compare
AI review (findings)Reviewing the three changed files for bugs, security issues, and inconsistencies.
The core logic is sound. One inconsistency worth flagging:
{"head": "07f495e303405aefe1151a4633f065d9a4e874a7", "verdict": "findings", "findings": [{"path": "tools/rustev-boundaries/src/lib.rs", "line": 190, "summary": "`is_napi` uses a prefix match (`starts_with(\"napi\")`) while `BINDING_FAMILIES` uses exact names for the napi family, so `ForbiddenFamily` and `WasmGraph` apply inconsistent membership tests — a future crate named `napi-*` that is not a Node-API binding would be blocked by `WasmGraph` but not by `ForbiddenFamily`."}]}Subject: d2a8b42...07f495e, diff digest dcda411c14a1b03b7147873d0c8d5085b126bff4f0b3a8b43707bd4f87de7381, 1 call(s). An AI comment is not an approval. |
07f495e to
7baf3bf
Compare
AI review (no-findings)Looking at this PR, which adds binding family boundary checks for spec 027 (Node-API and WebAssembly rules) to Constants and helpers (
Refactoring the hard-coded check to a
The new loop over Tests
No bugs or security issues found. {"head": "7baf3bf64978925975bf7a3c0cb2ce6e3421a366", "verdict": "no-findings", "findings": []}Subject: 4af0b63...7baf3bf, diff digest c037115c77683ce0333d45243be9840605322a8f83dad02c019be0a71a025c2e, 1 call(s). An AI comment is not an approval. |
7baf3bf to
95a4b6f
Compare
AI review (no-findings)The diff adds binding family enforcement for Node-API and WebAssembly crates to the boundaries tool, and records the first implementation increment in the spec.
No bugs, security problems, or inconsistencies found. {"head": "95a4b6f3d4ebc7349d33288c9180cddba0ea222a", "verdict": "no-findings", "findings": []}Subject: 4af0b63...95a4b6f, diff digest c037115c77683ce0333d45243be9840605322a8f83dad02c019be0a71a025c2e, 1 call(s). An AI comment is not an approval. |
95a4b6f to
f32ddba
Compare
AI review (no-findings)Reviewing the three changed files: a spec implementation record, the boundaries library (
The WASM graph check loop iterates One observation: a pure crate that directly depends on a binding crate (e.g. Tests cover: each binding family triggering
No logic errors, security issues, or inconsistencies found. {"head": "f32ddbae512b76d257aeaf4235c601921046d501", "verdict": "no-findings", "findings": []}Subject: 4af0b63...f32ddba, diff digest c037115c77683ce0333d45243be9840605322a8f83dad02c019be0a71a025c2e, 1 call(s). An AI comment is not an approval. |
f32ddba to
8f5a191
Compare
AI review (findings)Reviewing the three changed files for bugs, security issues, and inconsistencies.
The constant layout, helper predicates, and
One real inconsistency in the test fixture In
{"head": "8f5a1915d13cdb3603031315fb6d98bb56a91a7f", "verdict": "findings", "findings": [{"path": "tools/rustev-boundaries/src/lib.rs", "line": null, "summary": "In `the_binding_crates_under_integrations_pass`, `rustev-node` lists `napi-derive` as a member dependency but the matching graph edge `(\"rustev-node\", \"napi-derive\", None)` is absent from the edges list, making the fixture inconsistent with the member spec it represents."}]}Subject: e91ff92...8f5a191, diff digest c037115c77683ce0333d45243be9840605322a8f83dad02c019be0a71a025c2e, 1 call(s). An AI comment is not an approval. |
8f5a191 to
29d1ff0
Compare
AI review (no-findings)Reviewing the diff: new binding-family constants and checks in
No bugs, security issues, or spec inconsistencies found. {"head": "29d1ff0e5709679fe76ac6f826271bf2b972de5a", "verdict": "no-findings", "findings": []}Subject: e91ff92...29d1ff0, diff digest bcf8cae17132699533d794c6b560985dd41f1240ebef93bd3b431cc6014eb52b, 1 call(s). An AI comment is not an approval. |
29d1ff0 to
e485d5b
Compare
AI review (no-findings)Reviewing the three changed files for bugs, security issues, and inconsistencies.
The refactor of
The
Adding
Success message updated to add spec 027 3.14 — no logic changed.
Implementation record is consistent with the code: families listed match the constants, violation names match the enum, and the plan's increment ordering is coherent. No bugs, security issues, or spec-to-code inconsistencies found. {"head": "e485d5be231a3b4299b71aceed0f266fade76c21", "verdict": "no-findings", "findings": []}Subject: ad0d998...e485d5b, diff digest bcf8cae17132699533d794c6b560985dd41f1240ebef93bd3b431cc6014eb52b, 1 call(s). An AI comment is not an approval. |
e485d5b to
dbd00c9
Compare
AI review (no-findings)Reviewing the three changed files.
Success message update is accurate and consistent with the new checks.
Implementation record accurately describes increment 1 and matches the code. No bugs, security problems, or material inconsistencies found. {"head": "dbd00c90cef66b385e972f5d00a814c5480aa7a2", "verdict": "no-findings", "findings": []}Subject: f7437ce...dbd00c9, diff digest bcf8cae17132699533d794c6b560985dd41f1240ebef93bd3b431cc6014eb52b, 1 call(s). An AI comment is not an approval. |
Spec 027, increment 2 of 7: JSON Schema emission (3.2.2). Stacked on #124 (it covers 033's document types); independent of #125. - `rustev_contract::schema_emit::document_schemas()`: a draft 2020-12 schema per public document type and version (28 files), derived via `schemars` (=1.2.3, pure) from the serde definitions the bounded parser uses; hand-written schemas for identities/digests, decimals and scope handles; `schema` fixed by `const`; `ParseLimits` recorded as `x-rustev-parse-limits`. Canonical JSON, committed under `crates/rustev-contract/schema/`. - `crates/rustev-contract/tests/schemas.rs`: committed bytes and file set equal emission (`RUSTEV_BLESS=1` rewrites); emission deterministic and canonical; every committed test-directory JSON document naming an emitted version validates against it (`jsonschema` =0.59.0, dev-only, no HTTP/file resolution); a schema refuses an unknown member and another version. - No document, parse bound or canonical byte changes. `schema_emit.rs` joins `archive-policy.json` (hence 027's new `extends` on `tools/rustev-release/`); the release audit (bans, licenses, sources) passes with the new dependency. Review round 1 (2 findings): (1) `zmij` is already in the lock file (`[[package]] name = "zmij"`, a dependency of `serde_json` on main); the diff shows only changed entries. (2) The parser reads judgment 1 and 2 (and the other #76 pairs) with one wire type and does not refuse a later version's members under the earlier `schema` string, so the version schemas share that type's schema except `schema`; a stricter version 1 schema would describe something the parser does not enforce (3.2.2: the schema is descriptive). `schema_emit` documents this. Review round 2 (1 finding): as in round 1, now shown by a test: a committed judgment 2 golden relabelled `rustev.judgment/1` is accepted by `Judgment::parse` and by the version 1 schema alike; the schema describes the parser and is never stricter (3.2.2). Review round 3 (7 findings): fixed: `Timestamp`'s schema states the range its parser enforces (0 to 9999-12-31T23:59:59.999Z); a schema without `properties` is a defect (`expect`), never silently skipped; the test reads files fallibly; a needless clone removed. Answered: `RankEntry.position` is a `u64` the parser accepts from 0, so its schema says so (the "1-based" comment states what the core produces, not what the parser refuses); `Handle`'s byte bound is the parser's and a character bound is looser, never stricter, as the code says; `zmij` is in the lock file (a `serde_json` dependency on main). Review round 4 (3 findings, same class as before): plan 2, evidence 1 and judgment 1 schemas admit the later version's members because the bounded parser reads both versions with one wire type and accepts them; a schema stricter than the parser would describe validity the parser does not enforce (3.2.2). The parity test now shows it for all three pairs: a later-version document relabelled with the earlier version is accepted by the parser and by the earlier schema. Rebased on main. Review round 5 (1 finding, fixed): a derived schema without `properties` panics naming the document; the committed-bytes test emits every document, so such a defect fails CI before any schema is committed or shipped, and is never skipped. Review round 6 (2 findings, same class as before): spec 033 writes every version 2 notice with its `action`, but the bounded parser does not refuse a notice without one, so the version 2 judgment and evidence schemas do not either (3.2.2: the schema describes the parser, never stricter). The parity test now shows it: a version 2 notice without `action` is accepted by the parser and by both version 2 schemas. Review round 7 (4 findings): (1-3) The execution policy's ranges (`max_attempts` in `1..=8`, at most four fallbacks, standalone and embedded) are checked when a plan is compiled against the policy (`rustev_core::execution`), not by the bounded parser; the schema describes the parser (3.2.2) and the field descriptions state the compile rule. The parity test now shows it: an out-of-range policy is accepted by the parser and the schema. (4) fixed: the `extends` comment names both: the archive list follows spec 021 3.5's rule in the directory spec 031 owns, which is why the edge names 031. Review round 8 (3 findings): (1) Repeated and wrong: `Cargo.lock` has `[[package]] name = "zmij" version = "1.0.23"` from crates.io; `cargo build --locked` and CI resolve it. (2) fixed: the private test struct in `bounded.rs` no longer derives `JsonSchema`. (3) fixed: the committed-document sweep includes `integrations/`. Review round 9 (2 findings): (1) Repeated: judgment 1's schema admits `refused` and `needs_input` because the parser reads both judgment versions with one wire type and accepts them under version 1; the parity test (`the_version_schemas_describe_what_the_parser_accepts`) relabels a version 2 refusal as version 1 and shows both the parser and the version 1 schema accept it (3.2.2: the schema describes the parser, never stricter). (2) fixed: `ContinuationInputs` no longer derives `JsonSchema`. Review round 10 (4 findings, the same class as earlier rounds): version 1 schemas admitting version 2 members, and a character length standing for a byte bound. Both follow from 3.2.2: a schema is derived from the types the bounded parser reads and is descriptive, the parser being the only authority on validity; the parser reads both versions with one type, and JSON Schema cannot express a UTF-8 byte length. To make every schema say this itself, each now carries a root `$comment` stating it (admits what the shared type admits, including later-version members; byte, depth and count bounds in `x-rustev-parse-limits`, string lengths counting characters; compile rules in descriptions, not enforced). The parity test shows the parser accepting each such document. Rebased on main. Review round 11 (1 finding, fixed): the file-set comparison sorts both lists, so it never depends on emission order.
Spec 027, increment 1 of 7: the dependency boundaries of 3.14, ahead of any binding crate.
napi,napi-derive,napi-sys,napi-build,wasm-bindgen,wasm-bindgen-macro,wasm-bindgen-futures,js-sys,web-sys. A crate outsideintegrations/depending on one fails like an HTTP stack.rustev-contractandrustev-corerefuses them too, andrustev-surfacejoins the checked set.rustev-wasm's normal and build graph may not reachrustev-runtime, an executor, an HTTP stack, a Node-API crate,getrandom,web-sysorwasm-bindgen-futures(WasmGraph, naming the path).make boundariespasses. The spec record lays out the seven increments.Review round 1 (1 finding, fixed): the Node-API family is one exact-name list (
NAPI_FAMILY) used by both the integration-only rule and the WebAssembly graph rule; no prefix match; test added.Review round 2 (1 finding, fixed): the passing fixture lists the
napi-deriveedge its member declares.