Commit 0c38976
authored
fix(governance): restore causal gatekeeper bool contract and isolate test mocks
* refactor(nemo): consolidate GFA LLMRails to single harness singleton
- Add reload_nemo_rails() with asyncio.Lock to nemo_node_factory.py as
the canonical hot-reload entry point for the shared LLMRails singleton
- Remove independent rails global from server.py and _rails/get_rails()
from tools/api.py; both now delegate to the harness singleton
- Hot-reload via /v1/nemo/approve-refinement now propagates atomically
to all GFA pod consumers (graph nodes, endpoints, tools)
- Quarantine infra/modules/nemo_guardrails/main.tf as HISTORICAL-ONLY
- Add nemo-freshness-check CI job to gate configmap snapshot drift
* feat(compliance): add S3-compat ledger provider and fafef04 paper fixes
- ObjectStoreLedgerProvider (boto3): supports AWS S3, GCS S3 Interop,
MinIO, Ceph via S3_RECONCILIATION_BUCKET / S3_ENDPOINT_URL env vars
- Register 's3' and 'object-store' aliases in _PROVIDERS factory
- Update reconciliation-worker.yaml: default provider=s3, add S3 Secret
keys, extend CiliumNetworkPolicy FQDN to *.amazonaws.com
- P2.1: context_accumulator.py — separators in _content_hash json.dumps
- P2.2: fiscal_limit_guard.py — per-reservation TTL sentinel key
- P2.3: routing_seal.py — dot-sanitization in generate_seal()
- P2.4: reconciliation_worker.py — GcsLedgerProvider (already present)
- P2.6: safety_node.py — live Redis risk-metric reads with sentinel
fallback (cbf:portfolio_drawdown / portfolio:daily_vol)
- P2.7: causal_gatekeeper.py — MIN_SAMPLES guard before regression
- P2.8: measure_paper_metrics.py — re-enable ungoverned baseline
- P2.9: measure_reconciliation_metrics.py — honour REDIS_PASSWORD
- POAM: add findings 038-042
- CAGE_ARXIV.MD: update Table 2 latency (fafef04, n=200), §6.1
infra note with Cloud Build IDs, §6.6 FPR note for live-Redis path
- Archive fafef04 measurement evidence
* docs: update markdown docs for S3-compat provider and fafef04 fixes
- README.md: RECONCILIATION_PROVIDER table row + tree description
- CHANGELOG.md: add Unreleased entries for ObjectStoreLedgerProvider,
CronJob manifest, POAM-038-042, fiscal TTL sentinel, routing-seal
dot-sanitization, context-accumulator canonical JSON, causal
MIN_SAMPLES guard, safety-node live Redis metrics, baseline re-enable,
reconciliation REDIS_PASSWORD fix; flag superseded 2026-08-05 entry
- docs/architecture/GATEWAY_ARCHITECTURE.md: add GcsLedgerProvider +
ObjectStoreLedgerProvider to backend list
- docs/governance/CAUSAL_AND_CBF_GOVERNANCE.md: MIN_SAMPLES guard
bullet + updated provider list in balance-provenance paragraph
- deployment/README.md: add reconciliation-worker.yaml row to table
- docs/governance/GOVERNANCE_OVERVIEW.md: POAM-023 open -> closed
* docs(governance): address CAGE arXiv peer review 5 feedback
* docs(governance): sync markdown docs with review-5 fixes
* fix(governance): restore causal gatekeeper bool contract and isolate test mocks
- causal_gatekeeper.py: insufficient-telemetry guard was returning a
(False, message) tuple; callers using `if not result` would silently
treat non-empty tuples as truthy, inverting fail-closed to fail-open.
Fixed to return bare False per the documented bool contract.
- server.py: add load_rails import so the symbol is patchable at
src.governed_financial_advisor.server.load_rails in unit tests.
- test_deployment_verification: update container name to match manifest.
- test_causal_gatekeeper: mock Redis cache calls in unit tests.
- test_hitl_toctou_revalidation: correct patch target to
revalidate_post_hitl (actual method called by post_hitl_revalidate_node).1 parent 94f920b commit 0c38976
48 files changed
Lines changed: 2068 additions & 219 deletions
File tree
- .github/workflows
- deployment
- k8s
- docs
- architecture
- governance
- operations
- paper/measurements/2026-08-06-fafef04
- technical-report
- infra/modules/nemo_guardrails
- scripts
- src
- compliance_bridge
- gateway/governance
- langgraph_harness
- nemo
- governed_financial_advisor
- graph/nodes
- tools
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
180 | 257 | | |
181 | 258 | | |
182 | 259 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
12 | 27 | | |
13 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
14 | 72 | | |
15 | 73 | | |
16 | 74 | | |
| |||
37 | 95 | | |
38 | 96 | | |
39 | 97 | | |
40 | | - | |
| 98 | + | |
41 | 99 | | |
42 | 100 | | |
43 | 101 | | |
| |||
58 | 116 | | |
59 | 117 | | |
60 | 118 | | |
61 | | - | |
62 | | - | |
63 | 119 | | |
64 | 120 | | |
65 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
| |||
156 | 158 | | |
157 | 159 | | |
158 | 160 | | |
| 161 | + | |
| 162 | + | |
159 | 163 | | |
160 | 164 | | |
161 | 165 | | |
| |||
180 | 184 | | |
181 | 185 | | |
182 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
183 | 191 | | |
184 | 192 | | |
185 | 193 | | |
| |||
209 | 217 | | |
210 | 218 | | |
211 | 219 | | |
212 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
213 | 223 | | |
214 | 224 | | |
215 | 225 | | |
| |||
235 | 245 | | |
236 | 246 | | |
237 | 247 | | |
| 248 | + | |
| 249 | + | |
238 | 250 | | |
239 | 251 | | |
240 | 252 | | |
| |||
0 commit comments