Skip to content

impl(027): increment 1, binding dependency boundaries - #125

Merged
bartekus merged 1 commit into
mainfrom
impl/027-boundaries
Oct 20, 2026
Merged

bartekus merged 1 commit into
mainfrom
impl/027-boundaries

Conversation

@bartekus

@bartekus bartekus commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Spec 027, increment 1 of 7: the dependency boundaries of 3.14, ahead of any binding crate.

  • Integration-only families: napi, napi-derive, napi-sys, napi-build, wasm-bindgen, wasm-bindgen-macro, wasm-bindgen-futures, js-sys, web-sys. A crate outside integrations/ depending on one fails like an HTTP stack.
  • The transitive purity check of rustev-contract and rustev-core refuses them too, and rustev-surface joins the checked set.
  • rustev-wasm's normal and build graph may not reach rustev-runtime, an executor, an HTTP stack, a Node-API crate, getrandom, web-sys or wasm-bindgen-futures (WasmGraph, naming the path).
  • Unit tests for each rule in the existing style; make boundaries passes. 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-derive edge its member declares.

@bartekus
bartekus enabled auto-merge (squash) October 20, 2026 11:38
@github-actions

Copy link
Copy Markdown

AI review (no-findings)

The diff adds:

  1. An "Increment 1" implementation record to specs/027-node-and-wasm-bindings/spec.md
  2. BINDING_FAMILIES, WASM_FORBIDDEN, WASM_CRATE constants, two new predicates, and a WasmGraph violation to tools/rustev-boundaries/src/lib.rs
  3. Updated success message in main.rs

lib.rs analysis:

  • forbidden_path is correctly refactored to accept a forbidden: fn(&str) -> bool parameter; path reconstruction (BFS walk-back with path.reverse()) is correct and matches the test expectations.
  • forbidden_for_wasm correctly uses is_napi (prefix "napi") rather than is_binding so that wasm-bindgen and js-sys remain allowed in the WASM graph while web-sys and wasm-bindgen-futures are forbidden via WASM_FORBIDDEN.
  • The ForbiddenFamily direct-dep check now gates on !in_integrations && (... || is_binding(...)) — integrations correctly bypass it.
  • PURE_CRATES adding "rustev-surface" is harmless when that crate doesn't yet exist: the filter simply never matches.
  • The WasmGraph loop inserts at most one violation per run (since forbidden_path returns the first BFS hit), consistent with how ForbiddenTransitive works.
  • forbidden_for_pure is now applied to packages/ crates as well (via the shared filter loop) — this is a minor undocumented extension beyond what spec 027 §3.14.2 requires for packages, but it is consistent with the conservative denylist intent and harmless (packages can only reach binding families through rustev-contract/rustev-core, which are already blocked).

Tests:

  • a_binding_family_outside_integrations_fails iterates all BINDING_FAMILIES — thorough.
  • the_wasm_graph_refuses_each_forbidden_crate covers all entries from the spec list including the dev-only exclusion. The path structure matches the BFS walk-back logic.
  • a_pure_crate_reaching_a_binding_family_fails_and_the_surface_is_checked second assertion correctly expects exactly one ForbiddenTransitive (only surface reaches tokio in that graph).

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.

@github-actions

Copy link
Copy Markdown

AI review (findings)

Reviewing the three changed files for bugs, security issues, and inconsistencies.

tools/rustev-boundaries/src/lib.rs

The core logic is sound. forbidden_for_pure correctly extends the old predicate with is_binding; forbidden_for_wasm correctly covers the spec's list (executor, HTTP, Node-API, and WASM_FORBIDDEN). The forbidden_path refactor to accept a predicate is clean.

One inconsistency worth flagging: BINDING_FAMILIES enumerates the four napi crates by exact name ("napi", "napi-derive", "napi-sys", "napi-build"), giving precise control for the ForbiddenFamily direct-dep check. But is_napi, used in forbidden_for_wasm, switches to a prefix match — name.starts_with("napi"). Any future workspace or transitive crate whose name begins with "napi" but is not actually a Node-API binding (e.g. a hypothetical napi-utils) would be caught by WasmGraph but not by ForbiddenFamily, making the two checks inconsistent with each other and with the explicit enumeration in BINDING_FAMILIES. The safer approach would be to use is_binding filtered to the napi subset, or add an explicit NAPI_FAMILIES constant mirrored from BINDING_FAMILIES.

tools/rustev-boundaries/src/lib.rs — tests

the_binding_crates_under_integrations_pass: rustev-node is declared with napi-derive in its Dep tuple but no corresponding edge is added to the graph edges list. Because rustev-node is neither a PURE_CRATE nor WASM_CRATE, no BFS check runs on it and the test still passes, but the test model is incomplete — it doesn't verify that napi-derive is wired into the graph as a live edge. This is a test-fidelity gap, not a runtime bug.

tools/rustev-boundaries/src/main.rs — success message update is correct and consistent.

specs/027-node-and-wasm-bindings/spec.md — implementation record matches the code added in this increment.

{"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.

@bartekus
bartekus had a problem deploying to statecraft-review-exception October 20, 2026 13:33 — with GitHub Actions Error
@bartekus
bartekus force-pushed the impl/027-boundaries branch from 07f495e to 7baf3bf Compare October 20, 2026 14:06
@github-actions

Copy link
Copy Markdown

AI review (no-findings)

Looking at this PR, which adds binding family boundary checks for spec 027 (Node-API and WebAssembly rules) to rustev-boundaries.

Constants and helpers (lib.rs:41-209)

  • NAPI_FAMILY, BINDING_FAMILIES, WASM_FORBIDDEN, WASM_CRATE, and updated PURE_CRATES are all consistent with the implementation record in the spec.
  • wasm-bindgen-macro is in BINDING_FAMILIES (preventing crates outside integrations/ from depending on it) but absent from WASM_FORBIDDEN and is_napi, which is intentional: it's a proc-macro companion to wasm-bindgen and not listed as forbidden in the wasm graph by the spec.
  • web-sys and wasm-bindgen-futures appear in both BINDING_FAMILIES and WASM_FORBIDDEN correctly: one prevents direct deps outside integrations, the other prevents even transitive reach within rustev-wasm's graph.
  • forbidden_for_wasm correctly omits is_ecosystem since serde-family crates compile to wasm fine.

forbidden_path parameterization (lib.rs:346-372)

Refactoring the hard-coded check to a fn(&str) -> bool parameter is clean and the two call-sites pass the right predicate.

WasmGraph check placement and path display (lib.rs:317-347)

The new loop over rustev-wasm sits inside the same if let Some(resolve) block that builds graph and by_id, so those references are valid. The Display message redundantly prefixes the path with "rustev-wasm reaches a forbidden crate:" and then includes rustev-wasm again at the start of path.join(" -> "), but this is cosmetic only.

Tests

  • the_binding_crates_under_integrations_pass: rustev-wasm has wasm-bindgen and js-sys in its edges; neither is caught by forbidden_for_wasm (correct).
  • the_wasm_graph_refuses_each_forbidden_crate: getrandom reached only via a dev-kind edge correctly produces no violation (dev edges excluded from the graph per existing logic).
  • a_pure_crate_reaching_a_binding_family_fails_and_the_surface_is_checked: correctly checks all three pure crates for transitive binding-family reach.

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.

@bartekus
bartekus force-pushed the impl/027-boundaries branch from 7baf3bf to 95a4b6f Compare October 20, 2026 14:11
@github-actions

Copy link
Copy Markdown

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.

tools/rustev-boundaries/src/lib.rs analysis:

  • BINDING_FAMILIES / NAPI_FAMILY / WASM_FORBIDDEN constants are consistent with each other and with the spec prose added in spec.md. The first four members of BINDING_FAMILIES exactly match NAPI_FAMILY as the comment claims.
  • forbidden_for_pure correctly extends the old hardcoded is_ecosystem || is_http || is_executor to add is_binding, matching spec 027 §3.14.2.
  • forbidden_for_wasm covers all seven forbidden categories named in the spec prose: executor (is_executor), HTTP (is_http), Node-API (is_napi), plus rustev-runtime, getrandom, web-sys, wasm-bindgen-futures from WASM_FORBIDDEN.
  • The forbidden_path signature change (adding forbidden: fn(&str) -> bool) is mechanically correct; the BFS logic itself is untouched.
  • The WasmGraph loop is placed correctly after the pure-crates loop, both within the same graph-building scope. rustev-wasm is in integrations/, so it is not subject to the ForbiddenFamily check (guarded by !in_integrations) and is not in PURE_CRATES, avoiding double-counting.
  • The test suite covers each family member for ForbiddenFamily, the binding crates under integrations/ passing cleanly, rustev-surface joining the pure set, and each of the eight specific forbidden crates for WasmGraph. One minor gap: napi-derive and napi-build are not exercised individually in the_wasm_graph_refuses_each_forbidden_crate, but they are covered by the NAPI membership assertion in the_node_api_family_is_named_exactly_in_both_rules and would be caught by is_napi at runtime.

tools/rustev-boundaries/src/main.rs: Success message updated to mention spec 027 §3.14. No issues.

specs/027-node-and-wasm-bindings/spec.md: Implementation record is documentation only; content is internally consistent with the code changes.

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.

@bartekus
bartekus force-pushed the impl/027-boundaries branch from 95a4b6f to f32ddba Compare October 20, 2026 14:28
@github-actions

Copy link
Copy Markdown

AI review (no-findings)

Reviewing the three changed files: a spec implementation record, the boundaries library (lib.rs), and the binary success message (main.rs).

tools/rustev-boundaries/src/lib.rs

NAPI_FAMILY and BINDING_FAMILIES are consistent: all four NAPI names appear in both, and is_binding / is_napi use exact-match contains, so no prefix-matching false positives.

forbidden_for_wasm correctly maps the spec's forbidden list: rustev-runtime and the three wasm-async/platform crates via WASM_FORBIDDEN, executors via is_executor, HTTP stacks via is_http, Node-API crates via is_napi. web-sys being in both BINDING_FAMILIES and WASM_FORBIDDEN is intentional: two different rules apply (3.14.1 for non-integration crates, 3.14.3 for the wasm graph).

forbidden_path refactoring is clean: the predicate replaces the hard-coded is_ecosystem || is_http || is_executor for pure crates, and the WASM check uses its own predicate. The BFS path reconstruction is unchanged and correct.

The WASM graph check loop iterates members.iter() (workspace members), so it fires only when rustev-wasm is present in the workspace — correct.

One observation: a pure crate that directly depends on a binding crate (e.g. wasm-bindgen) will produce both a ForbiddenFamily violation (direct-dep check) and a ForbiddenTransitive violation (BFS depth-1 hit), since the BFS forbidden_for_pure now includes is_binding. Both are factually accurate; this is consistent with the existing behaviour for ecosystem/HTTP families.

Tests cover: each binding family triggering ForbiddenFamily outside integrations; both binding crates passing under integrations; all eight WASM-forbidden crates producing WasmGraph; dev-only edge exclusion; js-sys/wasm-bindgen allowed in wasm graph; rustev-surface in the pure-crates set.

tools/rustev-boundaries/src/main.rs and specs/027-node-and-wasm-bindings/spec.md: purely textual, consistent with the code changes.

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.

@bartekus
bartekus force-pushed the impl/027-boundaries branch from f32ddba to 8f5a191 Compare October 20, 2026 14:57
@github-actions

Copy link
Copy Markdown

AI review (findings)

Reviewing the three changed files for bugs, security issues, and inconsistencies.

tools/rustev-boundaries/src/lib.rs

The constant layout, helper predicates, and forbidden_for_wasm all align with the spec text:

  • BINDING_FAMILIES is a superset of NAPI_FAMILY — direct membership check is exact (no prefix), confirmed by the the_node_api_family_is_named_exactly_in_both_rules test.
  • forbidden_for_pure = ecosystem ∥ http ∥ executor ∥ binding — consistent with spec 027 3.14.2.
  • forbidden_for_wasm = executor ∥ http ∥ napi ∥ WASM_FORBIDDEN — covers every item listed in the spec: rustev-runtime, executors, HTTP stacks, Node-API crates, getrandom, web-sys, wasm-bindgen-futures. Consistent.
  • forbidden_path parameterisation is clean; BFS path reconstruction is correct (start node included, shortest path returned).
  • wasm-bindgen and js-sys are intentionally absent from WASM_FORBIDDEN, so rustev-wasm may use them — the dev-only getrandom edge is excluded because the BFS only follows normal/build deps. Both behaviours are tested.
  • The WasmGraph variant on Violation will sort correctly for BTreeSet since Vec<String>: Ord.

One real inconsistency in the test fixture

In the_binding_crates_under_integrations_pass, rustev-node declares napi-derive as a member dependency but the corresponding graph edge ("rustev-node", "napi-derive", None) is absent from the edges list. Every other declared dependency of rustev-node has a matching edge (rustev-core, napi, napi-build, tokio). The missing edge means any graph-based check would not see napi-derive as reachable from rustev-node. This does not affect the current test outcome (no BFS runs on rustev-node — it is not a pure crate, a package, or WASM_CRATE), but the fixture is inconsistent with the member spec it is meant to represent and could silently miss coverage if rustev-node were ever added to a checked set.

tools/rustev-boundaries/src/main.rs — success message update is consistent with the added spec 027 3.14 checks.

specs/027-node-and-wasm-bindings/spec.md — the implementation record section is documentation only; the enumerated forbidden crates and families match the code precisely.

{"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.

@bartekus
bartekus had a problem deploying to statecraft-review-exception October 20, 2026 15:01 — with GitHub Actions Error
@bartekus
bartekus force-pushed the impl/027-boundaries branch from 8f5a191 to 29d1ff0 Compare October 20, 2026 15:09
@github-actions

Copy link
Copy Markdown

AI review (no-findings)

Reviewing the diff: new binding-family constants and checks in rustev-boundaries, a refactored forbidden_path that now takes a predicate, and a matching spec implementation record.

lib.rs

  • BINDING_FAMILIES / NAPI_FAMILY / WASM_FORBIDDEN / WASM_CRATE constants are self-consistent and match the spec description.
  • forbidden_for_pure is a superset of the old inline predicate (is_ecosystem || is_http || is_executor), now adding is_binding. Behaviour for pre-existing pure crates is unchanged; the new binding check is additive. ✓
  • forbidden_for_wasm correctly covers executors, HTTP stacks, NAPI family, and WASM_FORBIDDEN (runtime, getrandom, web-sys, wasm-bindgen-futures). ✓
  • forbidden_path refactor: the new forbidden: fn(&str) -> bool parameter is used at every call site; no call site was missed in the diff. ✓
  • WasmGraph check is inside the dep_graph guard, consistent with the other transitive checks. ✓
  • ForbiddenFamily direct-dep check still omits executors (matching the pre-existing behaviour for HTTP stacks). Not a new inconsistency introduced here. ✓
  • rustev-surface added to PURE_CRATES pre-emptively; harmless until the crate is added to the workspace. ✓
  • WasmGraph Display format includes WASM_CRATE both as the hard-coded name and as the first path element (slight redundancy: "rustev-wasm reaches … rustev-wasm -> helper -> tokio"), but this is cosmetic and not a correctness issue.
  • Tests cover each BINDING_FAMILIES entry, the integration crates, the pure-crate transitive check including rustev-surface, every WASM_FORBIDDEN / executor / HTTP / NAPI crate, dev-only exclusion, and the allowed edges. All assertions trace correctly against the forbidden_path path-construction logic. ✓

main.rs – success message updated to mention spec 027 3.14; no logic change.

spec.md – increment 1 record is consistent with the implementation constants and tests.

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.

@bartekus
bartekus force-pushed the impl/027-boundaries branch from 29d1ff0 to e485d5b Compare October 20, 2026 15:47
@github-actions

Copy link
Copy Markdown

AI review (no-findings)

Reviewing the three changed files for bugs, security issues, and inconsistencies.

tools/rustev-boundaries/src/lib.rs

The refactor of forbidden_path to accept a forbidden: fn(&str) -> bool parameter is clean; the BFS body is unchanged and both call-sites pass the correct predicate.

forbidden_for_pure is a strict superset of the old hardcoded check (ecosystem | http | executor) — it now also covers is_binding. This tightening is intentional per 3.14.2 and is consistent with PURE_CRATES now including rustev-surface.

forbidden_for_wasm covers exactly the crates the spec forbids: executors (is_executor), HTTP stacks (is_http), Node-API crates (is_napi), and the four explicit names in WASM_FORBIDDEN (rustev-runtime, getrandom, web-sys, wasm-bindgen-futures). wasm-bindgen, wasm-bindgen-macro, and js-sys are intentionally left allowed within the WASM crate's own graph, confirmed by the passing subtest.

The WasmGraph variant contains Vec<String>, so deriving Ord/Eq/PartialEq (which the existing variants already require for BTreeSet use) poses no new problem.

NAPI_FAMILY is a proper subset of BINDING_FAMILIES (first four entries match verbatim), and the membership test in the_node_api_family_is_named_exactly_in_both_rules confirms exact-name matching with a non-member guard — this is correct.

Adding rustev-surface to PURE_CRATES before the crate exists in the workspace is safe: the filter simply matches no packages and the check is silently skipped until the crate is added.

tools/rustev-boundaries/src/main.rs

Success message updated to add spec 027 3.14 — no logic changed.

specs/027-node-and-wasm-bindings/spec.md

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.

@bartekus
bartekus force-pushed the impl/027-boundaries branch from e485d5b to dbd00c9 Compare October 20, 2026 17:01
@github-actions

Copy link
Copy Markdown

AI review (no-findings)

Reviewing the three changed files.

tools/rustev-boundaries/src/lib.rs

  • NAPI_FAMILY and BINDING_FAMILIES are correctly defined per spec 3.14.1. web-sys and wasm-bindgen-futures appear in both BINDING_FAMILIES and WASM_FORBIDDEN; the duplication is harmless but intentional -- forbidden_for_wasm uses WASM_FORBIDDEN for those, not is_binding, to allow wasm-bindgen and js-sys through.
  • forbidden_for_pure adds is_binding to the existing is_ecosystem || is_http || is_executor predicate, correctly extending the transitive check to all binding families (spec 3.14.2).
  • forbidden_for_wasm composes is_executor || is_http || is_napi || WASM_FORBIDDEN.contains matching spec 3.14.3 exactly.
  • forbidden_path refactoring (adding the forbidden: fn(&str) -> bool parameter) is clean; the BFS logic itself is unchanged.
  • The WasmGraph check block (for pkg in members.iter().filter(|p| p.name == WASM_CRATE)) sits inside the same graph-construction scope where graph and by_id are live -- placement is correct.
  • Minor test gap: napi-derive and napi-build are not exercised in the_wasm_graph_refuses_each_forbidden_crate, but both are caught by is_napi in forbidden_for_wasm -- this is a coverage shortfall, not an implementation bug.

tools/rustev-boundaries/src/main.rs

Success message update is accurate and consistent with the new checks.

specs/027-node-and-wasm-bindings/spec.md

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.

@bartekus
bartekus merged commit d29059a into main Oct 20, 2026
7 checks passed
@bartekus
bartekus deleted the impl/027-boundaries branch October 20, 2026 17:20
bartekus added a commit that referenced this pull request Oct 20, 2026
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.
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