Skip to content

Latest commit

 

History

History
578 lines (482 loc) · 39.5 KB

File metadata and controls

578 lines (482 loc) · 39.5 KB

Changelog

All notable changes to the CAGE reference implementation are documented here.

The format follows Keep a Changelog. Versions follow Semantic Versioning.


Added

  • tests/test_tls_enforcement.py — Gateway TLS enforcement test suite: unit assertions for NIST SP 800-52 Rev. 2 TLS 1.2+ protocol minimums, OIDC JWKS verify=True transport security, and Linkerd mTLS manifest annotations (test(compliance), closes POAM-2026-011)
  • docs/operations/KEY_ROTATION.md — Cryptographic key management & rotation guide: documented rotation cadences for Cloud KMS HSM keys (90-day), HMAC routing seal secrets (30-day), and Linkerd mTLS certs with zero-downtime procedures and emergency revocation runbooks (docs(operations), closes POAM-2026-012)
  • deployment/k8s/ manifests — Pinned third-party container image tags: openpolicyagent/opa:0.68.0-static, redis/redis-stack-server:7.4.0-v1, and anchore/syft:v1.10.0 across deployment manifests (feat(infra), closes POAM-2026-013)
  • AGENTS.md — Parallel test isolation standards: added mandatory --dist=loadfile flag requirement and targeted test command reference matrix (docs(tests))
  • src/gateway/governance/symbolic_governor.py — PAUSE handler in validate_action(): first-class runtime execution path returning verdict: PAUSE, pause token, resume endpoint, and retry metadata (feat(governance))
  • src/gateway/governance/routing_seal.py — HMAC Routing Seal v2: 4-tuple format <expire_hex>.<action_slug>.<record_hash_hex>.<hmac_hex> binding SHA-256 evidence record hash with fail-closed actuator enforcement (feat(governance))
  • src/gateway/governance/cbf.py — Strict replication rollback & cold-start epoch seed: synchronous Redis WAIT verification with fail-closed automatic rollback on replica timeout, plus _fetch_initial_fence_epoch_sync() startup seeding (feat(governance))
  • src/compliance_bridge/evidence_stream.py — Precondition validation: validate_evidence_stream_preconditions() halts startup in production if non-blocking evidence mode is configured (fix(compliance))
  • proof/model.py, proof/distributed_cbf_model.py — Formal state model expansion: 57-state sequential and 66-state concurrent BFS models verifying NoDirectBind invariant across all paths, plus $N$-agent distributed barrier proofs (test(formal))
  • src/gateway/governance/pause_primitive.py, src/gateway/server/hybrid_server.py — PAUSE primitive and resume endpoint: new POST /v1/pause/{pause_token}/resume and GET /v1/pause/{pause_token} endpoints for resumable execution suspension (feat(governance))
  • src/gateway/governance/decisions.py, src/gateway/governance/symbolic_governor.py — NARROW primitive: new NARROW governance decision for partial-authority execution with clamped scope (gated by CAGE_NARROW_ENABLED) (feat(governance))
  • src/gateway/governance/symbolic_governor.py:_classify_violation() — DEFER classification helper: five-way classification (DENY/DEFER/NARROW/PAUSE/REQUIRE_APPROVAL) with DeferQueue integration (feat(governance))
  • src/governed_financial_advisor/graph/state.py — AgentState NARROW/PAUSE fields: added narrow_status, narrowed_params, pause_resume_token, pause_reason fields (feat(governance))
  • src/gateway/governance/symbolic_governor.py:_park_defer_context() — DeferQueue integration: DEFER tokens now persisted via DeferQueue for client polling (feat(governance))
  • src/gateway/governance/cbf.py — Redis fence epoch: safety:fence_epoch monotonic counter for failover safety (gated by CAGE_REDIS_SYNCHRONOUS_REPLICATION, default true) (feat(governance))
  • src/gateway/governance/cbf.py, src/compliance_bridge/reconciliation_worker.py — Reconciliation replay defense: monotonic sequence numbers prevent payload replay attacks (gated by CAGE_RECONCILIATION_REPLAY_DEFENSE) (feat(governance))

Changed

  • src/compliance_bridge/evidence_stream.py — Evidence chain blocking default: EVIDENCE_CHAIN_BLOCKING now defaults to "true" (peer review Fix B) (fix(compliance))
  • src/gateway/governance/symbolic_governor.py:_ftra_boundary_check() — FTRA boundary check mandatory: now runs unconditionally (flag CAGE_FTRA_BOUNDARY_ENABLED removed per POAM-2026-030-B) (fix(governance))

Removed

  • src/compliance_bridge/evidence_stream.py — Evidence chain v1.0 schema support: removed deprecated _SCHEMA_1_0/_SCHEMA_1_1 constants; only v1.1 supported (CR-1 from 3.0.0) (refactor(compliance))

Fixed

  • POAM-2026-038 closure — Reconciliation worker secrets populated, CronJob operational — 2026-08-16 (fix(compliance))

[3.0.0] - 2026-08-15

Corrected release: v3.0.0 was initially tagged 2026-08-15 with four breaking changes still outstanding. Those changes were completed post-tag on branch fix/v3-breaking-changes-completion and are now reflected below: the AGWEnvelope/AGWEnvelopeBuilder removal, the sign_archytan_digest() removal, the create_ftra_node() deprecated-kwargs removal (kwargs fully removed, not merely deprecated), and the KMS_BATCH_ENABLED default-value discrepancy (resolved as "false"). See docs/BREAKING_CHANGES_v3.md for full detail.

Breaking Changes

  • Removed stpa_validator.py shim module — use GeneratedSTPAValidator directly
  • Removed safety.py re-export shim — import from text_filter and cbf directly
  • Removed GovernanceClient, RedisClient, HybridClient aliases
  • Removed check_safety_constraints legacy tool alias — use simulate_governance_check
  • Removed create_ftra_node() deprecated params (registry_path, plan_key) — kwargs no longer accepted; pass a FtraNodeConfig instance instead
  • Removed CONTROL_META, EVIDENCE_SLA_SECONDS, ISO_CONTROL_MAP aliases — use region-aware accessors
  • Removed config/settings.py module-level aliases — use Config.X class attributes
  • Migrated threshold env vars to config/governance_thresholds.json (env vars still work as overrides)
  • (CR-1) Removed Evidence Stream v1.0 schema support — v1.1 is now the only supported schema
  • (CR-2) Removed NeMo auto-apply path (NEMO_AUTO_APPLY_ENABLED) — all refinements require human approval
  • (CR-3) Renamed update_state()_update_state_unsafe() — use atomic_verify_and_commit() instead
  • Removed AGWEnvelope/AGWEnvelopeBuilder backward-compatibility aliases (src/gateway/governance/agw_envelope.py, entire file deleted) — use GovernanceEnvelope/GovernanceEnvelopeBuilder from src/gateway/governance/governance_envelope.py
  • Removed sign_archytan_digest() method from KMSSigner (src/gateway/governance/kms_signer.py) — use sign() instead

Added

  • config/governance_thresholds.json v2.0.0 schema with FRIA, confidence, and causal thresholds
  • Threshold accessor functions in src/gateway/governance/schemas/thresholds.py
  • Region-aware control metadata accessors (get_control_meta(), get_sla_seconds(), get_iso_control_map())

Removed

  • src/gateway/governance/agw_envelope.py (entire file) — AGWEnvelope and AGWEnvelopeBuilder backward-compatibility aliases; use GovernanceEnvelope/GovernanceEnvelopeBuilder from src/gateway/governance/governance_envelope.py
  • tests/test_agw_envelope.py — backward-compatibility test suite for the removed AGWEnvelope/AGWEnvelopeBuilder aliases; see tests/test_governance_envelope.py for canonical coverage
  • sign_archytan_digest() method from KMSSigner (src/gateway/governance/kms_signer.py) — use sign() instead
  • create_ftra_node() deprecated registry_path/plan_key keyword arguments (src/gateway/governance/ftra/node_factory.py) — fully removed, not just deprecated; pass a FtraNodeConfig instance instead

Changed

  • FtraNodeConfig is now required for create_ftra_node() (no fallback extractors)
  • Threshold values loaded from config file with env var overrides
  • SafetyBoundaryProtocol no longer exposes update_state() method

Fixed

  • KMS_BATCH_ENABLED default-value discrepancy (Wave 0) resolved: confirmed default is "false" (disabled), matching KmsBatchThresholds.enabled in src/gateway/governance/schemas/thresholds.py and config/governance_thresholds.json. Note: the startup log comment in src/compliance_bridge/main.py (near line 213) still states the default is "true" and requires a follow-up code fix to align with the verified "false" default.

Migration

See MIGRATION_GUIDE_v3.md for detailed upgrade instructions.

Example migration for the AGWEnvelope removal:

# Old (removed in v3.0.0):
from src.gateway.governance.agw_envelope import AGWEnvelope

# New (required):
from src.gateway.governance.governance_envelope import GovernanceEnvelope

[2.1.2] - 2026-08-13

Fixed

  • feat(governance): atomic nonce burn via verify_and_consume_seal() Redis SETNX (POAM-2026-043)
  • feat(governance): dynamic standing re-check in revalidate_post_hitl() (POAM-2026-044)
  • feat(governance): RefusalReceipt parameter binding extended to validate_action() and revalidate_post_hitl() paths
  • fix(governance): defer_node.py field-name mismatch and non-existent enqueue() call corrected; DeferQueue now persists tokens to Redis db=1 (POAM-2026-045)
  • test(governance): tests/test_defer_node.py added covering durable park and failure propagation

[Unreleased — pre-2.1.2]

Added

  • KmsSigner.sign() now embeds signed_at Unix timestamp in every signed payload; verify() rejects payloads older than MAX_KMS_PAYLOAD_AGE_SECONDS (300 s), closing replay-attack vector.
  • CbfGovernor._local_debits intra-window debit ledger: verify_action() computes effective_balance = snapshot - local_debits to prevent double-spend within KMS TTL window; reset_local_debits() added for reconciliation daemon.
  • ConsensusGate: degraded-quorum routing (ERROR + APPROVE → ESCALATE) now explicitly handled before catch-all case.
  • FiscalLimitGuard.rollback_state(amount, audit_id): Saga compensation stub — logs [SAGA-ROLLBACK], reverses Redis debit, re-raises on failure.
  • tests/test_provenance_chain.py: test_link_hash_is_deterministic asserts hash stability across calls.
  • src/compliance_bridge/reconciliation_worker.pyObjectStoreLedgerProvider (S3-compatible via boto3: AWS S3, GCS S3 Interop, MinIO, Ceph). Registered "s3" and "object-store" aliases in the _PROVIDERS factory.
  • deployment/k8s/reconciliation-worker.yaml — new CronJob manifest running ExternalLedgerReconciler every 5 minutes; default RECONCILIATION_PROVIDER changed to "s3"; added S3_RECONCILIATION_BUCKET, S3_ENDPOINT_URL, S3_REGION_NAME, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY env vars; CiliumNetworkPolicy egress extended to *.amazonaws.com.
  • docs/POAM.md — added POAM-2026-038 through -042.

Fixed

  • CausalGatekeeper: Redis connection errors are now fail-closed (raise RuntimeError) rather than returning a zero-deflection sentinel (fail-open). Absent keys remain first-boot safe.
  • Terminology: "TOCTOU gap" for the rollback atomicity issue renamed to "saga-atomicity gap" throughout docs and paper.
  • Redis access model for gateway corrected in documentation: gateway has read-write access (Tier 4 FiscalLimitGuard uses WATCH/MULTI/EXEC), not read-only as previously documented.
  • src/gateway/governance/fiscal_limit_guard.py — per-reservation TTL sentinel key fiscal:reservation:{uuid} (ex=reservation_ttl, default 300 s) bounds the crash-leakage window between reserve() and confirm()/release().
  • src/gateway/governance/routing_seal.pygenerate_seal() / _canonical_payload() sanitize dots (.replace(".", "-")) in the action slug to guarantee an unambiguous 3-part . split during verify_seal().
  • src/compliance_bridge/context_accumulator.py_content_hash() now passes separators=(",", ":") to json.dumps() for canonical, whitespace-free serialization.
  • src/gateway/governance/causal_gatekeeper.py — added _MIN_CAUSAL_SAMPLES guard (default 30, overridable via CAUSAL_MIN_SAMPLES) before backdoor.linear_regression to fail closed on sparse telemetry.
  • src/governed_financial_advisor/graph/nodes/safety_node.py — replaced hardcoded zero sentinels for drawdown, order_size, daily_vol with _fetch_live_risk_metrics(), reading live values from Redis (cbf:portfolio_drawdown:{account_id}, portfolio:daily_vol:{account_id}) with 200 ms socket timeout and safe-sentinel fallback.
  • scripts/measure_paper_metrics.py — re-enabled measure_ungoverned_baseline().
  • scripts/measure_reconciliation_metrics.py_make_sync_redis() now honours REDIS_PASSWORD.

Changed

  • refactor(nemo): consolidate GFA LLMRails to single harness singleton
    • Added reload_nemo_rails(config_path) (async, asyncio.Lock-guarded) and _get_reload_lock() to src/gateway/governance/langgraph_harness/nemo_node_factory.py; the module-level _nemo_rails singleton is now the sole LLMRails instance for the entire GFA pod.
    • Removed the module-level rails = load_rails() global and all global rails declarations from src/governed_financial_advisor/server.py; both hot-reload endpoints (/v1/nemo/propose-refinement and /v1/nemo/approve-refinement/{id}) now call await reload_nemo_rails() from the harness instead of maintaining their own LLMRails instance.
    • Removed the _rails singleton and get_rails() helper from src/governed_financial_advisor/tools/api.py; it now calls get_nemo_rails() from the harness directly.
    • Net result: one LLMRails instance per GFA pod (down from three); a single approved refinement now propagates to every consumer simultaneously instead of only the instance it was applied against.
    • Quarantined infra/modules/nemo_guardrails/main.tf with a HISTORICAL-ONLY — DO NOT APPLY banner (predates and diverges from the canonical config/rails/ source) and added a nemo-freshness-check CI job (.github/workflows/ci.yml) that diffs config/rails/actions.py against deployment/k8s/nemo-rails-configmap.yaml.

Documentation

  • CAGE_ARXIV.MD: 58 peer-review items addressed — bibliography fixes, formal-proof caveats (under-approximation, saga-atomicity, CBF conditional implication), security notes (FTRA trust boundary, replay vulnerability, intra-window double-spend), new Appendix D (adversarial payload examples), expanded roadmap (NoDirectBind, POAM-TIER2-001, FTRA formal verification).

[Unreleased — prior]

Added

  • src/compliance_bridge/reconciliation_worker.pyObjectStoreLedgerProvider (S3-compatible via boto3: AWS S3, GCS S3 Interop, MinIO, Ceph). Registered "s3" and "object-store" aliases in the _PROVIDERS factory.
  • deployment/k8s/reconciliation-worker.yaml — new CronJob manifest running ExternalLedgerReconciler every 5 minutes; default RECONCILIATION_PROVIDER changed to "s3"; added S3_RECONCILIATION_BUCKET, S3_ENDPOINT_URL, S3_REGION_NAME, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY env vars; CiliumNetworkPolicy egress extended to *.amazonaws.com.
  • docs/POAM.md — added POAM-2026-038 through -042.

Fixed

  • src/gateway/governance/fiscal_limit_guard.py — per-reservation TTL sentinel key fiscal:reservation:{uuid} (ex=reservation_ttl, default 300 s) bounds the crash-leakage window between reserve() and confirm()/release().
  • src/gateway/governance/routing_seal.pygenerate_seal() / _canonical_payload() sanitize dots (.replace(".", "-")) in the action slug to guarantee an unambiguous 3-part . split during verify_seal().
  • src/compliance_bridge/context_accumulator.py_content_hash() now passes separators=(",", ":") to json.dumps() for canonical, whitespace-free serialization.
  • src/gateway/governance/causal_gatekeeper.py — added _MIN_CAUSAL_SAMPLES guard (default 30, overridable via CAUSAL_MIN_SAMPLES) before backdoor.linear_regression to fail closed on sparse telemetry.
  • src/governed_financial_advisor/graph/nodes/safety_node.py — replaced hardcoded zero sentinels for drawdown, order_size, daily_vol with _fetch_live_risk_metrics(), reading live values from Redis (cbf:portfolio_drawdown:{account_id}, portfolio:daily_vol:{account_id}) with 200 ms socket timeout and safe-sentinel fallback.
  • scripts/measure_paper_metrics.py — re-enabled measure_ungoverned_baseline().
  • scripts/measure_reconciliation_metrics.py_make_sync_redis() now honours REDIS_PASSWORD.

Changed

  • refactor(nemo): consolidate GFA LLMRails to single harness singleton
    • Added reload_nemo_rails(config_path) (async, asyncio.Lock-guarded) and _get_reload_lock() to src/gateway/governance/langgraph_harness/nemo_node_factory.py; the module-level _nemo_rails singleton is now the sole LLMRails instance for the entire GFA pod.
    • Removed the module-level rails = load_rails() global and all global rails declarations from src/governed_financial_advisor/server.py; both hot-reload endpoints (/v1/nemo/propose-refinement and /v1/nemo/approve-refinement/{id}) now call await reload_nemo_rails() from the harness instead of maintaining their own LLMRails instance.
    • Removed the _rails singleton and get_rails() helper from src/governed_financial_advisor/tools/api.py; it now calls get_nemo_rails() from the harness directly.
    • Net result: one LLMRails instance per GFA pod (down from three); a single approved refinement now propagates to every consumer simultaneously instead of only the instance it was applied against.
    • Quarantined infra/modules/nemo_guardrails/main.tf with a HISTORICAL-ONLY — DO NOT APPLY banner (predates and diverges from the canonical config/rails/ source) and added a nemo-freshness-check CI job (.github/workflows/ci.yml) that diffs config/rails/actions.py against deployment/k8s/nemo-rails-configmap.yaml.

[v2.1.1-post — 2026-08-05]

Post-release fixes and paper measurement improvements. No version bump — these changes target the 2026-08-05 measurement run and upstream research publication accuracy. All governance logic changes are backward-compatible.

Added

  • src/gateway/governance/authorization_claim_detector.py — new AuthorizationClaimDetector module that identifies and blocks requests asserting or implying elevated authorization (e.g. "I have admin access", "pretend I am root"). Backed by tests/test_authorization_claim_detector.py.
  • docs/paper/measurements/2026-08-05-final-fix/ and docs/paper/measurements/2026-08-05-gap-fix/ — promoted measurement runs; best results: 68.4% adversarial deflection (13/19 evaluated, 2 network errors), 0.0% benign FPR (0/18 evaluated, 2 network errors).
  • pyproject.tomlpyahocorasick>=2.0.0 added to gateway optional-dependency group; resolves [WARN] pyahocorasick not installed at import and restores O(n) Aho-Corasick keyword scanning in text_filter.py.

Fixed

  • src/governed_financial_advisor/graph/nodes/safety_node.py_extract_trade_payload() now hardcodes risk-metric fields (latency_ms, drawdown, order_size, daily_vol) to safe sentinel values (0.0/0) instead of conditionally passing them from the LLM execution plan. Closes UCA-5/UCA-2 100% benign trade_execution FPR (75.0% → 0.0%). Architectural invariant: safety enforcement is purely deterministic LangGraph node execution — never dependent on LLM plan output (fix(governance)). (Superseded 2026-08-06: drawdown/daily_vol are now read live from Redis with sentinel fallback — see [Unreleased].)
  • config/rails/actions.py — added Stage 1C structural-attack blocklist inside custom_self_check_input() between Stage 1B (illegal-finance) and Stage 2 (allowlist). Stage 1C blocks SQL injection markers (;, --, '; DROP, union select) and HTML/script injection markers (<script, javascript:, onerror=, etc.) and delegates to detect_prompt_injection() from src/gateway/governance/prompt_injection_detector.py. Closes INJ-004/INJ-005 bypass paths. prompt_injection deflection: 33.3% → 50.0% (+16.7 pp) (fix(governance)).

Changed

  • CAGE_ARXIV.MD — Tables 5 and 6 updated to run 2026-08-04-6edb597 / 2026-08-05-gap-fix; measurement notes updated with run label, Gate E7 status, and fix descriptions (docs).
  • Documentation updated across 12 files to accurately reflect the 8-tier symbolic governor pipeline (Tier 0.5 FTRA + Tiers 0–6b) — previously several docs referred to a "7-tier" pipeline, which omitted the fully-implemented FTRA pre-execution gate (docs).

Added

  • KmsSigner.sign() now embeds signed_at Unix timestamp in every signed payload; verify() rejects payloads older than MAX_KMS_PAYLOAD_AGE_SECONDS (300 s), closing replay-attack vector.
  • CbfGovernor._local_debits intra-window debit ledger: verify_action() computes effective_balance = snapshot - local_debits to prevent double-spend within KMS TTL window; reset_local_debits() added for reconciliation daemon.
  • ConsensusGate: degraded-quorum routing (ERROR + APPROVE → ESCALATE) now explicitly handled before catch-all case.
  • FiscalLimitGuard.rollback_state(amount, audit_id): Saga compensation stub — logs [SAGA-ROLLBACK], reverses Redis debit, re-raises on failure.
  • tests/test_provenance_chain.py: test_link_hash_is_deterministic asserts hash stability across calls.

Fixed

  • CausalGatekeeper: Redis connection errors are now fail-closed (raise RuntimeError) rather than returning a zero-deflection sentinel (fail-open). Absent keys remain first-boot safe.
  • Terminology: "TOCTOU gap" for the rollback atomicity issue renamed to "saga-atomicity gap" throughout docs and paper.
  • Redis access model for gateway corrected in documentation: gateway has read-write access (Tier 4 FiscalLimitGuard uses WATCH/MULTI/EXEC), not read-only as previously documented.

Documentation

  • CAGE_ARXIV.MD: 58 peer-review items addressed — bibliography fixes, formal-proof caveats (under-approximation, saga-atomicity, CBF conditional implication), security notes (FTRA trust boundary, replay vulnerability, intra-window double-spend), new Appendix D (adversarial payload examples), expanded roadmap (NoDirectBind, POAM-TIER2-001, FTRA formal verification).

[Unreleased — prior]

Added

  • src/compliance_bridge/reconciliation_worker.pyObjectStoreLedgerProvider (S3-compatible via boto3: AWS S3, GCS S3 Interop, MinIO, Ceph). Registered "s3" and "object-store" aliases in the _PROVIDERS factory.
  • deployment/k8s/reconciliation-worker.yaml — new CronJob manifest running ExternalLedgerReconciler every 5 minutes; default RECONCILIATION_PROVIDER changed to "s3"; added S3_RECONCILIATION_BUCKET, S3_ENDPOINT_URL, S3_REGION_NAME, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY env vars; CiliumNetworkPolicy egress extended to *.amazonaws.com.
  • docs/POAM.md — added POAM-2026-038 through -042.

Fixed

  • src/gateway/governance/fiscal_limit_guard.py — per-reservation TTL sentinel key fiscal:reservation:{uuid} (ex=reservation_ttl, default 300 s) bounds the crash-leakage window between reserve() and confirm()/release().
  • src/gateway/governance/routing_seal.pygenerate_seal() / _canonical_payload() sanitize dots (.replace(".", "-")) in the action slug to guarantee an unambiguous 3-part . split during verify_seal().
  • src/compliance_bridge/context_accumulator.py_content_hash() now passes separators=(",", ":") to json.dumps() for canonical, whitespace-free serialization.
  • src/gateway/governance/causal_gatekeeper.py — added _MIN_CAUSAL_SAMPLES guard (default 30, overridable via CAUSAL_MIN_SAMPLES) before backdoor.linear_regression to fail closed on sparse telemetry.
  • src/governed_financial_advisor/graph/nodes/safety_node.py — replaced hardcoded zero sentinels for drawdown, order_size, daily_vol with _fetch_live_risk_metrics(), reading live values from Redis (cbf:portfolio_drawdown:{account_id}, portfolio:daily_vol:{account_id}) with 200 ms socket timeout and safe-sentinel fallback.
  • scripts/measure_paper_metrics.py — re-enabled measure_ungoverned_baseline().
  • scripts/measure_reconciliation_metrics.py_make_sync_redis() now honours REDIS_PASSWORD.

Changed

  • refactor(nemo): consolidate GFA LLMRails to single harness singleton
    • Added reload_nemo_rails(config_path) (async, asyncio.Lock-guarded) and _get_reload_lock() to src/gateway/governance/langgraph_harness/nemo_node_factory.py; the module-level _nemo_rails singleton is now the sole LLMRails instance for the entire GFA pod.
    • Removed the module-level rails = load_rails() global and all global rails declarations from src/governed_financial_advisor/server.py; both hot-reload endpoints (/v1/nemo/propose-refinement and /v1/nemo/approve-refinement/{id}) now call await reload_nemo_rails() from the harness instead of maintaining their own LLMRails instance.
    • Removed the _rails singleton and get_rails() helper from src/governed_financial_advisor/tools/api.py; it now calls get_nemo_rails() from the harness directly.
    • Net result: one LLMRails instance per GFA pod (down from three); a single approved refinement now propagates to every consumer simultaneously instead of only the instance it was applied against.
    • Quarantined infra/modules/nemo_guardrails/main.tf with a HISTORICAL-ONLY — DO NOT APPLY banner (predates and diverges from the canonical config/rails/ source) and added a nemo-freshness-check CI job (.github/workflows/ci.yml) that diffs config/rails/actions.py against deployment/k8s/nemo-rails-configmap.yaml.

[v2.1.1-post — 2026-08-05]

Post-release fixes and paper measurement improvements. No version bump — these changes target the 2026-08-05 measurement run and upstream research publication accuracy. All governance logic changes are backward-compatible.

Added

  • src/gateway/governance/authorization_claim_detector.py — new AuthorizationClaimDetector module that identifies and blocks requests asserting or implying elevated authorization (e.g. "I have admin access", "pretend I am root"). Backed by tests/test_authorization_claim_detector.py.
  • docs/paper/measurements/2026-08-05-final-fix/ and docs/paper/measurements/2026-08-05-gap-fix/ — promoted measurement runs; best results: 68.4% adversarial deflection (13/19 evaluated, 2 network errors), 0.0% benign FPR (0/18 evaluated, 2 network errors).
  • pyproject.tomlpyahocorasick>=2.0.0 added to gateway optional-dependency group; resolves [WARN] pyahocorasick not installed at import and restores O(n) Aho-Corasick keyword scanning in text_filter.py.

Fixed

  • src/governed_financial_advisor/graph/nodes/safety_node.py_extract_trade_payload() now hardcodes risk-metric fields (latency_ms, drawdown, order_size, daily_vol) to safe sentinel values (0.0/0) instead of conditionally passing them from the LLM execution plan. Closes UCA-5/UCA-2 100% benign trade_execution FPR (75.0% → 0.0%). Architectural invariant: safety enforcement is purely deterministic LangGraph node execution — never dependent on LLM plan output (fix(governance)). (Superseded 2026-08-06: drawdown/daily_vol are now read live from Redis with sentinel fallback — see [Unreleased].)
  • config/rails/actions.py — added Stage 1C structural-attack blocklist inside custom_self_check_input() between Stage 1B (illegal-finance) and Stage 2 (allowlist). Stage 1C blocks SQL injection markers (;, --, '; DROP, union select) and HTML/script injection markers (<script, javascript:, onerror=, etc.) and delegates to detect_prompt_injection() from src/gateway/governance/prompt_injection_detector.py. Closes INJ-004/INJ-005 bypass paths. prompt_injection deflection: 33.3% → 50.0% (+16.7 pp) (fix(governance)).

Changed

  • CAGE_ARXIV.MD — Tables 5 and 6 updated to run 2026-08-04-6edb597 / 2026-08-05-gap-fix; measurement notes updated with run label, Gate E7 status, and fix descriptions (docs).
  • Documentation updated across 12 files to accurately reflect the 8-tier symbolic governor pipeline (Tier 0.5 FTRA + Tiers 0–6b) — previously several docs referred to a "7-tier" pipeline, which omitted the fully-implemented FTRA pre-execution gate (docs).

Added

  • .github/CODEOWNERS — single-maintainer review enforcement for architectural paths
  • .github/pull_request_template.md — reference implementation verification checklist
  • .github/workflows/ref_impl_signoff.yml — CI gate and release tagging workflow
  • .github/branch-protection-rules.md — canonical specification for all GitHub repository-level protection settings (branch protection, tag protection, GHAS, workflow permissions)
  • CHANGELOG.md — this file

Changed

  • .github/workflows/dependency-review.yml — removed continue-on-error: true from the Dependency Review step; the GHAS-backed gate is now a hard block; GHAS enablement instructions documented inline
  • .github/workflows/compliance-matrix.yml — documented rationale for continue-on-error: true on the regional matrix test step (live-cluster dependency); hardening path tracked in workflow comment
  • CONTRIBUTING.md — added "Repository Protection Setup" section with quick-reference GitHub UI settings and link to .github/branch-protection-rules.md

v2.1.1 — 2026-07-30

9 commits since v2.1.0 (2026-07-27). Patch release: jurisdiction-aware compliance fixes, two production HITL bug fixes, documentation completeness audit, and no new features.

Fixed

  • Made sla_monitor.py region-aware, closing FINDING-05: jurisdictional SLA controls (SC-7/SC-8 for US_FED, Article 12 for EU_ECB, MAS-FEAT-1 for APAC_MAS) are now correctly monitored for evidence staleness in their applicable region instead of being silently skipped (fix(compliance))
  • Removed dead ftra_reachability.py scaffold that gave a false impression of FTRA test coverage; added 30 direct tests for the real src/gateway/governance/ftra/ implementation, which surfaced and fixed two production defects that silently disabled the entire DeferQueue human-in-the-loop pathway: DeferQueue() instantiated without a required redis_client, and NodeInterrupt unconditionally caught before it could suspend the graph for human review (fix(governance))
  • Added jurisdiction-aware HITL SLA and PII audit retention citations, closing FINDING-07/08/09: GovernanceThresholds.pii_audit_retention_authority, pii_audit_log(), hitl_escalator.py, and prompt_injection_detector.py previously hardcoded US_FED citations (FISMA AU-11, SR 26-2) with no runtime region check; now resolve CAGE_DEPLOYMENT_REGION at call time to the correct GDPR Art. 5(1)(e) / DORA Art. 10 / MAS Notice 655 / MAS FEAT citation (fix(governance))
  • Resolved a duplicate POAM-2026-023 ID collision in docs/POAM.md (fix(compliance))
  • Documented SECURITY.md GHSA-hfqj-24cj-693g and GHSA-v3h4-8458-5ww3 as resolved with implementation detail, matching the fixes already present in inference_proxy.py and governance_middleware.py (fix(docs))

Changed

  • Corrected pipeline tier numbering (CBF=2, Fiscal=3, OPA=4) across ~25 docs that had swapped or stale tier references; removed stale references to the retired SLM tier and the fictional governed_tool decorator (docs)
  • Removed fictional v0.1.0/rc-v0.1.0 version references across ~40 files in a v2.0.0/v2.1.0 codebase (docs)
  • Deleted superseded planning and process-fiction documents (implementation plans, roadmaps, merge plans) and fixed the dangling cross-references left by those deletions (docs)
  • Consolidated Roo/Cline agent rules into a single tool-agnostic AGENTS.md (docs)
  • Corrected governance verdict vocabulary to the canonical 4-state enum (CLEAR / HITL_REQUIRED / BLOCKED / ESCALATED) (docs(governance))
  • Corrected fabricated FTRA architecture description across 5 docs to reflect the actual implementation wired into governed_financial_advisor/graph.py (docs(governance))

v2.1.0 — 2026-07-27

113 commits since v2.0.0 (2026-06-14). This release leads with 15 new capabilities spanning gateway governance, multi-jurisdiction compliance, observability, and reference implementations.

Added — Gateway & Governance

  • FTRA Commencement Reachability Gate: graph-based transaction reachability analysis for FTRA commencement decisions (feat(governance)) — src/gateway/governance/ftra/ (classifier, graph_analyzer, models, node_factory), src/gateway/governance/ftra_reachability.py
  • CAGE-003 Agent Registry Integration: SPIFFE trust-domain agent catalog adapter (feat(governance)) — src/gateway/governance/ingress/agent_registry_adapter.py
  • Phase A Ingress Adapters: AAIF, ACS, OSCAL, Lula, AGP policy uploader, and policy translator for multi-standard policy ingestion (feat(gateway)) — src/gateway/governance/ingress/
  • Phase B AGW Absorption: agw_adapter and agent_gateway_adapter server-side integration (feat(gateway)) — src/gateway/governance/ingress/agw_adapter.py, src/gateway/server/agent_gateway_adapter.py
  • NeMo Guardrails Integration: CBRN rails, NeMo manager, and vllm_client (feat(governance)) — src/gateway/governance/nemo/
  • LangGraph Harness: NeMo and OPA node factories for governed graph execution (feat(governance)) — src/gateway/governance/langgraph_harness/

Added — Compliance & Audit

  • NIST AI 600-1 Compliance Gates phases 0–3: CBRN, confabulation, data privacy, and prompt injection (feat(compliance))
  • Three-Region Compliance Matrix: EU_ECB, APAC_MAS, and US_FED with separate Lula manifests and pytest jurisdiction matrix (feat(compliance))
  • CBF External Reconciliation Worker: POAM-023 closed; async external reconciliation loop (feat(compliance)) — src/compliance_bridge/reconciliation_worker.py
  • AARM Profile Mapper: AARM profile mapping and report generation (feat(compliance)) — src/compliance_bridge/aarm_mapper.py, src/compliance_bridge/aarm_report_generator.py
  • Evidence Chain Metadata Binding: evidence_stream with cryptographic provenance anchoring for audit trails (feat(compliance)) — src/compliance_bridge/evidence_stream.py

Added — Observability & Infrastructure

  • AgentSight UI: React/TypeScript real-time governance dashboard (feat(agentsight)) — src/agentsight-ui/
  • Langfuse Native OTLP: replaced standalone OTel Collector with Langfuse-native OTLP export (feat(infra))
  • Region-Aware Kubernetes Templates: deployment/k8s/*.yaml.tpl with CAGE_DEPLOYMENT_REGION guards for EU_ECB, APAC_MAS, and US_FED (feat(infra))

Added — Reference Implementations

  • Governed Financial Advisor: full multi-agent reference implementation with policy enforcement, PII sanitization, and audit trail (feat(advisor)) — src/governed_financial_advisor/

Added — Other

  • Background deployment wrapper script and make targets (feat(ci))
  • Multi-jurisdiction matrix validation suite (feat(compliance))
  • Governance kernel hardening with named constants and guards (feat(governance))

Fixed

  • Resolved all GKE integration test failures (fix(tests))
  • Awaited webhook dispatch tasks with asyncio.gather (fix(compliance))
  • Resolved 9 test failures on main branch (fix(governance))
  • Added SPIFFE trust-domain agent entries to catalog (fix(governance))
  • Escaped mrkdwn special characters in Slack alerts (fix(gateway))
  • Added audit-id to content-disposition header (fix(gateway))
  • Replaced vulnerable ReDoS email regex with linear-time alternative (fix(gateway))
  • Added routing seal enforcement to validate-action endpoint (fix(gateway))
  • Enforced input governance for all message roles in inference proxy (fix(gateway))
  • Added detect_indirect_injection alias to prompt injection detector (fix(gateway))
  • Promoted agentic_scope_statement to full control mapping (fix(governance))
  • Fixed ControlRegistry filter and storage defaults (fix(governance))
  • Resolved 55 test failures across unit and integration suites (fix(tests))
  • Registered eu_ecb pytest marker in pytest.ini (fix(tests))
  • Caught all import errors from dowhy probe (fix(governance))
  • Raised compliance-bridge memory limit to prevent OOMKill (fix(infra))
  • Added PSA-restricted security context to redis-stack-fresh (fix(infra))
  • Fixed OPA path, added dowhy skip guards, upgraded langchain CVEs (fix(ci))
  • Fixed dowhy/numpy2, OPA rego.v1, dependency-review conflicts (fix(ci))
  • Suppressed pre-existing mypy violations to unblock CI (fix(ci))
  • Resolved EU_ECB, APAC_MAS, ISO 42001, and AI 600-1 Lula CI failures (fix(ci))
  • Applied ruff auto-fixes and restored corrupted agent file (fix(ci))
  • Regenerated STPA artifacts after currency_denylist rename (fix(governance))
  • Corrected section ordering in open interop spec (fix(docs))
  • Added CAGE_ENV=ci to AI 600-1 job and upgraded cryptography (fix(ci))

Changed

  • Moved financial-advisor service account out of governed_advisor module (refactor(infra))
  • Changed storage default to S3, generalized labels (refactor(compliance))
  • Restructured CONTROL_META with region-keyed accessor (refactor(compliance))
  • Hardened audit workflow and OSCAL exporter (refactor(compliance))
  • Applied ruff format to posture check scripts (style(compliance))
  • Bumped PyTorch to 2.13 (chore(infra))
  • Bumped GitHub Actions dependencies (chore(ci))
  • Removed unused imports from stpa_compiler (chore(ci))
  • Regenerated stale STPA artifacts (chore(governance))
  • Regenerated uv.lock to fix numpy version inconsistency (chore(deps))
  • Migrated agent rules from .clinerules to .roo/rules/ (chore(docs))
  • Replaced GKE-specific k8s resources with agnostic defaults (chore(infra))
  • Removed GCP region default, generalized CI comments (chore(governance))
  • Added lint job, gitleaks scan, and default storage to S3 (chore(ci))
  • Added three-region pytest matrix and activated jurisdiction workflows (ci(ci))
  • Fixed Lula install to use defenseunicorns-labs/lula1 v0.16.0 (ci(ci))
  • Added APAC_MAS residency tests and parametrized normative provider (test(tests))
  • Added EU_ECB bias eval pipeline for AI Act Art.10 (test(compliance))
  • Added US_FED OPA unit tests and policy vectors (test(compliance))
  • Applied OSS readiness remediation: license headers, inclusive language (chore)
  • Scrubbed sensitive references for public OSS release (chore(docs))
  • Rewrote internal-facing docs for public OSS release (docs(docs))
  • Added public OSS release documentation (docs(docs))
  • Added comprehensive OpenAPI and gRPC endpoint map (docs(docs))
  • Added CAGE open interoperability specification developer preview (docs(docs))
  • Added US-FED dev GKE deployment execution plan (docs(docs))
  • Documented mathematical formalism and added Lula assessment results (docs)
  • Added platform-agnostic framing for NonProduct classification (docs(docs))

v2.0.0 — 2026-06-14

First stable reference implementation with full security hardening scope.