open-standards/joule-code/conformance/v1/gated_cascade_vectors.json
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

97 lines
2.4 KiB
JSON

[
{
"name": "c5-ungranted-l4-denied-even-when-it-would-close",
"stages": [
{ "tier": "l1", "closes": false },
{ "tier": "l4", "closes": true }
],
"granted_actions": ["l0", "l1", "l2", "l3"],
"budget_uj": 1000000000000,
"runs": 1,
"expected": {
"closing_tiers": [null],
"spent_uj": 10,
"verdicts": ["allow", "deny"],
"deny_reasons": ["action-not-granted"]
}
},
{
"name": "c5-granted-l4-closes-and-debits-its-class",
"stages": [
{ "tier": "l1", "closes": false },
{ "tier": "l4", "closes": true }
],
"granted_actions": ["l1", "l4"],
"budget_uj": 20000000,
"runs": 1,
"expected": {
"closing_tiers": ["l4"],
"spent_uj": 10000010,
"verdicts": ["allow", "allow"],
"deny_reasons": []
}
},
{
"name": "c5-exhausted-budget-stops-the-escape-hatch-on-the-second-run",
"stages": [
{ "tier": "l1", "closes": false },
{ "tier": "l4", "closes": true }
],
"granted_actions": ["l1", "l4"],
"budget_uj": 10000020,
"runs": 2,
"expected": {
"closing_tiers": ["l4", null],
"spent_uj": 10000020,
"verdicts": ["allow", "allow", "allow", "deny"],
"deny_reasons": ["budget-exceeded"]
}
},
{
"name": "c5-earlier-close-means-later-tiers-are-never-consulted",
"stages": [
{ "tier": "l0", "closes": true },
{ "tier": "l4", "closes": true }
],
"granted_actions": ["l0", "l4"],
"budget_uj": 20000000,
"runs": 1,
"expected": {
"closing_tiers": ["l0"],
"spent_uj": 1,
"verdicts": ["allow"],
"deny_reasons": []
}
},
{
"name": "c5-denied-probe-still-reaches-a-granted-deeper-tier",
"stages": [
{ "tier": "l2", "closes": false },
{ "tier": "l3", "closes": true }
],
"granted_actions": ["l3"],
"budget_uj": 2000000,
"runs": 1,
"expected": {
"closing_tiers": ["l3"],
"spent_uj": 1000000,
"verdicts": ["deny", "allow"],
"deny_reasons": ["action-not-granted"]
}
},
{
"name": "c5-repeated-cheap-closes-accumulate-exact-debits",
"stages": [
{ "tier": "l1", "closes": true }
],
"granted_actions": ["l0", "l1"],
"budget_uj": 1000,
"runs": 3,
"expected": {
"closing_tiers": ["l1", "l1", "l1"],
"spent_uj": 30,
"verdicts": ["allow", "allow", "allow"],
"deny_reasons": []
}
}
]