Repository navigation
impl(033): increment 5, coverage, seeds and completion - #124
Conversation
AI review (no-findings)Looking at the diff, this PR promotes spec 033 from pending to complete by adding
Golden files -- the trip goldens (
No substantive bugs, security problems, or logic errors found. {"head": "017365ac7918c5ab8ce8a88c4d1e581a040013f4", "verdict": "no-findings", "findings": []}Subject: e1dacd6...017365a, diff digest aa0b89b82f8feaa1d0c2ba72fe91bfa42ab0450b6dc13ae25d0612c0c7855fd1, 1 call(s). An AI comment is not an approval. |
e1dacd6 to
9444b88
Compare
017365a to
c9c5aa6
Compare
AI review (no-findings)Reading through the diff carefully, focusing on logic, consistency with goldens, and mutation seed correctness.
Golden table (
Ordering implied by golden mixed-cause cases: None < Caller < Host < Upstream, which is what the mutation seed Mutation seeds: The seed targeting
Spec changes: No bugs, security issues, or inconsistencies found. {"head": "c9c5aa677abfd638780ab20ec62c205c421b8775", "verdict": "no-findings", "findings": []}Subject: 9444b88...c9c5aa6, diff digest 5ce77fb9ccca33c3e7b4e94c78033c59a96b59d4ec13295106e14f339c3d87ff, 1 call(s). An AI comment is not an approval. |
9444b88 to
fc88043
Compare
c9c5aa6 to
f0c1aaf
Compare
AI review (no-findings)Reviewing the diff: a new test file (
Mutation seeds — Seeds 1 ("party combination prefers caller") and 4–6 target files not in this diff ( Golden files — Spec — Status flip from No logic bugs, security issues, or spec inconsistencies found. The missing-newline in the four trip golden files is a minor style point, not a correctness issue. {"head": "f0c1aaf79807e4949238f5e3f4ecf76ba9a7bfb5", "verdict": "no-findings", "findings": []}Subject: fc88043...f0c1aaf, diff digest 5ce77fb9ccca33c3e7b4e94c78033c59a96b59d4ec13295106e14f339c3d87ff, 1 call(s). An AI comment is not an approval. |
fc88043 to
480d38c
Compare
f0c1aaf to
569ef74
Compare
AI review (no-findings)Reviewing the diff for spec 033, increment 5: coverage, seeds, and close. Makefile — Adding
Golden files — The trip goldens omit a trailing newline (differ from addressing.json which explicitly appends
No bugs, security issues, or inconsistencies found. {"head": "569ef74abed15e6347b621617b31158155769a99", "verdict": "no-findings", "findings": []}Subject: 480d38c...569ef74, diff digest 5ce77fb9ccca33c3e7b4e94c78033c59a96b59d4ec13295106e14f339c3d87ff, 1 call(s). An AI comment is not an approval. |
569ef74 to
59c9a9c
Compare
AI review (no-findings)The diff is a well-scoped increment: it publishes
Mutation seeds ( Test logic (
Golden files – the trip-refused and trip-dropped goldens are single-line canonical JSON. The refused case traces Spec update – status change to No bugs, security issues, or inconsistencies found. {"head": "59c9a9ceb7baa8d03892434550a1b5d30e9a3963", "verdict": "no-findings", "findings": []}Subject: e91ff92...59c9a9c, diff digest 5ce77fb9ccca33c3e7b4e94c78033c59a96b59d4ec13295106e14f339c3d87ff, 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 033, increment 5 of 5: remaining coverage, mutation seeds, Verification and
implementation: complete. Stacked on #123.crates/rustev-core/tests/actionability_rows.rs: the computed party of every cause class as the goldenactionability.addressing.json(each provenance class declared/not declared caller-controlled, observed/accepted, mixed accepted,backendper origin, budget, deadline, capability, policy, no cause, mixed combinations) via the now-publicrustev_core::computed_party;downgrade_gradeover spec 032 fixtures (authoritative to estimated, ahintstayshint, a pass changes nothing);provenance_withinon a step value;relaxandrelaxed{by};escalate; third-party plus user-supplied missing fields computedupstream; a terminal check issuing no semantic request on support routing; the future-window example as judgment 2 and evidence 2 goldens.make verifyruns 033.