Commit ade5f30
authored
fix(governance)!: complete outstanding v3.0.0 breaking changes (#88)
* feat(governance): reject non-finite values at ingress and stpa
Extend defence-in-depth for IEEE-754 NaN/inf bypass (follow-up to PR #86):
- TradeOrder: add math.isfinite guards to validate_positive (amount) and
validate_confidence; NaN silently passed validate_positive because
nan <= 0 is False.
- ValidateActionRequest / ToolExecutionRequest: add field_validator that
rejects non-finite floats in the params dict at the HTTP boundary.
- stpa_compiler.py generate_python: add less_than operator branches
(threshold_ref and literal) with identical math.isfinite fail-closed
guards; emit import math in the generated validator template.
- New test file test_ingress_nan_rejection.py covering all three ingress
models; less_than finiteness tests added to test_stpa_compiler.py.
* fix: resolve CI failures for sbom, lint, and obsolete tests
* test: fix mock signature in cbf rollback test
* feat(compliance): implement 5-part proof structure for refusal receipts
* feat(governance): add JWKS multi-key support and AGW envelope builder
- Add JWKSet class with thread-safe caching and key rotation (Finding #9)
- Add /governance/jwks endpoint for external verifiers
- Implement AGW envelope builder with RFC 8785 canonicalization (Finding #10)
- Add sign_archytan_digest() for direct pre-hashed signing
- Integrate JWKS lookup in verify_seal() with fallback to signer key
- Refactor GFA routing_seal to re-export from gateway module
- Add HMAC downgrade guard for production environment
- Add comprehensive test suites for JWKS and envelope features
* fix(governance)!: complete outstanding v3.0.0 breaking changes
BREAKING CHANGE: Remove AGWEnvelope/AGWEnvelopeBuilder deprecated aliases,
sign_archytan_digest() method, and create_ftra_node() deprecated kwargs.
- Delete src/gateway/governance/agw_envelope.py module
- Delete tests/test_agw_envelope.py
- Remove sign_archytan_digest() from KMSSigner (use sign() instead)
- Remove registry_path/plan_key kwargs from create_ftra_node()
- Fix KMS_BATCH_ENABLED documentation (default is false)
- Update CHANGELOG.md and docs/BREAKING_CHANGES_v3.md1 parent 5afd017 commit ade5f30
36 files changed
Lines changed: 3943 additions & 1176 deletions
File tree
- docs
- architecture
- plans
- src
- compliance_bridge
- gateway
- core
- governance
- ftra
- server
- governed_financial_advisor/utils
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | 263 | | |
281 | 264 | | |
282 | 265 | | |
| |||
303 | 286 | | |
304 | 287 | | |
305 | 288 | | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | 289 | | |
311 | 290 | | |
312 | 291 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
44 | 53 | | |
45 | 54 | | |
46 | 55 | | |
47 | 56 | | |
48 | 57 | | |
49 | | - | |
| 58 | + | |
50 | 59 | | |
51 | 60 | | |
52 | 61 | | |
53 | 62 | | |
54 | 63 | | |
55 | 64 | | |
| 65 | + | |
| 66 | + | |
56 | 67 | | |
57 | 68 | | |
58 | 69 | | |
59 | 70 | | |
60 | 71 | | |
61 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
62 | 79 | | |
63 | 80 | | |
64 | 81 | | |
65 | 82 | | |
66 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
67 | 87 | | |
68 | 88 | | |
69 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
70 | 100 | | |
71 | 101 | | |
72 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
9 | 19 | | |
10 | 20 | | |
11 | 21 | | |
| |||
49 | 59 | | |
50 | 60 | | |
51 | 61 | | |
| 62 | + | |
52 | 63 | | |
53 | 64 | | |
54 | 65 | | |
| |||
63 | 74 | | |
64 | 75 | | |
65 | 76 | | |
| 77 | + | |
66 | 78 | | |
67 | 79 | | |
68 | 80 | | |
| |||
118 | 130 | | |
119 | 131 | | |
120 | 132 | | |
121 | | - | |
| 133 | + | |
122 | 134 | | |
123 | 135 | | |
124 | 136 | | |
| |||
0 commit comments