Add comprehensive spec audit results and pyMC_core issue reports

- CHANGELOG.md: Full audit findings organized by severity
- PYMC_CORE_ISSUES.md: 7 evidence-based bug reports for pyMC_core
  (wrong constants, broken path_len decoding, wrong TRACE hash,
  wrong SNR calculation)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Add comprehensive spec audit results and pyMC_core issue reports

- CHANGELOG.md: Full audit findings organized by severity
- PYMC_CORE_ISSUES.md: 7 evidence-based bug reports for pyMC_core
  (wrong constants, broken path_len decoding, wrong TRACE hash,
  wrong SNR calculation)
- Remove ERRATA.md: contents already covered by audit findings

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Opus 4.6 committed 2026-04-01 21:37:57 -06:00
commit 9db901088e
79 files changed
+8923

No files matched your search

@@ -0,0 +1,57 @@
{
"$schema": "../../schema/test-vector.schema.json",
"name": "Invalid - Bad Path Length Encoding",
"spec_ref": "spec/03-path.md",
"protocol_version": 0,
"description": "Tests invalid path_len values including the reserved hash_size=4 and path overflow conditions.",
"vectors": [
{
"id": "bpl-001",
"description": "Reserved hash size code 3 (hash_size would be 4): path_len=0xC0",
"type": "invalid",
"binary": "0D C0 01000000",
"expected_error": "reserved_hash_size",
"notes": "path_len=0xC0: bits 6-7=11 (hash size code 3). isValidPathLen returns false because hash_size==4."
},
{
"id": "bpl-002",
"description": "Reserved hash size code 3 with non-zero count: path_len=0xC1",
"type": "invalid",
"binary": "0D C1 AA 01000000",
"expected_error": "reserved_hash_size",
"notes": "path_len=0xC1: hash size code 3 (reserved), count=1. Invalid regardless of count."
},
{
"id": "bpl-003",
"description": "Reserved hash size code 3, max count: path_len=0xFF",
"type": "invalid",
"binary": "0D FF 0102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F 01000000",
"expected_error": "reserved_hash_size",
"notes": "path_len=0xFF: hash size code 3 (reserved), count=63. Even if hash_size=4 were valid, 63*4=252 > MAX_PATH_SIZE."
},
{
"id": "bpl-004",
"description": "Path overflow: hash_size=2, count=33 (66 bytes > MAX_PATH_SIZE)",
"type": "invalid",
"binary": "0D 61 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F30313233343536373839 3A3B3C3D3E3F4041 01000000",
"expected_error": "path_overflow",
"notes": "path_len=0x61: hash_size=2, count=33. 33*2=66 > MAX_PATH_SIZE (64). isValidPathLen returns false."
},
{
"id": "bpl-005",
"description": "Path overflow: hash_size=3, count=22 (66 bytes > MAX_PATH_SIZE)",
"type": "invalid",
"binary": "0D 96 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F4041 01000000",
"expected_error": "path_overflow",
"notes": "path_len=0x96: hash_size=3, count=22. 22*3=66 > MAX_PATH_SIZE (64)."
},
{
"id": "bpl-006",
"description": "Path overflow edge case: hash_size=1, count=63 is valid (63<=64), but with hash_size=2 and count=33 it overflows",
"type": "invalid",
"binary": "0D 61 0102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F3031323334353637383940 4142 DEADBEEF",
"expected_error": "path_overflow",
"notes": "path_len=0x61: size code 1 (hash_size=2), count 33. 33*2=66 > 64."
}
]
}
+49
View File
@@ -0,0 +1,49 @@
{
"$schema": "../../schema/test-vector.schema.json",
"name": "Invalid - Too Short Packets",
"spec_ref": "spec/01-wire-format.md",
"protocol_version": 0,
"description": "Tests packets that are shorter than the minimum required size for their route type.",
"vectors": [
{
"id": "short-001",
"description": "1-byte packet (FLOOD): only header, missing path_len and payload",
"type": "invalid",
"binary": "0D",
"expected_error": "too_short",
"notes": "Minimum FLOOD packet is 3 bytes. This is 1."
},
{
"id": "short-002",
"description": "2-byte packet (FLOOD): header + path_len, missing payload",
"type": "invalid",
"binary": "0D 00",
"expected_error": "empty_payload",
"notes": "Header + path_len present but no payload. i=2, len=2, so i>=len."
},
{
"id": "short-003",
"description": "5-byte TRANSPORT_FLOOD: header + transport codes, missing path_len",
"type": "invalid",
"binary": "0C 00000000",
"expected_error": "too_short",
"notes": "TRANSPORT_FLOOD needs at least 7 bytes (1+4+1+1). This has 5."
},
{
"id": "short-004",
"description": "6-byte TRANSPORT_FLOOD: header + transport + path_len, missing payload",
"type": "invalid",
"binary": "0C 00000000 00",
"expected_error": "empty_payload",
"notes": "All framing present but zero payload."
},
{
"id": "short-005",
"description": "FLOOD with path consuming all remaining bytes",
"type": "invalid",
"binary": "0D 03 AABBCC",
"expected_error": "empty_payload",
"notes": "header(1) + path_len(1) + path(3) = 5 bytes = total. i=5, len=5."
}
]
}
+65
View File
@@ -0,0 +1,65 @@
{
"$schema": "../../schema/test-vector.schema.json",
"name": "Invalid - Truncated Packets",
"spec_ref": "spec/01-wire-format.md",
"protocol_version": 0,
"description": "Tests packets that are truncated at various points, verifying that decoders reject them gracefully.",
"vectors": [
{
"id": "trunc-001",
"description": "Empty packet (0 bytes)",
"type": "invalid",
"binary": "",
"expected_error": "too_short",
"notes": "Zero-length input. Cannot read header."
},
{
"id": "trunc-002",
"description": "Header only (1 byte, FLOOD route)",
"type": "invalid",
"binary": "0D",
"expected_error": "too_short",
"notes": "Only header byte. Cannot read path_len."
},
{
"id": "trunc-003",
"description": "Header only (1 byte, TRANSPORT_FLOOD route) - transport codes truncated",
"type": "invalid",
"binary": "0C",
"expected_error": "too_short",
"notes": "Route type 0x00 requires 4 transport code bytes, but only header is present."
},
{
"id": "trunc-004",
"description": "TRANSPORT_FLOOD with partial transport codes (2 of 4 bytes)",
"type": "invalid",
"binary": "0C 1234",
"expected_error": "too_short",
"notes": "Only 2 of 4 transport code bytes present."
},
{
"id": "trunc-005",
"description": "TRANSPORT_FLOOD with transport codes but no path_len",
"type": "invalid",
"binary": "0C 0000 0000",
"expected_error": "too_short",
"notes": "5 bytes: header + 4 transport code bytes. Missing path_len."
},
{
"id": "trunc-006",
"description": "FLOOD with path_len indicating 3 hops but only 1 path byte",
"type": "invalid",
"binary": "0D 03 AA FF",
"expected_error": "truncated_path",
"notes": "path_len=0x03 means 3 bytes of path expected but only 1 byte follows before the alleged payload. The decoder would read 3 path bytes (AA FF ??) and run out."
},
{
"id": "trunc-007",
"description": "FLOOD with 2-byte hash path_len=0x42 (4 path bytes needed) but only 2 available",
"type": "invalid",
"binary": "0D 42 AABB FF",
"expected_error": "truncated_path",
"notes": "path_len=0x42: hash_size=2, count=2, need 4 path bytes. Only 2 bytes before payload marker."
}
]
}