From 7532f6a392b1dc28b19a08da77433f053c959da0 Mon Sep 17 00:00:00 2001 From: Transaction Science Date: Wed, 22 Jul 2026 10:29:18 -0400 Subject: [PATCH] =?UTF-8?q?joule-code:=20repair=20jcp=5Fschema::Grant=20li?= =?UTF-8?q?terals=20=E2=80=94=20second=20cross-workspace=20break?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit joule-code does not compile against main. `jcp-schema`'s Grant gained `budget_funds` (dual ceilings) and `caveats` (§4.9), and three Grant literals in joule-code-jcp and joule-code-conformance were never updated, so the whole workspace fails with E0063. This is the SAME break already repaired in sandbox-jcp, in a second workspace I missed. The cause is structural, not incidental: `jcp-schema` is path-depended on from at least three OTHER cargo workspaces — sandbox/sandbox-rs → ../../../../jcp/jcp-rs/crates/jcp-schema joule-code/… → ../../../../jcp/jcp-rs/crates/jcp-schema jouledesk/… → ../../../../jcp/jcp-rs/crates/jcp-schema — and none of them is in jcp's workspace, so `cargo test --workspace` inside jcp/jcp-rs is green while three sibling workspaces are broken. Adding a required field to a shared schema type silently breaks every consumer outside the workspace that CI and local verification actually build. Surveyed all four jcp-consuming workspaces rather than guessing: joule-code was broken (2 errors), jouledesk imports the types but constructs no Grant literal, sandbox was already repaired, jcp itself green. Only joule-code needed the fix. Two of the three literals took the patch mechanically; the third used FIELD SHORTHAND (`budget_uj,` with no colon) and escaped a `budget_uj:` pattern — the same shorthand that escaped this same class of patch twice earlier. Worth remembering: shorthand initializers are invisible to `field:`-shaped searches. 39 joule-code suites green; all four workspaces now compile. Co-Authored-By: Claude Opus 4.8 --- .../joule-code-rs/crates/joule-code-conformance/src/lib.rs | 2 ++ joule-code/joule-code-rs/crates/joule-code-jcp/src/lib.rs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/joule-code/joule-code-rs/crates/joule-code-conformance/src/lib.rs b/joule-code/joule-code-rs/crates/joule-code-conformance/src/lib.rs index b983937e1..57392cc3b 100644 --- a/joule-code/joule-code-rs/crates/joule-code-conformance/src/lib.rs +++ b/joule-code/joule-code-rs/crates/joule-code-conformance/src/lib.rs @@ -478,6 +478,8 @@ pub fn verify_gated_cascade(json: &str) -> Result { subject: Did::from_verifying_key(&agent.verifying_key()), capability: Capability::new(tree, v.granted_actions.iter().map(String::as_str)), budget_uj: v.budget_uj, + budget_funds: None, + caveats: Vec::new(), expiry: 0, parent: None, delegate_depth: None, diff --git a/joule-code/joule-code-rs/crates/joule-code-jcp/src/lib.rs b/joule-code/joule-code-rs/crates/joule-code-jcp/src/lib.rs index 48d7b303d..fa4c7b4a0 100644 --- a/joule-code/joule-code-rs/crates/joule-code-jcp/src/lib.rs +++ b/joule-code/joule-code-rs/crates/joule-code-jcp/src/lib.rs @@ -110,6 +110,8 @@ impl JcpGate { actions.iter().copied(), ), budget_uj, + budget_funds: None, + caveats: Vec::new(), expiry: 0, parent: None, delegate_depth: None, @@ -256,6 +258,8 @@ mod tests { subject: did(&agent), capability: Capability::new(tree, actions.iter().copied()), budget_uj: budget, + budget_funds: None, + caveats: Vec::new(), expiry: 0, parent: None, delegate_depth: None, -- 2.54.0 (Apple Git-157)