Commit fc88ea9
committed
JCS conformance: canonical_hash_hex now uses strict RFC 8785 (mirrors SDK 2.6.0-alpha.4)
The Python SDK's compute_attribution_action_ref() hashes via canonical_hash_hex,
which was using the legacy null-stripping canonicalize() instead of strict
RFC 8785 canonicalize_jcs(). This is the Python mirror of today's TypeScript SDK
fix (commit 3f63268 on agent-passport-system).
Per draft-pidlisnyi-aps-01 §4.1 and ATTRIBUTION-PRIMITIVE-v1.1 §1.6, action_ref
must follow strict RFC 8785 JCS. Cross-verified against erdtman/canonicalize@3.0.0
and rfc8785@0.1.4 in the TypeScript SDK; Python uses the in-process
canonicalize_jcs() implementation which is byte-identical to those references.
Tests: 518 passed, 1 skipped, 6 xfailed. Zero fixture changes required (no
production pre-image ever contained a null-valued key at the canonicalization
layer). Cross-language attribution settlement fixtures all byte-match unchanged.
Known gap, scheduled for v3.0: hash_axis_leaf (Merkle) and envelope_bytes
(signing envelope) still use legacy canonicalize() to preserve partner byte-match
fixtures. v3.0 migration will coordinate fixture rotation across partners.
Version: 2.4.0a2 -> 2.4.0a31 parent 38f176c commit fc88ea9
2 files changed
Lines changed: 14 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
137 | 148 | | |
138 | 149 | | |
139 | 150 | | |
| |||
0 commit comments