SSM-Clock Stamp – Canonical Ordering (3.2)

Purpose. Establish a single deterministic order for a day’s included stamp lines so every auditor derives the same sequence before anchoring. All comparisons are plain ASCII (byte-wise lexicographic).

Sort tuple (must, ascending)

  1. Primary: iso_utc (string compare on fixed YYYY-MM-DDThh:mm:ssZ)
  2. Secondary: stamp_core, where
    stamp_core = "SSMCLOCK1|" + iso_utc + "|" + rasi_idx + "|" + theta_deg + "|" + sha256(file)
  3. Tertiary (tiebreak): chain (lowercase 64-hex)

Rationale.

  • Primary time sort groups simultaneous-day records in chronological order.
  • Secondary stamp_core makes ordering independent of the chain while still committing to the exact data before it.
  • Tertiary chain breaks any rare ties deterministically.

Comparison rules (must)

  • ASCII/byte-wise lexicographic comparisons only; no locale/collation.
  • theta_deg is the fixed-digit string (exactly theta_prec digits, default 5, round-half-to-even).
  • Digests are lowercase 64-hex.
  • No trimming/normalization; compare the literal characters.

Copy-ready procedure (ASCII)

# inputs: included full lines for a UTC day
# build tuple for each line:
iso_utc      = field[1]
rasi_idx     = field[2]
theta_deg    = field[3]  # fixed digits as recorded
sha_file     = field[4]  # lowercase 64-hex
chain        = field[5]  # lowercase 64-hex
stamp_core   = "SSMCLOCK1|" + iso_utc + "|" + rasi_idx + "|" + theta_deg + "|" + sha_file

key = (iso_utc, stamp_core, chain)

# sort all lines by 'key' using ASCII/byte-wise lexicographic order (ascending)
ordered = sort(lines, key)

Tiny sanity example (illustrative)
Suppose two lines share the same iso_utc:

A_core = "SSMCLOCK1|2025-10-14T06:12:03Z|3|186.01875|...a1"
B_core = "SSMCLOCK1|2025-10-14T06:12:03Z|3|186.02125|...b2"

Since 186.01875 < 186.02125 in ASCII (and numerically), we get A before B even if chain differs.

Edge conditions (clarifications)

  • Equal stamp_core, different chain: tiebreak by chain.
  • Identical full lines: duplicates are allowed in input selection policies, but anchoring treats each line instance as an element of the joined sequence.
  • No spaces, no Unicode punctuation: ordering relies on the literal ASCII characters emitted by the spec.

Why this is robust

  • The Shunyaya Symbolic Mathematical Clock Stamp anchor depends only on public, reproducible strings.
  • Fixed-digit theta_deg and lowercase hex remove formatting ambiguity.

Navigation
Back: SSM-Clock Stamp – Canonical Day & Selection (3.1)
Next: SSM-Clock Stamp – Roll-up Hash (3.3)