Skip to content

v3.3.0 — Cybernetic Governance Engine

Choose a tag to compare

@lahlfors lahlfors released this 26 Oct 00:54
· 274 commits to main since this release
5a7104b

Security release. It fixes two published advisories:

Advisory Severity Summary Credit
GHSA-f6xq-23f7-9grm 5.3 Medium Revocation during human review not re-checked after approval (FRIA tier); trade policy limits bypassed by execute_trade_bounded and BTC case variants Reported by Dominik Blain (@dom-omg), Ironproof
GHSA-w39v-5v7h-fxg9 5.3 Medium Model-controlled trader_role raises OPA fiscal limits on the committing trade path Found during maintainer triage

Thank you to Dominik Blain for a careful report that came with runnable tests for each finding and Z3 counterexamples, and to Daniel Fairbanks (@danofairanks) for the reports behind #511, #512, #513, #514, #516 and #519.

Upgrading: this release has breaking changes. Each is marked Breaking below; docs/BREAKING_CHANGES_v3.md covers the GHSA-f6xq-23f7-9grm changes (GH-1 to GH-7).


Release Summary: Security release. Fixes GHSA-f6xq-23f7-9grm and GHSA-w39v-5v7h-fxg9 (both CVSS 5.3 Medium). A trade now executes at most once per transaction_id, an MCP tool call whose outcome is unknown is no longer resent, and single-use Redis writes and evidence-stream appends are retry-safe. The advisor binds the end-user principal to a verified OIDC identity, the evidence custodian recovers a lost custody cursor from WORM attestations, and skill certification receipts bind the stages and evidence they report (cage.skill.cer.v2). Entries marked Breaking change behaviour or interfaces; see also BREAKING_CHANGES_v3.md.

Fixed

  • Approved requests re-run the FRIA tier and answer only the holds the reviewer saw, and the trade policy holds every trade action to its limits (GHSA-f6xq-23f7-9grm, CVSS 5.3 Medium) (fix(security)! — reported by Dominik Blain (@dom-omg), Ironproof, src/gateway/governance/governor/pipeline.py, src/gateway/governance/governor/governor.py, src/gateway/governance/jurisdiction/eu_ai_act/fria_tier.py, src/gateway/governance/governor/stages/opa.py, src/cage_finance/opa/trade_governance.rego). Thank you to Dominik Blain for a careful report, which came with runnable tests for each finding and Z3 counterexamples. Three findings. (1) POST_HITL never re-ran the EU_ECB fria tier, so a determination the normative provider revoked while a human reviewed a held request (or a provider that became unavailable, or an artefact that expired meanwhile) was never observed, and the approved request was sealed. A read-only tier now declares revalidated_after_approval (GovernanceTier; True for mutating tiers, False by default for read-only ones, copied by DomainTierStage), and stage_runs_under(profile, *, name, mutating, revalidated) runs every such tier under POST_HITL, selected by structure, never by name. JurisdictionContribution refuses a tier that does not declare it; FriaTier does. Under POST_HITL a re-run tier's HITL finding is answered only if the approval was given against it: DeferToken.hitl_holds reads the (tier, code) holds of the parked decision, enforce_approved_governance() passes them as PostHitlApproval.approved_holds, and run_pipeline() drops exactly those (answered_by_approval()). A hold the reviewer was never shown is refused [APPROVAL_CONTEXT_DRIFT] (unapproved_holds in the refusal meta) and a HARD finding denies, both spending the approval; a RELIANCE_INELIGIBLE finding defers and keeps it. Re-running the tier without answering the approved hold would have blocked every legitimate approval of a FRIA_EXTERNAL_HOLD; answering every hold would have sealed one the reviewer never saw. OPA's MANUAL_REVIEW is answered the same way: OpaStage used to answer its own review under POST_HITL, so an approval given for another hold (a FRIA hold, for example) also satisfied an OPA review nobody was shown. It now reports governance / OPA_MANUAL_REVIEW under every profile, and only an approval given against that hold answers it. proof/model.py replaces jurisdiction_keeps_post_hitl_set with claim 10 post_hitl_rechecks_jurisdiction and adds claim 14 approval_answers_only_its_holds; state counts are unchanged (38 / 19 / 35, EU 42). (2) trade_governance.rego applied its RBAC ladder only to execute_trade: execute_trade_bounded fell through to the risk-profile rules, which allowed it for any role, amount and asset, and the BTC restriction compared currency exactly, so "btc", "Btc" and "BTC " passed it. Every action in trade_actions (execute_trade, execute_trade_bounded) is now held to the RBAC limits, quota rules and asset restrictions and excluded from the risk-profile rules, so a bounded trade is decided exactly like execute_trade, including one no risk-profile rule matched (no risk_profile, or a senior's speculative), which fell to the default DENY before; risk_profile is caller-supplied, so that DENY was never a control (the same caller could send moderate and be allowed any amount or asset). A trade's currency must name a tradable currency (tradable_currencies, an allowlist: USD, the only currency the reference broker settles), so an alternate code for a restricted asset (XBT) or a look-alike spelling is never admitted, and restricted_assets (BTC, XBT) are refused as the symbol too; both values are compared trimmed and upper-cased. Such a trade is an explicit DENY, and _rbac_deny carries the same condition, so the authorization-claim and token-quota MANUAL_REVIEW rules no longer route it to a human. The advisor's trade params are deliberately not normalised: approval redemption binds symbol, currency and side by exact match (_approval_covers_trade in tool_provider.py), so the policy is where spellings are normalised. (3) The validate_fria() payload named no caller and no correlation id, so provider_01 could not mint a ConsequenceToken and refused every admission. FriaTier now sends the workload identity the gateway verified for the request (current_client_identity()) as actor_id / operator_urn ("" when there is none, never a request value), the active trace id as correlation_id, and a thread_id falling back to that trace id. Tests: tests/governor/test_jurisdiction_wiring.py (the advisory's revoke-during-review scenario, provider outage and artefact expiry at revalidation, unseen-hold drift, approved holds still sealing, no barrier headroom committed on revocation, payload identity), tests/test_formal_profile_parity.py (runtime parity with claims 10 and 14, OPA's hold included), tests/governor/test_post_hitl_approval_spend.py (an approved OPA review seals; one the reviewer never saw is drift), tests/governor/stages/test_opa_stage.py, golden scenario 09 (tests/governor/golden/fixtures.py) and compliance/postures/us_fed/opa/constraints_test.rego (23 new cases, 19 of which fail against the previous policy). OSCAL: the eu-ai-act-art27 statements in system-security-plan-eu-ecb.yaml, AC-3 in system-security-plan.yaml and ISO 42001 A.8.4 in component-definition.yaml. Breaking: stage_runs_under() requires the revalidated keyword; a jurisdiction tier that does not declare revalidated_after_approval = True is refused; a POST_HITL run whose re-run tier reports a HITL hold its approval was not given against is refused instead of sealed; so is one whose OPA verdict is MANUAL_REVIEW unless its approval was given against that review (_violations_for() drops its profile keyword); OPA now denies a bounded trade above the role's limit (or holds it for review in the review band), and any trade whose currency is not USD up to letter case and surrounding spaces (missing, not a string, empty, EUR, XBT, any spelling of BTC) or whose symbol is BTC or XBT in any spelling, even where an authorization claim or a low token quota used to route it to MANUAL_REVIEW.
  • GHSA-f6xq-23f7-9grm follow-ups: the order model validates currency, generated denylists are normalised, and the provider_01 governor path is documented (fix(security)! — from the review of the report by Dominik Blain (@dom-omg), Ironproof, src/cage_finance/models/trade_order.py, src/gateway/governance/stpa_compiler.py). TradeOrder trims and upper-cases currency and refuses anything but three ASCII letters, so a look-alike spelling fails when the order is built, not only in the policy; which currencies are tradable stays the policy's decision (tests/cage_finance/test_trade_order_currency.py). RBAC rules generated by the STPA compiler compared a denylisted value exactly, the same gap as the hand-written policy: _rego_denylist_guard() now emits upper(trim_space(input.<field>)) != "<ENTRY>", the generated AGP sentence refuses the value in any letter case or with surrounding spaces, and trade_hazards.yaml denylists BTC and XBT (tests/test_stpa_compiler.py, tests/test_stpa_compiler_agp.py); the committed config/ artifacts define no RBAC rules and are unchanged. config/agent_scope.yaml records the tradable and prohibited currencies. The provider_01 wire harness (scripts/verify_flowsignal_wire_and_hostile.py) takes the actor from FriaTier's caller_identity instead of writing it into the payload. The request facts provider_01 still takes on trust (constant mandate and KYA status, permissive request defaults) are tracked as POAM-2026-113, and the provider_01 README describes the governor path: the identity in the payload, the ConsequenceToken that decision D2 leaves off the routing seal, and the empty target. OPA_MIGRATION_PROCESS.md now names the live policy file, its Rego tests and the CI job that runs them. SECURITY.md lists the advisory and thanks the reporter. Breaking: a TradeOrder whose currency is not three letters after trimming raises ValidationError (the broker actuator reports ORDER_CONSTRUCTION_FAILED), and order.currency is upper-case; generated RBAC rules refuse a denylisted value in any letter case or spacing.
  • The advisor binds the end-user principal to a verified OIDC identity and refuses or marks unverified principals by posture (feat(advisor), #520 — src/governed_financial_advisor/infrastructure/auth.py, src/governed_financial_advisor/server.py, src/governed_financial_advisor/geap_app.py, src/governed_financial_advisor/infrastructure/gateway_client.py, src/governed_financial_advisor/utils/context.py, src/gateway/governance/ingress/agw_adapter.py, src/gateway/governance/seams/credential_broker.py): Added PrincipalIdentity, verify_user_oidc_token(), and resolve_request_principal() to authenticate end-user OIDC tokens (Authorization: Bearer <jwt>, X-CAGE-User-Token, or X-GEAP-User-Assertion) against out-of-band kid-resolved trust anchors (CAGE_USER_OIDC_JWKS_JSON or CAGE_USER_OIDC_TRUST_ANCHORS_FILE) while rejecting embedded key headers (jwk, jku, x5c, x5u). A verified principal is carried end-to-end through user_context, principal_verified_context=True, span attributes enduser.id + cage.principal.verified=true, and outbound GatewayClient._build_headers() headers x-cage-principal, x-cage-principal-verified: true, and x-geap-user-id; a body user_id that conflicts with the authenticated token claim is refused with HTTP 403 before graph execution. Requests without a verified OIDC token are refused with HTTP 401 when requires_verified_principal() holds (enforcing postures production/staging, when CAGE_USER_OIDC_ISSUER is configured, or when CAGE_REQUIRE_VERIFIED_PRINCIPAL=true, unless CAGE_ALLOW_ASSERTED_PRINCIPAL=true in non-enforcing posture) and are explicitly marked unverified (verified=False, cage.principal.verified=false, x-cage-principal-verified: false) in permissive postures (dev, test, ci). On the GEAP Agent Gateway path, AgwAdapter.evaluate_request_authz() now fails closed (UNAUTHENTICATED, HTTP 403) when require_verified_user holds and tri_identity.user_verified is False, and validate_tri_identity_binding() requires user_verified=True on TriIdentityCredentialBinding before releasing delegated ID-3 OAuth credentials.
  • Evidence custodian recovers a lost custody cursor from WORM attestations (fix(compliance), #519 — reported by Daniel Fairbanks (@danofairanks), src/compliance_bridge/evidence_custodian.py, tests/test_evidence_custodian.py, docs/architecture/EVIDENCE_CHAIN.md): EvidenceCustodian stores <stream_key>:custody in the same Redis database as the evidence stream, so a full Redis loss (FLUSHDB, failover to an empty replica, volume loss) wiped both the stream and the cursor and caused _check_continuity() to treat a newly started genesis chain as a clean first-ever start. When the Redis cursor is absent, _recover_cursor_from_cold_store() now enumerates evidence-stream/ via EvidenceColdStore.list_keys(), validates every attestation for stream_key (enforcing assert_citable() on .attestation.json and failing closed with EvidenceCustodyIntegrityError on malformed JSON, schema, sequence ranges or stream IDs), and selects the latest custodied batch across chains using declared CHAIN_ROTATION lineage and (last_stream_id, last_sequence) ordering. On a full Redis wipe followed by a new chain, custody reads from the start of the new stream (min="-", including when a new chain starts in the same millisecond) and records GAP_KIND_CHAIN_ROTATION (or preserves previous_chain_id, previous_last_sequence and previous_last_record_hash alongside expected_sequence: 0 if the new chain's genesis was already trimmed); on cursor-only loss on the active chain, it restores the cursor in Redis and resumes after last_stream_id without duplicate batches or missed trim gaps.
  • Single-use Redis operations are retry-safe (fix(gateway); found while fixing #511, reported by Daniel Fairbanks (@danofairanks)). Pooled clients from build_async_redis() retry ConnectionError and TimeoutError, so when a reply is lost redis-py re-sends a command the server already ran, and a single-use write then saw its own first success as a conflict. Each write now stores a random per-attempt op_id (redis_single_use.py); a re-send that finds its own op_id reports the original success, and every other writer, including a genuine replay, is refused exactly as before. Fixed: the routing-seal consume script and revoke_seal() (a consumed seal read as a replay; a revocation that took effect returned False); DeferQueue.park(), now one atomic script (a re-sent HSETNX left a token with no status, TTL or expiry-index entry, so it could never be approved or expire); the revision CAS behind approve() and _resolve() (a quorum approval returned NOT_FOUND, an injection resolved the ticket but dropped its injection_data, an expiry skipped the DLQ); atomic_resolve() (a spent approval was refused as a replay); ConsequenceAuthorityStore.consume_once(), whose marker is now <binding>:<op_id> (get_binding() still returns the binding); and the DPoP jti claim in dpop_validator.py. The GCRA limiter in rate_limit.py still charges a re-sent request twice: that only ever throttles more, and is documented. Tests: tests/test_redis_lost_reply.py.
  • Evidence stream appends are retry-safe; restore and custody fail closed on truncation (fix(governance), #511 — reported by Daniel Fairbanks (@danofairanks)): The pooled async Redis client re-sends a command whose reply was lost, and EvidenceStreamSink treated the re-sent compare-and-append's CONFLICT (its own batch was now the head) as a lost race and re-sealed the same batch at the next sequence, writing duplicate records that still hash-verified. _APPEND_BATCH_SCRIPT now also receives the batch's last record_hash and timestamp_utc and answers ALREADY with the batch's entry IDs when that record is the head. On a real CONFLICT the sink first reads the k entries after the record the batch was sealed against and resolves from them if the batch had landed before another writer appended. A ConnectionError / TimeoutError re-sends the identical ARGV (_MAX_SETTLE_ATTEMPTS) instead of re-sealing, and a batch whose outcome stays unknown fails with the new EvidenceAppendUnsettledError (ingest_sync() refuses to seal; best-effort ingest() returns None). The unused single-record _APPEND_SCRIPT is removed. _restore_chain_state() now verifies the head's own hash with verify_record() and tracks the last acknowledged head: a sink that already holds a chain raises EvidenceChainCorruptError on an emptied stream, a head on another chain, or a head behind (or rewritten at) its last acknowledged sequence instead of silently starting a new chain, while a fresh sink on an empty stream still cold-starts. EvidenceCustodian records a new chain at genesis after another chain was custodied as a CHAIN_ROTATION gap (CRITICAL log, cage_evidence_custody_gaps_total, previous chain id / last sequence / last record hash in the attestation) instead of a clean rotation, and CustodyVerifier reports it as a declared gap (DeclaredGap.kind, missing_to: None) that blocks citation unless explicitly allowed. OSCAL AU-9 / AU-10 statements updated in sp800-53-component-definition.yaml.
  • The advisor's end-user principal is marked as asserted, not authenticated (fix(advisor)!, #516 — reported by Daniel Fairbanks (@danofairanks), src/governed_financial_advisor/models/query.py, src/governed_financial_advisor/models/principal.py, src/governed_financial_advisor/infrastructure/gateway_client.py, src/governed_financial_advisor/server.py, src/gateway/governance/ingress/agw_adapter.py): CAGE_API_KEY authenticates the calling client, not a user, so the user_id the advisor forwards as x-cage-principal is the caller's assertion. QueryRequest.user_id no longer defaults to default_user: it is required and must be 1–64 characters matching ^[A-Za-z0-9._:@/-]+$, the gateway's principal charset and cap. GatewayClient._build_headers() now passes x-geap-user-id through the same principal_header_value() sanitizer and 64-character cap as x-cage-principal; it was forwarded raw. The /agent/query span records cage.principal.verified=false next to enduser.id. On the Agent Gateway path, GeapTriIdentityContext gains user_verified, true only when ID-1 comes from the act_sub / user_sub claim of a verified OIDC token, and records it as id1_user_verified in the envelope claims; no authorization decision reads ID-1. The new Principal Trust Model section states the boundary; binding the principal to an authenticated identity is a follow-up. Breaking: POST /agent/query returns HTTP 422 when user_id is missing, empty, longer than 64 characters, or outside that charset.
  • Routing-verdict reuse binds the full order, and the advisor's trade previews cover every trade step (fix(advisor), #513 — reported by Daniel Fairbanks (@danofairanks)): trade_contract.py matched plan steps by substring, so buyer_survey, executed_report and bestseller_scan were trades that failed with "Invalid trade amount None" and counted toward MAX_CONSECUTIVE_DENIALS. A step is now a trade only when its action is exactly one of TRADE_STEP_ACTIONS (execute_trade, trade, buy, sell, ignoring case). extract_trade_step() returned only a plan's first trade step, so safety_check_node reported APPROVED and reset the denial budget on step 1 alone. extract_trade_steps() returns every trade step: the safety node submits each to POST /governance/validate-action (a refusal of any step blocks the plan and counts one denial; a deferral parks it unless a later step is refused), and evaluator_node dry-runs each. A missing confidence was previewed as 1.0 while execute_trade_action defaults it to 0.0; it is now previewed as 0.0, and a boolean, non-numeric or non-finite confidence is rejected. canonical_trade_digest() bound only part of the order, so a cached ALLOW was reused for a call with a different limit_price, account_id, order_type, venue, agent_id or transaction_id. The digest now binds the exact confidence and refuses any field outside the canonical payload (other than the tool_name / action keys gateway_tool_guard adds), so such a call is always re-validated, and only a single-trade plan answered ALLOW is cached. Tests: tests/test_trade_contract.py.
  • MCP tool calls are no longer resent after an unknown outcome (fix(gateway)!, #514 — reported by Daniel Fairbanks (@danofairanks)). GatewayMCPClient.call_tool() caught any exception from session.call_tool, reconnected and sent the same arguments again, so a trade whose response was lost (read timeout, connection reset) ran a second, fully governed time. It now retries once only when nothing was sent (the session could not be established) or when the gateway's MCP ToolAnnotations mark the tool readOnlyHint or idempotentHint. Otherwise it raises MCPToolOutcomeUnknownError, chained from the transport error, and the caller must reconcile. A CallToolResult with isError set raises MCPToolExecutionError instead of being returned as text, and is never retried. A session whose transport has closed is re-established before a request is sent. The gateway tools declare their hints (tool_provider.py, mcp_tool_server.py): market status and sentiment and simulate_governance_check are read-only, trigger_safety_intervention is idempotent, and execute_trade_action is destructive and not idempotent. The evaluator tools (agent.py) map both errors to their ERROR results. The STPA saga template (stpa_compiler.py) now sends only the state keys a saga lists in the new, required langgraph_saga.mcp_arguments (UCA-4: symbol, amount, currency, side, transaction_id; it used to send fields the tool does not take, such as approval_token and account_id), parses the tool's text answer instead of calling .get() on it, records the request in the PENDING intent, and leaves that entry PENDING for reconciliation on an unknown outcome (saga_nodes.py regenerated). The advisor's unused trade wrappers (execute_trade and propose_trade) and their test are removed. Breaking: call_tool raises MCPToolExecutionError for an isError result instead of returning its text, and an STPA saga with execution_type: mcp_tool must declare mcp_arguments.
  • A trade executes at most once per transaction_id (fix(governance)!, #514 — reported by Daniel Fairbanks (@danofairanks)). transaction_id was documented as an idempotency key, but nothing deduplicated on it: the clearance nonce was random and the Alpaca order carried no client_order_id, so a resubmitted execute_trade_action was governed and actuated again. The new kernel ExecutionLedger (governor.components.execution_ledger, built by assemble_governor() over the gateway's shared Redis client) claims cage:exec:{action}:{caller_identity}:{key} with SET NX EX and a per-attempt token, and records EXECUTED, BLOCKED or UNKNOWN with a Lua compare-and-set on that token. Under an enforcing posture without Redis it refuses; DEV, TEST and CI fall back to a process-local registry. execute_trade_action now requires a UUIDv4 or UUIDv5 transaction_id, claims it before governance, answers a resubmission with the original outcome without governing it again, or raises UnsettledDuplicate while the first attempt is in flight or its outcome is unknown (either refusal is recorded in the evidence stream through the new record_refusal() in governance_middleware.py), records the outcome on every exit, and keeps the claim after an UNKNOWN actuation pending reconciliation. A resubmission that carries an approval (deferred_id) may re-claim a key whose earlier attempt was BLOCKED, so a deferred trade still redeems its approval under the same transaction_id; the gateway verifies and spends the approval before anything runs, and a key whose trade may have executed is never claimed again. Keys are namespaced by action only, because the tool is also reached through the gateway's HTTP /tools/execute dispatch, which carries no request context. TradeOrder accepts UUIDv4 and UUIDv5 transaction ids, the Alpaca order carries client_order_id (trade_executor.py), and the advisor's gateway_tool_guard replaces every execute_trade_action call's transaction_id with a UUIDv5 derived from the LangGraph thread and the tool call id, so a re-run of the same call resubmits the same key; the guard previews the order without that key, so a previewed routing verdict stays reusable. execute_trade_action is now annotated idempotentHint, so GatewayMCPClient may resend it once after a send-phase failure, and the ledger answers the resend. Breaking: execute_trade_action refuses a call without a UUIDv4 or UUIDv5 transaction_id instead of generating one.
  • The trade policy's role is bound to the caller's verified workload identity (GHSA-w39v-5v7h-fxg9, CVSS 5.3 Medium) (fix(security)!, src/cage_finance/tools/trader_binding.py, src/cage_finance/tools/trade_inputs.py, src/gateway/server/workload_identity.py). trader_role and trader_id were arguments of the execute_trade_action MCP tool that the governed trader and the tool guard forwarded unchanged to trade_governance.rego, which sets a trade's limits by role, so a prompt-injected senior lifted the unreviewed limit from $5,000 to $500,000 on the committing trade path. TradeInputResolver now owns both keys and binds them on every path that evaluates a trade (validate-action previews, the committing run, POST_HITL re-runs) from the identity WorkloadIdentityMiddleware verified for the request, read through the new kernel accessor current_client_identity(). CAGE_TRADER_ROLE_BINDINGS (a JSON object) maps a verified identity to junior or senior, optionally with a trader_id; an unbound identity is junior, trader_id defaults to the identity, and an invalid configuration stops the finance plugin from assembling. Without a verified identity an enforcing posture binds no role, so OPA denies; dev, test and CI bind junior. Breaking: execute_trade_action and its MCP schema no longer take trader_role or trader_id (a /tools/execute call that still passes them fails with an error before any governance runs, so nothing executes), and the advisor no longer sends a role: trade_params(), TRADE_PARAM_KEYS and the advisor's ExecutionPlan drop it (so canonical_trade_digest() binds no role and refuses a payload that still names trader_role or trader_id), and DEFAULT_TRADER_ROLE is removed. STPA control-action params gain a generic server_bound: true flag, and a saga whose mcp_arguments names a server-bound param of its forward action fails control-structure validation, so no generated saga tool call can send one. The advisor's gateway_tool_guard now strips a model-supplied deferred_id from every executed tool call, not only from the validate-action params; only the approved resume adds one. Found during maintainer triage.
  • The OSCAL exporter keeps hand-maintained FTRA statements (fix(compliance) — src/gateway/governance/oscal_ssp_exporter.py, tests/test_oscal_ssp_exporter.py). Each export replaced the FTRA component of component-definition.yaml wholesale, so the committed SI-10 statement, which names the domain's UCA rules and OPA policy files, was overwritten by the kernel's seed text, which may name no domain path (Gate G3). _apply_ftra_component_patch() now keeps each existing statement's text, matched by implemented-requirement UUID, and replaces only the component's structure and machine fields such as last-compiled; a statement with no text is seeded, so deleting a description re-seeds it. The seed sentence no longer reads "STPA UCA rules (domain STPA UCA rules)".

Changed

  • Skill certification receipts bind the evaluation stages and evidence (cage.skill.cer.v2) (feat(compliance)!, #512 — reported by Daniel Fairbanks (@danofairanks)). A stage-0-only .cer receipt signed a mean composite lift of 0.0, a hard-coded model_id and evals_sha256 = sha256(b""), and the default GcsSkillCertificationVerifier accepted it without the SKILL.md bytes. SkillCertificationReceipt now signs stages_run, an evidence_level (CerEvidenceLevel: STATIC_ONLY, PAIRED_TRACES or LIVE_ROLLOUT), baseline_traces_sha256 and with_skill_traces_sha256 or adapter_ref and adapter_config_sha256, and null lift, model_id and evals_sha256 values when no lift was measured. Construction and from_dict() fail closed on any field combination that contradicts the declared stages or evidence level. GcpSkillCertifier.create_and_sign_receipt() requires stages_run and evidence_level, computes every evidence digest itself, and takes model_id from the lift report (the rollout bundle's model for adapter runs) with no default. cage-skill-eval (cli.py) signs the stages and evidence it actually evaluated and adds --model-id, required with --baseline-traces/--skill-traces. The gate, the verifier and GovernedGEPAOptimizer share lift_meets_threshold(): a 0.0 minimum requires strictly positive lift, and NaN or unmeasured lift never passes. The verifier refuses every other schema version (unsupported_schema_version) and STATIC_ONLY receipts unless constructed with allow_static_only=True (static_only_receipt). verify_and_transition_gateway_mode() is now async, requires an async CerArtifactVerifier and at least one artifact, and no longer falls back to a status == "CERTIFIED" presence check. Breaking: cage.skill.cer.v1 receipts are no longer accepted (re-certify to emit v2 receipts); verify_cer_receipt() requires the keyword-only expected_skill_md_bytes; create_and_sign_receipt() requires stages_run and evidence_level and no longer defaults model_id; run_certification_gate() requires model_id with trace files; and verify_and_transition_gateway_mode() is a coroutine without the cer_verified flag.

Other changes

Merged in this release without an entry of their own:

  • Correct provider_06 verify-release wire headers (fix(governance), #469)
  • Reject actuator_01 receipts not bound to the envelope (fix(governance), #479)
  • Keep cumulative-spend keys in sync in eval trajectories (fix(governance), #483)
  • Fail closed on NARROW and unknown verdicts in CageClient (fix(gateway), #484)
  • Remove vendor aliases and add IPR notice (refactor(governance), #508)
  • Harden kernel core validation and governance controls (fix(governance), #533)
  • Align partner v0.3 contracts and harden infra isolation (feat(governance), #534)
  • Resolve live GKE e2e telemetry and defer bugs (fix(gateway), #535)
  • Restore the quickstart compose bootstrap and add a smoke gate (fix(infra), #537)
  • Dependencies: upgrade locked dependencies and base images for the CI scans (#509); bump certifi (#510); pin filelock 3.20.3 and raise setuptools to 84.1, which clears the pip-audit and Trivy image-scan findings (#543)
  • Documentation: #518, #532, #536, #538, #539, #540, #542; CI: #485

Full changelog: v3.2.0...v3.3.0