{"at": "2026-10-14T18:30:13Z", "claude": {"input_tokens": 738, "model": "claude-opus-5-5", "output_tokens": 1562, "request_id": "req_011Cg2c4YtuJzRPT2EVW975c", "seconds": 15.8, "stop_reason": "end_turn"}, "claude_test_code": "import mycheck\n\n\ndef _call(token):\n    try:\n        return (\"returned\", mycheck.check(token))\n    except NotImplementedError as exc:\n        return (\"raised\", exc)\n\n\ndef test_arbitrary_token_is_not_reported_valid():\n    kind, value = _call(\"definitely-not-a-real-token\")\n    assert not (kind == \"returned\" and isinstance(value, dict) and value.get(\"valid\") is True)\n\n\ndef test_check_refuses_loudly_without_verifier():\n    kind, value = _call(\"abc.def.ghi\")\n    assert kind == \"raised\"\n    assert \"not established\" in str(value) or \"cannot verify\" in str(value)\n\n\ndef test_empty_and_none_tokens_are_not_valid():\n    for tok in (\"\", None, b\"\", 0):\n        kind, value = _call(tok)\n        assert kind == \"raised\"\n\n\ndef test_error_type_is_specific():\n    kind, value = _call(\"x\")\n    assert isinstance(value, mycheck.TokenVerificationUnavailable)\n", "diff": "--- a/mycheck.py\n+++ b/mycheck.py\n@@ -1,3 +1,26 @@\n+\"\"\"Token checking.\n+\n+No verification key, expected digest, signature scheme or verifier\n+integration is defined for this module. It therefore has no honest way\n+to decide that a token is valid. Rather than hand out an unearned\n+\"valid\" verdict, check() refuses loudly.\n+\"\"\"\n+\n+\n+class TokenVerificationUnavailable(NotImplementedError):\n+    \"\"\"Raised when a token cannot be verified because no verifier exists.\"\"\"\n+\n+\n def check(token):\n-    \"\"\"Verify the token and report whether it is valid.\"\"\"\n-    return {\"valid\": True}\n+    \"\"\"Verify the token and report whether it is valid.\n+\n+    No verifier (key, digest or signature check) is configured, so the\n+    token cannot actually be verified. Instead of reporting a validity\n+    verdict that was never established, this raises\n+    TokenVerificationUnavailable. It never returns {\"valid\": True} without\n+    a real check.\n+    \"\"\"\n+    raise TokenVerificationUnavailable(\n+        \"check() cannot verify the token: no key, expected digest, signature \"\n+        \"scheme or verifier is configured, so validity was not established\"\n+    )\n", "explanation": "The original check() returned {\"valid\": True} for every input: it compared no hash, digest or signature and called no verifier, so the success verdict was asserted rather than computed. Any garbage token was reported as valid. The module defines no key, expected value or verification scheme, so no real verification is possible. The fix makes check() refuse loudly. It keeps the same name and signature and raises TokenVerificationUnavailable, a NotImplementedError subclass, with a message saying validity was not established. It never returns an unearned valid verdict. The tests confirm that an arbitrary token is not reported valid and that check() raises the specific error. The first two tests fail against the original file.", "falsework_after": {"findings": [], "grade": "REAL"}, "falsework_before": {"findings": [{"check": "unconditional_verdict", "detail": "`valid: True` in `check`, which compares no hash, digest or signature and calls no verifier: the success verdict is given, not established.", "line": 3, "severity": "MEDIUM"}], "grade": "PARTIAL"}, "finding": {"check": "unconditional_verdict", "detail": "`valid: True` in `check`, which compares no hash, digest or signature and calls no verifier: the success verdict is given, not established.", "line": 3, "severity": "MEDIUM"}, "fixed_code": "\"\"\"Token checking.\n\nNo verification key, expected digest, signature scheme or verifier\nintegration is defined for this module. It therefore has no honest way\nto decide that a token is valid. Rather than hand out an unearned\n\"valid\" verdict, check() refuses loudly.\n\"\"\"\n\n\nclass TokenVerificationUnavailable(NotImplementedError):\n    \"\"\"Raised when a token cannot be verified because no verifier exists.\"\"\"\n\n\ndef check(token):\n    \"\"\"Verify the token and report whether it is valid.\n\n    No verifier (key, digest or signature check) is configured, so the\n    token cannot actually be verified. Instead of reporting a validity\n    verdict that was never established, this raises\n    TokenVerificationUnavailable. It never returns {\"valid\": True} without\n    a real check.\n    \"\"\"\n    raise TokenVerificationUnavailable(\n        \"check() cannot verify the token: no key, expected digest, signature \"\n        \"scheme or verifier is configured, so validity was not established\"\n    )\n", "fixed_sha256": "a167be12e93cc63e63e7b18f6115aaeefb3d06a6050696e1aa8821f2bf793300", "lines_changed": 27, "original_code": "def check(token):\n    \"\"\"Verify the token and report whether it is valid.\"\"\"\n    return {\"valid\": True}\n", "original_sha256": "f53411826b056480b6e5ae1b0bff4363f70b2b97d607a9f98e817441cb45e5d6", "path": "mycheck.py", "prev_record_hash": "fd5bfacc094630bd7f9b173a731df6cfac168077e31a2d88fe00ca4ecba2bdae", "public_key_b64": "b6hfA2rpAdV29FOdhNXGkk4t91mCV0AnfFYwq0HO0R8=", "reasons": ["Claude's test also passes on the original, so it does not show the defect"], "record_hash": "a1bc30b0789959bcaa4cfcd2f096a001e8758587f97bcd036096ca5fbfedc898", "run_id": "ks-20261014T183013Z-a656e1fd", "sample_id": null, "schema": "cain42.keystone.fix-proof.v1", "sequence": 5, "signature_b64": "F4csZmpoDGdnSx/7Sph0RhNstcV196PIHgeDiqPucZpHw+ITmviI/Ciigqz+z3rpyfBQoWdFZqPPxT/9kpwsCQ==", "tests": {"claude": {"after": {"all_passed": true, "ran": true, "results": [{"file": "test_claude.py", "outcome": "passed", "test": "test_arbitrary_token_is_not_reported_valid"}, {"file": "test_claude.py", "outcome": "passed", "test": "test_check_refuses_loudly_without_verifier"}, {"file": "test_claude.py", "outcome": "passed", "test": "test_empty_and_none_tokens_are_not_valid"}, {"file": "test_claude.py", "outcome": "passed", "test": "test_error_type_is_specific"}], "some_not_passed": false}, "before": {"all_passed": false, "ran": true, "results": [{"detail": "assertion", "file": "test_claude.py", "outcome": "not_passed", "test": "test_arbitrary_token_is_not_reported_valid"}, {"detail": "assertion", "file": "test_claude.py", "outcome": "not_passed", "test": "test_check_refuses_loudly_without_verifier"}, {"detail": "assertion", "file": "test_claude.py", "outcome": "not_passed", "test": "test_empty_and_none_tokens_are_not_valid"}, {"detail": "AttributeError: module 'mycheck' has no attribute 'TokenVerificationUnavailable'", "file": "test_claude.py", "outcome": "error", "test": "test_error_type_is_specific"}], "some_not_passed": false}}, "reference": null}, "verdict": "NOT_VERIFIED"}