SSM-Clock Stamp – Anchor Mismatch → Root-Cause (5.7)

Objective. Diagnose and fix a daily roll-up mismatch between a recomputed digest and the published (or expected) anchor — deterministic, plain ASCII.

Setup (inputs)

  • UTC date YYYY-MM-DD.
  • Source A (e.g., ledger) and Source B (e.g., sidecars).
  • Expected or published rollup_sha256 (optional).
  • Each stamp line is the full ASCII record:
    SSMCLOCK1|iso_utc|rasi_idx|theta_deg|sha256(file)|chain[|kv:...]

Reproduce the mismatch (minimal)

  1. Select same-UTC-day lines from each source (iso_utc → YYYY-MM-DD).
  2. Canonical order by key (iso_utc, stamp_core, chain) where
    stamp_core = "SSMCLOCK1|" + iso_utc + "|" + rasi_idx + "|" + theta_deg + "|" + sha256(file).
  3. Join literally: "Stamp_1|...|Stamp_n" (single |, no leading/trailing).
  4. Hash: rollup_D = sha256( ascii(Stamp_1 "|" ... "|" Stamp_n) ).
  5. Observe mismatch: digest or count differs.

Root-cause checklist (deterministic fixes)

  • Day selection (UTC only).
    Ensure iso_utc is YYYY-MM-DDThh:mm:ssZ; no subseconds; reject 23:59:60.
  • Order.
    Must be (iso_utc, stamp_core, chain); ASCII/byte-wise comparison.
  • Join.
    Use literal | between full lines; no spaces, no trailing |; do not insert \n.
  • Inner formatting (do not “prettify”).
    • theta_deg: fixed theta_prec digits (default 5) with IEEE-754 binary64 round-half-to-even; compare as strings.
    • Digests: lowercase 64-hex ([0-9a-f]{64}).
    • Keep any kv: tail exactly as recorded.
  • Set difference (make it explicit).
    Compute ASCII diffs:
    • missing_in_ledger = sidecars_set - ledger_set
    • missing_in_sidecars = ledger_set - sidecars_set
      List the first differing line(s) verbatim.
  • Ledger continuity (optional but helpful).
    Rewalk: chain_k = H_chain( ascii(chain_{k-1} + "|" + stamp_core_k) ) with chain_0 = "0"*64; find first break index k.

Recovery procedure (copy-ready)

  1. Fix selection, order, join, or restore missing lines as indicated by the diff.
  2. Recompute: rollup_D' = sha256( ascii(Stamp_1 "|" ... "|" Stamp_n) ).
  3. If publishing: update the anchor note (and count) once parity holds across sources.
  4. (Optional) Add witness_chain_tip=<64-hex> to tie the anchor to the ledger tip.

Expected outputs

  • Before fix:
    ANCHOR_LEDGER_OK=false or ANCHOR_SIDECARS_OK=false
  • After fix:
    ANCHOR_LEDGER_OK=true and ANCHOR_SIDECARS_OK=true, VERDICT=PASS

Why this works
The Shunyaya Symbolic Mathematical Clock Stamp anchor depends only on public, reproducible ASCII strings. Canonical selection, ordering, and literal joining make differences mechanical to locate and correct.

Navigation
Back: SSM-Clock Stamp – Daily Anchor Parity (ledger vs sidecars) (5.6)
Next: SSM-Clock Stamp – Canonical Formatting (theta precision) (5.8)