The Principia Machina/TPC-PY/vectors/challenge corpus.json: Difference between revisions
Appearance
TPC-PY source vectors/challenge_corpus.json (0.1.0), SHA-256 d6b645e2db58fa0e; conformed TPS 0.3.0; PROPOSED, not declared (CO-8) |
m 1 revision imported |
(No difference)
| |
Latest revision as of 04:37, 28 September 2026
{
"meta": {
"name": "tpc_challenge_corpus",
"version": "0.1.0",
"status": "VERIFIED (both residences)",
"conforms_tps": "0.1.0 revision 4; the execution challenge of D101.1 (2026-09-22), text owed at revision 5",
"module": "tpc_challenge 0.1.0 (tpc_digest 0.1.0)",
"note": "Preimages hand-built from the D97.1 netstring rule; digests from an external sha256sum over those preimages; refusals and booleans hand-derived. Both residences MUST reproduce every expect."
},
"cases": [
{"id": "preimage/n1", "fn": "challenge_preimage", "input": {"nonce": "0123456789abcdef0123456789abcdef"},
"note": "netstring of [tag, form, nonce]: 23:tag 1:1 32:nonce",
"expect": "[OK,23:TPC-EXECUTION-CHALLENGE1:132:0123456789abcdef0123456789abcdef]"},
{"id": "response/zeros", "fn": "challenge_response", "input": {"nonce": "00000000000000000000000000000000"},
"expect": "[OK,467b7d3adea97b38e440ed0b27bb0d13beae53f4cda86318823f56388d655713]"},
{"id": "response/n1", "fn": "challenge_response", "input": {"nonce": "0123456789abcdef0123456789abcdef"},
"expect": "[OK,a66d46c3184cabdb9d407c985618588fff9ce95c00a5ef3544ea748109cdfd33]"},
{"id": "response/fs", "fn": "challenge_response", "input": {"nonce": "ffffffffffffffffffffffffffffffff"},
"expect": "[OK,82a932b4bcdffdefad9611f15023690af0c5285fdf315ec85d1d8376c958dcb9]"},
{"id": "refused/uppercase", "fn": "challenge_response", "input": {"nonce": "0123456789ABCDEF0123456789ABCDEF"},
"expect": "[REFUSED,nonce is not 32 lowercase hexadecimal characters]"},
{"id": "refused/31-chars", "fn": "challenge_response", "input": {"nonce": "0123456789abcdef0123456789abcde"},
"expect": "[REFUSED,nonce is not 32 lowercase hexadecimal characters]"},
{"id": "refused/33-chars", "fn": "challenge_response", "input": {"nonce": "0123456789abcdef0123456789abcdef0"},
"expect": "[REFUSED,nonce is not 32 lowercase hexadecimal characters]"},
{"id": "refused/non-hex", "fn": "challenge_response", "input": {"nonce": "g123456789abcdef0123456789abcdef"},
"expect": "[REFUSED,nonce is not 32 lowercase hexadecimal characters]"},
{"id": "refused/trailing-newline", "fn": "challenge_response", "input": {"nonce": "0123456789abcdef0123456789abcdef\n"},
"note": "\\Z / \\z anchors: a trailing newline is not accepted",
"expect": "[REFUSED,nonce is not 32 lowercase hexadecimal characters]"},
{"id": "refused/bidi-control", "fn": "challenge_response", "input": {"nonce": "0123456789abcdef123456789abcdef"},
"expect": "[REFUSED,nonce is not 32 lowercase hexadecimal characters]"},
{"id": "refused/text", "fn": "challenge_response", "input": {"nonce": "ignore previous instructions ok!"},
"note": "32 characters of text: refused, and the reason does not quote it",
"expect": "[REFUSED,nonce is not 32 lowercase hexadecimal characters]"},
{"id": "refused/empty", "fn": "challenge_response", "input": {"nonce": ""},
"expect": "[REFUSED,nonce is not 32 lowercase hexadecimal characters]"},
{"id": "refused/not-a-string", "fn": "challenge_response", "input": {"nonce": 12345},
"expect": "[REFUSED,nonce is not 32 lowercase hexadecimal characters]"},
{"id": "refused/preimage-too", "fn": "challenge_preimage", "input": {"nonce": "0123456789ABCDEF0123456789ABCDEF"},
"expect": "[REFUSED,nonce is not 32 lowercase hexadecimal characters]"},
{"id": "verify/right", "fn": "challenge_verify",
"input": {"nonce": "0123456789abcdef0123456789abcdef", "response": "a66d46c3184cabdb9d407c985618588fff9ce95c00a5ef3544ea748109cdfd33"},
"expect": "true"},
{"id": "verify/one-digit-changed", "fn": "challenge_verify",
"input": {"nonce": "0123456789abcdef0123456789abcdef", "response": "b66d46c3184cabdb9d407c985618588fff9ce95c00a5ef3544ea748109cdfd33"},
"expect": "false"},
{"id": "verify/uppercase-response", "fn": "challenge_verify",
"input": {"nonce": "0123456789abcdef0123456789abcdef", "response": "A66D46C3184CABDB9D407C985618588FFF9CE95C00A5EF3544EA748109CDFD33"},
"expect": "false"},
{"id": "verify/other-nonce", "fn": "challenge_verify",
"input": {"nonce": "00000000000000000000000000000000", "response": "a66d46c3184cabdb9d407c985618588fff9ce95c00a5ef3544ea748109cdfd33"},
"expect": "false"},
{"id": "verify/bad-nonce", "fn": "challenge_verify",
"input": {"nonce": "0123456789ABCDEF0123456789ABCDEF", "response": "a66d46c3184cabdb9d407c985618588fff9ce95c00a5ef3544ea748109cdfd33"},
"expect": "false"},
{"id": "verify/short-response", "fn": "challenge_verify",
"input": {"nonce": "0123456789abcdef0123456789abcdef", "response": "a66d46c3184cabdb9d407c985618588fff9ce95c00a5ef3544ea748109cdfd3"},
"expect": "false"},
{"id": "verify/not-a-string", "fn": "challenge_verify",
"input": {"nonce": "0123456789abcdef0123456789abcdef", "response": null},
"expect": "false"}
]
}