open-standards/joule-code/joule-code-rs/crates/joule-code-conformance/Cargo.toml
Transaction Science 4f91795f10 joule-code: SPEC §5.1 grant-gated consultation + conformance class C5
The JcpGate landed as code; this makes it part of the
standard.

SPEC §5.1 (OPTIONAL) — the JCP binding, normatively:

  tier as action       a stage is consulted only if the
                       chain's leaf grant names its verb;
                       no l4 in the chain → no remote
                       frontier agent, structurally
  energy as budget     each consultation debits the tier's
                       §1.1 class marker (µJ: 1 / 10 / 10³ /
                       10⁶ / 10⁷, honest Estimator) from
                       EVERY link of the chain
  denial as fallthrough
  every consultation seals as a chained JCR-1 receipt with
  machine-readable deny reasons

  Readiness: Solid — the jcp runtime and chained receipts
  exist today; the binding is composition.

CONFORMANCE C5 — gated_cascade_vectors.json (6 vectors)

  Unlike C1–C4's wire round-trips, C5 runs the REAL jcp
  runtime end to end: fixed fixture identities (issuer
  [1;32], agent [2;32], steward [7;32]) + fixed per-tier
  costs make every vector deterministic. Each vector
  pins closing tiers per run, total µJ debit, and the
  sealed verdict sequence:

    ungranted l4 denied even when it would close
    granted l4 closes and debits its class (10_000_010)
    exhausted budget stops the escape hatch on run 2
      (deny sealed with reason budget-exceeded)
    earlier close → later tiers never consulted
    denied probe still reaches a granted deeper tier
      (l2 deny + l3 allow in one walk)
    repeated cheap closes accumulate exact debits (3×10)

  verify_gated_cascade extracts every sealed receipt and
  compares verdicts AND deny-reason strings — a denial is
  evidence, not a silent skip, and the suite proves it.

  Pack: 24 passed, 0 failed. Workspace: 33 green.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-06-10 11:18:59 -04:00

31 lines
949 B
TOML

[package]
name = "joule-code-conformance"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
description = "Joule Code — conformance harness: round-trip the published wire vectors (SPEC §8)."
default-run = "joule-code-conformance"
[dependencies]
joule-code-schema.workspace = true
joule-code-cargo.workspace = true
joule-code-receipt.workspace = true
joule-code-cascade.workspace = true
joule-code-jcp = { path = "../joule-code-jcp" }
jcp-schema = { path = "../../../../jcp/jcp-rs/crates/jcp-schema" }
jcp-grant = { path = "../../../../jcp/jcp-rs/crates/jcp-grant" }
jcp-receipt = { path = "../../../../jcp/jcp-rs/crates/jcp-receipt" }
ed25519-dalek.workspace = true
serde.workspace = true
serde_json.workspace = true
hex.workspace = true
[[bin]]
name = "joule-code-conformance"
path = "src/main.rs"
[[bin]]
name = "gen-vectors"
path = "src/bin/gen_vectors.rs"