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

+156
View File
@@ -0,0 +1,156 @@
{
"$schema": "../../schema/test-vector.schema.json",
"name": "Path - Boundary Conditions",
"spec_ref": "spec/03-path.md",
"protocol_version": 0,
"description": "Tests boundary conditions for path encoding including maximum valid values and values just below overflow thresholds.",
"vectors": [
{
"id": "pb-001",
"description": "hash_size=2, count=31 (62 bytes, 2 below max)",
"type": "encode_decode",
"structured": {
"header": {
"version": 0,
"payload_type": "ack",
"route_type": "flood"
},
"path": {
"hash_size": 2,
"hash_count": 31,
"hashes": [
"0001",
"0203",
"0405",
"0607",
"0809",
"0A0B",
"0C0D",
"0E0F",
"1011",
"1213",
"1415",
"1617",
"1819",
"1A1B",
"1C1D",
"1E1F",
"2021",
"2223",
"2425",
"2627",
"2829",
"2A2B",
"2C2D",
"2E2F",
"3031",
"3233",
"3435",
"3637",
"3839",
"3A3B",
"3C3D"
]
},
"payload": {
"ack_crc": "00000001"
}
},
"binary": "0D 5F 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D 01000000",
"notes": "path_len=0x5F: hash_size=2, count=31. Path: 62 bytes. Just below max."
},
{
"id": "pb-002",
"description": "hash_size=3, count=20 (60 bytes, 3 below max for this hash_size)",
"type": "encode_decode",
"structured": {
"header": {
"version": 0,
"payload_type": "ack",
"route_type": "flood"
},
"path": {
"hash_size": 3,
"hash_count": 20,
"hashes": [
"000102",
"030405",
"060708",
"090A0B",
"0C0D0E",
"0F1011",
"121314",
"151617",
"18191A",
"1B1C1D",
"1E1F20",
"212223",
"242526",
"272829",
"2A2B2C",
"2D2E2F",
"303132",
"333435",
"363738",
"393A3B"
]
},
"payload": {
"ack_crc": "00000001"
}
},
"binary": "0D 94 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F30313233343536373839 3A3B 01000000",
"notes": "path_len=0x94: hash_size=3, count=20. Path: 60 bytes."
},
{
"id": "pb-003",
"description": "Single-byte path: hash_size=1, count=1",
"type": "encode_decode",
"structured": {
"header": {
"version": 0,
"payload_type": "ack",
"route_type": "flood"
},
"path": {
"hash_size": 1,
"hash_count": 1,
"hashes": [
"00"
]
},
"payload": {
"ack_crc": "00000001"
}
},
"binary": "0D 01 00 01000000",
"notes": "Minimal non-empty path. Hash value 0x00 is valid."
},
{
"id": "pb-004",
"description": "Path with all-FF hashes",
"type": "encode_decode",
"structured": {
"header": {
"version": 0,
"payload_type": "ack",
"route_type": "flood"
},
"path": {
"hash_size": 1,
"hash_count": 3,
"hashes": [
"FF",
"FF",
"FF"
]
},
"payload": {
"ack_crc": "00000001"
}
},
"binary": "0D 03 FFFFFF 01000000",
"notes": "All hashes are 0xFF. Valid encoding."
}
]
}
+260
View File
@@ -0,0 +1,260 @@
{
"$schema": "../../schema/test-vector.schema.json",
"name": "Path - Hash Counts",
"spec_ref": "spec/03-path.md",
"protocol_version": 0,
"description": "Tests various hash count values including zero, small, and maximum values for each hash size.",
"vectors": [
{
"id": "hc-000",
"description": "Zero hops (hash_count=0, hash_size=1) - empty path",
"type": "encode_decode",
"structured": {
"header": {
"version": 0,
"payload_type": "ack",
"route_type": "flood"
},
"path": {
"hash_size": 1,
"hash_count": 0,
"hashes": []
},
"payload": {
"ack_crc": "00000001"
}
},
"binary": "0D 00 01000000",
"notes": "path_len=0x00. Zero-length path."
},
{
"id": "hc-001",
"description": "Zero hops with hash_size=2 - still empty path",
"type": "encode_decode",
"structured": {
"header": {
"version": 0,
"payload_type": "ack",
"route_type": "flood"
},
"path": {
"hash_size": 2,
"hash_count": 0,
"hashes": []
},
"payload": {
"ack_crc": "00000001"
}
},
"binary": "0D 40 01000000",
"notes": "path_len=0x40: hash_size=2, count=0. Path is still 0 bytes even though hash_size>1."
},
{
"id": "hc-002",
"description": "Zero hops with hash_size=3",
"type": "encode_decode",
"structured": {
"header": {
"version": 0,
"payload_type": "ack",
"route_type": "flood"
},
"path": {
"hash_size": 3,
"hash_count": 0,
"hashes": []
},
"payload": {
"ack_crc": "00000001"
}
},
"binary": "0D 80 01000000",
"notes": "path_len=0x80: hash_size=3, count=0. Path is 0 bytes."
},
{
"id": "hc-010",
"description": "Maximum count for hash_size=1: 63 hops, 63 bytes",
"type": "encode_decode",
"structured": {
"header": {
"version": 0,
"payload_type": "ack",
"route_type": "flood"
},
"path": {
"hash_size": 1,
"hash_count": 63,
"hashes": [
"01",
"02",
"03",
"04",
"05",
"06",
"07",
"08",
"09",
"0A",
"0B",
"0C",
"0D",
"0E",
"0F",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"1A",
"1B",
"1C",
"1D",
"1E",
"1F",
"20",
"21",
"22",
"23",
"24",
"25",
"26",
"27",
"28",
"29",
"2A",
"2B",
"2C",
"2D",
"2E",
"2F",
"30",
"31",
"32",
"33",
"34",
"35",
"36",
"37",
"38",
"39",
"3A",
"3B",
"3C",
"3D",
"3E",
"3F"
]
},
"payload": {
"ack_crc": "00000001"
}
},
"binary": "0D 3F 0102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F 01000000",
"notes": "path_len=0x3F: hash_size=1, count=63. Path: 63 bytes. Maximum valid path for 1-byte hashes."
},
{
"id": "hc-020",
"description": "Maximum count for hash_size=2: 32 hops, 64 bytes (exactly MAX_PATH_SIZE)",
"type": "encode_decode",
"structured": {
"header": {
"version": 0,
"payload_type": "ack",
"route_type": "flood"
},
"path": {
"hash_size": 2,
"hash_count": 32,
"hashes": [
"0001",
"0203",
"0405",
"0607",
"0809",
"0A0B",
"0C0D",
"0E0F",
"1011",
"1213",
"1415",
"1617",
"1819",
"1A1B",
"1C1D",
"1E1F",
"2021",
"2223",
"2425",
"2627",
"2829",
"2A2B",
"2C2D",
"2E2F",
"3031",
"3233",
"3435",
"3637",
"3839",
"3A3B",
"3C3D",
"3E3F"
]
},
"payload": {
"ack_crc": "00000001"
}
},
"binary": "0D 60 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F 01000000",
"notes": "path_len=0x60: bits 6-7=01 (hash_size=2), bits 0-5=32. Path: 64 bytes = MAX_PATH_SIZE. Maximum valid for 2-byte hashes."
},
{
"id": "hc-030",
"description": "Maximum count for hash_size=3: 21 hops, 63 bytes",
"type": "encode_decode",
"structured": {
"header": {
"version": 0,
"payload_type": "ack",
"route_type": "flood"
},
"path": {
"hash_size": 3,
"hash_count": 21,
"hashes": [
"000102",
"030405",
"060708",
"090A0B",
"0C0D0E",
"0F1011",
"121314",
"151617",
"18191A",
"1B1C1D",
"1E1F20",
"212223",
"242526",
"272829",
"2A2B2C",
"2D2E2F",
"303132",
"333435",
"363738",
"393A3B",
"3C3D3E"
]
},
"payload": {
"ack_crc": "00000001"
}
},
"binary": "0D 95 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E 01000000",
"notes": "path_len=0x95: bits 6-7=10 (hash_size=3), bits 0-5=21. Path: 63 bytes. Maximum valid for 3-byte hashes (22*3=66 would overflow)."
}
]
}
+188
View File
@@ -0,0 +1,188 @@
{
"$schema": "../../schema/test-vector.schema.json",
"name": "Path - Hash Sizes",
"spec_ref": "spec/03-path.md",
"protocol_version": 0,
"description": "Tests all valid hash sizes (1, 2, 3 bytes) in the path length encoding. These vectors are critical for catching implementations that treat path_len as a raw byte count.",
"vectors": [
{
"id": "hs-001",
"description": "Hash size 1 (code 0), 1 hop",
"type": "encode_decode",
"structured": {
"header": {
"version": 0,
"payload_type": "ack",
"route_type": "flood"
},
"path": {
"hash_size": 1,
"hash_count": 1,
"hashes": [
"AA"
]
},
"payload": {
"ack_crc": "00000001"
}
},
"binary": "0D 01 AA 01000000",
"notes": "path_len=0x01: bits 6-7=00 (size code 0, hash_size=1), bits 0-5=1 (count=1). Path: 1 byte."
},
{
"id": "hs-002",
"description": "Hash size 1 (code 0), 5 hops",
"type": "encode_decode",
"structured": {
"header": {
"version": 0,
"payload_type": "ack",
"route_type": "flood"
},
"path": {
"hash_size": 1,
"hash_count": 5,
"hashes": [
"AA",
"BB",
"CC",
"DD",
"EE"
]
},
"payload": {
"ack_crc": "00000001"
}
},
"binary": "0D 05 AABBCCDDEE 01000000",
"notes": "path_len=0x05: hash_size=1, count=5. Path: 5 bytes."
},
{
"id": "hs-010",
"description": "Hash size 2 (code 1), 1 hop",
"type": "encode_decode",
"structured": {
"header": {
"version": 0,
"payload_type": "ack",
"route_type": "flood"
},
"path": {
"hash_size": 2,
"hash_count": 1,
"hashes": [
"AABB"
]
},
"payload": {
"ack_crc": "00000001"
}
},
"binary": "0D 41 AABB 01000000",
"notes": "path_len=0x41: bits 6-7=01 (size code 1, hash_size=2), bits 0-5=1 (count=1). Path: 2 bytes. An implementation treating 0x41=65 as raw byte count would fail."
},
{
"id": "hs-011",
"description": "Hash size 2 (code 1), 2 hops",
"type": "encode_decode",
"structured": {
"header": {
"version": 0,
"payload_type": "ack",
"route_type": "flood"
},
"path": {
"hash_size": 2,
"hash_count": 2,
"hashes": [
"AABB",
"CCDD"
]
},
"payload": {
"ack_crc": "00000001"
}
},
"binary": "0D 42 AABBCCDD 01000000",
"notes": "path_len=0x42: hash_size=2, count=2. Path: 4 bytes. This is the example that catches the meshcore-rs bug (0x42=66 raw vs 4 actual bytes)."
},
{
"id": "hs-012",
"description": "Hash size 2 (code 1), 5 hops",
"type": "encode_decode",
"structured": {
"header": {
"version": 0,
"payload_type": "ack",
"route_type": "flood"
},
"path": {
"hash_size": 2,
"hash_count": 5,
"hashes": [
"1122",
"3344",
"5566",
"7788",
"99AA"
]
},
"payload": {
"ack_crc": "00000001"
}
},
"binary": "0D 45 112233445566778899AA 01000000",
"notes": "path_len=0x45: hash_size=2, count=5. Path: 10 bytes."
},
{
"id": "hs-020",
"description": "Hash size 3 (code 2), 1 hop",
"type": "encode_decode",
"structured": {
"header": {
"version": 0,
"payload_type": "ack",
"route_type": "flood"
},
"path": {
"hash_size": 3,
"hash_count": 1,
"hashes": [
"AABBCC"
]
},
"payload": {
"ack_crc": "00000001"
}
},
"binary": "0D 81 AABBCC 01000000",
"notes": "path_len=0x81: bits 6-7=10 (size code 2, hash_size=3), bits 0-5=1. Path: 3 bytes."
},
{
"id": "hs-021",
"description": "Hash size 3 (code 2), 3 hops",
"type": "encode_decode",
"structured": {
"header": {
"version": 0,
"payload_type": "ack",
"route_type": "flood"
},
"path": {
"hash_size": 3,
"hash_count": 3,
"hashes": [
"AABBCC",
"DDEEFF",
"112233"
]
},
"payload": {
"ack_crc": "00000001"
}
},
"binary": "0D 83 AABBCC DDEEFF 112233 01000000",
"notes": "path_len=0x83: hash_size=3, count=3. Path: 9 bytes."
}
]
}