SSM-Clock Stamp – Batch Verify-All (harness) (5.10)

Objective. Run a one-shot audit across sidecars, the ledger, and (optionally) daily anchors — fully offline, plain ASCII, deterministic PASS/FAIL.

Inputs

  • Sidecars with full lines: SSMCLOCK1|iso_utc|rasi_idx|theta_deg|sha256(file)|chain[|kv:...]
  • Optional append-only ledger file.
  • Optional anchor note(s) for a UTC date.

Command (conceptual)
verify-all [--today]

  • --today limits anchor parity to the current UTC day (or supply --date YYYY-MM-DD).

Procedure (deterministic)

  1. Per-file verify for each discoverable sidecar:
    • Recompute h' = H_algo(file_bytes) and compare to sha256(file) (or the declared algo).
    • Re-derive clock from iso_utc and compare rasi_idx and fixed-print theta_deg (exact theta_prec digits, IEEE-754 binary64, half-even).
  2. Rewalk ledger (if present):
    • chain_0 = "0"*64
    • For each row: chain_k = H_chain( ascii(chain_{k-1} + "|" + stamp_core_k) ); require equality.
  3. Anchor parity for the chosen UTC day (if notes exist):
    • Select same-day lines; canonical order by (iso_utc, stamp_core, chain).
    • Literal join: "Stamp_1|...|Stamp_n".
    • Compute rollup_D = sha256( ascii(joined) ); compare to rollup_sha256 (and count).

Expected summaries (stdout, ASCII)

# per-file lines (examples)
HASH_OK=true CLOCK_OK=true CHAIN_OK=true
VERDICT=PASS
...
# ledger continuity
LEDGER_OK=true
# anchor parity (if checked)
ANCHOR_LEDGER_OK=true
ANCHOR_SIDECARS_OK=true
VERDICT=PASS
# final summary
Verified files: <N> PASS: <p> FAIL: <f> Orphan sidecars: <o>

Pass criteria (batch)

  • Every file line shows VERDICT=PASS.
  • Ledger rewalk succeeds (LEDGER_OK=true).
  • Anchor parity matches (if checked).
  • Final summary: FAIL: 0.

Notes (must/should)

  • UTC-only iso_utc = "YYYY-MM-DDThh:mm:ssZ"; reject 23:59:60.
  • Angles printed with exactly theta_prec digits (default 5), round-half-to-even.
  • Digests are lowercase 64-hex.
  • All hash inputs are exact ASCII of the shown concatenations.
  • If no ledger: report CHAIN_OK=na per file and skip ledger continuity.

Navigation
Back: SSM-Clock Stamp – UTC Day Boundary (continuity sanity) (5.9)
Next: SSM-Clock Stamp – Acceptance Criteria (5.11)