Commit 0a27d43
authored
fix(agt-evidence-anchor): NFC-normalize agent_id/action_type/scope before hashing (#52)
mycelium_evidence_anchor.py's _compute_action_ref builds its own
domain-separated hash space (mycelium-evidence-anchor:v1: prefix) for
the community AGT EvidenceAnchor plugin, with agent_id/action_type/scope
taken from caller-supplied metadata. Unlike the canonical action_ref
profile (plugins/agt_evidence_anchor/action_ref.py), this path has no
ASCII-only Domain check, so two byte-different but visually identical
strings (NFC vs. NFD composition of the same value) hashed to two
different action_ref values for the same logical identity.
Flagged by Henri Sirkkavaara (SCITT list, 2026-08-16), raised as a
general NFC-vs-NFD-before-JCS point in an unrelated ARP/Certisyn
thread (Joel Hillier). Verified the canonical profile is unaffected:
action_ref.py's _validate_domain already rejects any non-ASCII value
in agent_id/action_type/scope with OutOfProfileDomainError before
hashing, which makes NFC/NFD divergence structurally impossible there
(the two forms only differ for non-ASCII code points). Added two
symmetric conformance vectors (nfc-001/nfc-002) confirming both forms
of the same identifier are rejected identically on the canonical path,
and documented the distinction between the two profiles in
docs/spec/action-ref.md.
No production adopters of this plugin (not in ADOPTERS.md/PROVIDERS.md,
not called from the main production path), no prior anchored data
affected -- this is the plugin's second commit since domain separation
was added (3710af2).
Changes:
- mycelium_evidence_anchor.py: unicodedata.normalize("NFC", ...) on the
three text fields before building the preimage
- tests/test_mycelium_evidence_anchor.py: 3 new tests (NFC/NFD give the
same action_ref for agent_id, scope, action_type)
- examples/conformance/action-ref-v1-domain-negative/*.fixture.json:
nfc-001/nfc-002 vectors (canonical profile rejects both forms
identically)
- docs/spec/action-ref.md: note explaining ASCII-only Domain closes
this class of ambiguity by design for the canonical profile, and
why the plugin needed the separate NFC fix
Verified: full suite green in a fresh clone of main (133 passed,
tests/ + plugins/agt_evidence_anchor/tests/), all 9 domain-negative
conformance vectors passed.1 parent a72c741 commit 0a27d43
4 files changed
Lines changed: 88 additions & 1 deletion
File tree
- docs/spec
- examples/conformance/action-ref-v1-domain-negative
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
5 | 21 | | |
6 | 22 | | |
7 | 23 | | |
| |||
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
95 | 119 | | |
96 | 120 | | |
97 | 121 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
250 | 251 | | |
251 | 252 | | |
252 | 253 | | |
253 | | - | |
| 254 | + | |
254 | 255 | | |
255 | 256 | | |
256 | 257 | | |
| |||
262 | 263 | | |
263 | 264 | | |
264 | 265 | | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
265 | 276 | | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
266 | 280 | | |
267 | 281 | | |
268 | 282 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
53 | 86 | | |
54 | 87 | | |
55 | 88 | | |
| |||
0 commit comments