Repository navigation
impl(042): increment 1, serve and plan-bundle contract documents - #180
Conversation
AI review skipped: oversizedThe change adds 23857 lines, over the backstop of 20000. This pull request was not reviewed by the AI reviewer. A green ci-gate does not say otherwise. |
c392c86 to
2a6e95f
Compare
34f29ea to
16444d5
Compare
AI review (findings)Looking at the PR, I'll examine the core Rust modules, schemas, TypeScript bindings, and spec changes. Rust implementation review
TypeScript bindings — concrete defect The export type RustevServeDecide1 = {
context?: Context | null;
decision_id: Handle;
evaluation_time: Timestamp;
schema: "rustev.serve-decide/1";
snapshot?: EmbeddedRustevSnapshot_1 | null;
} & {
[k: string]: unknown | undefined; // ← open index signature
};The schema file Other observations (not bugs)
{"head": "2a6e95fe1df0fe94f16d2cb8ff9e0841c7e7f9f3", "verdict": "findings", "findings": [{"path": "integrations/rustev-node/types/rustev-documents.d.ts", "line": null, "summary": "RustevServeDecide1 is emitted as an open intersection type with an index signature, allowing arbitrary extra properties in TypeScript despite the schema having additionalProperties:false and the parser enforcing deny_unknown_fields; callers can silently construct invalid requests."},{"path": "integrations/rustev-wasm/types/rustev-documents.d.ts", "line": null, "summary": "Same open index-signature defect on RustevServeDecide1 as in the node bindings — contradicts additionalProperties:false in the schema and deny_unknown_fields in the parser."}]}Subject: 34f29ea...2a6e95f, diff digest b4108274ab1f92c86aad52cbff4979adf80a169b9f2214945468963c3c373a80, 1 call(s). An AI comment is not an approval. |
2a6e95f to
76331d3
Compare
084fb73 to
c698af2
Compare
76331d3 to
18501af
Compare
AI review (findings)Reviewing the PR, which adds contract documents for spec 042 (decision service and remote seams): Schema and Rust logic The bounded parsers, TypeScript declarations The No other concrete defects found. The {"head": "18501af75705963dadce1924d07a05224c0b0538", "verdict": "findings", "findings": [{"path": "integrations/rustev-node/types/rustev-documents.d.ts", "line": null, "summary": "Optional non-nullable fields (attempts, snapshot, context, judgment, run_record, compile_refusal) are typed as T | null in the TypeScript declarations even though the Rust parser rejects null for them; the JSON Schema's not:{type:null} constraint is not being honored by the declaration generator, producing a false type contract for Node and WASM consumers."}, {"path": "integrations/rustev-wasm/types/rustev-documents.d.ts", "line": null, "summary": "Same false T | null type contract for the same optional non-nullable fields in the WASM bindings type declarations."}]}Subject: 3119423...18501af, diff digest 84461ed218946f6ff0a45240123359170564397620070e556068530a6bae537a, 1 call(s). An AI comment is not an approval. |
18501af to
235ce4d
Compare
AI review (findings)Reviewing the diff for bugs, security issues, and inconsistencies across the new Schema–parser byte-vs-codepoint gap (documented, not a defect): The JSON schema
Concrete defect —
{"head": "235ce4d1abec20a2085635eab958fb6a4b745da1", "verdict": "findings", "findings": [{"path": "crates/rustev-contract/src/plan_bundle.rs", "line": 84, "summary": "PlanBundle::digest() uses crate::canonical::canonical_bytes while Document::canonical() (injected by service_document!) uses canonical_envelope; the two functions may produce different byte sequences for the same bundle, making bundle_digest irreproducible from canonical() and breaking verifiers that compute hash(canonical(bundle))."}]}Subject: 3119423...235ce4d, diff digest d697dede4ee59d2d0b49942c381eb693e939c83d4d10889a14cb15220d495f03, 1 call(s). An AI comment is not an approval. |
235ce4d to
4586b18
Compare
AI review (no-findings)Reviewing the PR, which adds the "serve half" contract documents for spec 042: the
Strips TCP addresses, Unix socket paths, and Governance Changed paths include no No concrete defects found. {"head": "4586b1881a33fbf05c922950cc733a807d8bacbd", "verdict": "no-findings", "findings": []}Subject: 5a3fe1f...4586b18, diff digest 5811bbc9094cd28faa79ba7fa8e2b602de004db1053b4cd8d88f3061354208d4, 1 call(s). An AI comment is not an approval. |
4586b18 to
90296c2
Compare
AI review (no-findings)I reviewed the entire diff carefully: the new Structural and correctness checks:
Security checks:
No concrete defects found. {"head": "90296c2d95edcc421c2668d017acc6e9907905c3", "verdict": "no-findings", "findings": []}Subject: 5a3fe1f...90296c2, diff digest afce9a1ed45f9a52d989523112c2bcefd6a88a301c236bf4f9abb5fb8099006d, 1 call(s). An AI comment is not an approval. |
90296c2 to
7396b95
Compare
AI review (findings)ReviewThe PR introduces the "serve half" of spec 042: contract documents for the decision-service protocol ( Finding 1 — Missing cross-field constraint:
|
7396b95 to
1b59278
Compare
AI review (findings)Reviewing the PR, which adds contract documents for the decision service (spec 042): new Code and schema review
Concrete defect —
// crates/rustev-contract/src/plan_bundle.rs (SigstoreBundle Deserialize)
let raw = Box::<serde_json::value::RawValue>::deserialize(d)?;
// ...
let value: serde_json::Value =
parse_bounded(raw.get().as_bytes(), &limits).map_err(serde::de::Error::custom)?;
// raw is dropped; only `value` is stored
Ok(Self(value))When re-serialized (e.g., for No issues found with the spec update (which honestly labels bound choices as agent-selected, not owner-ratified), the archive-policy additions, or the TypeScript declarations (they correctly reflect the generated schemas). {"head": "1b592789867157e79e62732af264684ffe93431c", "verdict": "findings", "findings": [{"path": "crates/rustev-contract/src/plan_bundle.rs", "line": 113, "summary": "SigstoreBundle converts the deserialized RawValue to serde_json::Value and discards the original bytes, so re-serialization can change whitespace and number formatting; unlike CompilerRefusal (which stores RawValue), this breaks byte-perfect round-tripping required by Sigstore verification libraries."}]}Subject: 66eabb7...1b59278, diff digest 3caa1b3aae8cd66bbf1cbcb4ba3c61fd6cd4109ccc92a7e94241203786017973, 1 call(s). An AI comment is not an approval. |
c9b4ce1 to
424c83b
Compare
AI review (findings)Reviewing the PR, which adds contract documents for the decision-service protocol (spec 042 increment 1):
The function detects matches!(
s.get(),
"\"rustev.serve-decision/1\"" | "\"rustev.serve-refusal/1\""
)This is correct:
The comment at line ~720 acknowledges that if (self.status == DecisionStatus::EvidenceNotDelivered) != self.run_record.is_some() {
return Err("run_record is required only for evidence_not_delivered".into());
}If a decision reaches
The added text reads "Engineering choices made by the implementing agent … not by the owner". The governance rules (AGENTS.md, constitution §III) require that normative bounds be owner-ratified. By embedding these as observed fact in the spec body rather than in an Everything else checked and found correct:
{"head": "424c83bf2bd18040005ad57e9ac47dc4bfdd1115", "verdict": "findings", "findings": [{"path": "crates/rustev-contract/src/serve.rs", "line": 720, "summary": "The comment states that `evidence_not_delivered` can arise after cancellation (no run record), but the validation unconditionally requires `run_record` for every `evidence_not_delivered` decision, making the cancelled-plus-delivery-failure state unrepresentable."}]}Subject: 979fab7...424c83b, diff digest 1c4b178dcaeae1858ee6e99330d278510a0d2325dcaf367fe01fd62b070628cd, 1 call(s). An AI comment is not an approval. |
424c83b to
7c09ad3
Compare
AI review (no-findings)Reading through the diff carefully, I examined the new
Spec update: The new increment section explicitly labels engineering-chosen bounds as "choices made by the implementing agent… not by the owner," consistent with the governance model's handling of unspecified ranges. No concrete defects found. {"head": "7c09ad3da2f6a22b3195287b2813c917757d2d2b", "verdict": "no-findings", "findings": []}Subject: 979fab7...7c09ad3, diff digest d5fe261d03f668877468caf1ed91c311db3c62da7558407a5251e4577a5e3971, 1 call(s). An AI comment is not an approval. |
Amends the spec 010 section 3.4 `rustev-serve` binding record, stacked on #180. - Item 2 (schemas): refuse -> pass. Spec 042's documents now exist in `rustev-contract` (#176, #180) with bounds, emitted schemas and negative fixtures. - Sigstore row: unverified -> pass. `sigstore-verify` 0.15.0 with `default-features = false, features = ["aws-lc-rs"]` verifies a v0.3 bundle offline against a host-supplied trusted root, with no HTTP client, tokio or TUF in its tree (checked with `cargo tree`). Crypto is `aws-lc-rs` 1.18.2, which needs a C compiler and CMake at build time. This is the owner's review act under 3.4 (R-44): implementation of `rustev-serve` waits for the owner's approval of this text, which will be recorded as a dated decision.
Spec 042 increment 1 (serve half), stacked on #176:
rustev.serve/1with its operation table and everyrustev.serve-*/1document, plusrustev.plan-bundle/1,rustev.plan-bundle-signature/1andrustev.plan-registration/1, with emitted schemas and regenerated binding declarations (the.d.tsgrowth is generated: serve envelopes inline the run record and judgment types). Embedded evidence is carried as original bytes (serde_jsonraw_valuefeature; no new dependency). Items that depend on 034 or 036 are held back with extension points. Bounds the spec leaves unstated are recorded as engineering choices in the implementation record. Checks:cargo test -p rustev-contract, clippy, fmt,make gate, couple, gen-types --check.