SSM-AI – Appendix M — Interop & Wire Protocol (M7–M10)

Stable evolution, exact replay, producer checklist, and ship gates.

M7) Compatibility & evolution (versioning policy)

  • Forward. Consumers ignore unknown fields (additive evolution).
  • Backward. Producers must include v and m; adding phi_m is recommended for quick parity checks.
  • Knob stability. Any change to bands, gate mode, eps_a, eps_w, or weight policy produces a new knobs_hash.
  • Additive-only fields. New keys must not change semantics of existing keys; strict backward compatibility for m and phi((m,a)) = m.
  • Replay header. Include knobs_hash and tool_versions in batch headers to ensure reproducible replays.

M8) Consumer replay (reference pseudocode)

def replay(items, eps_w=1e-12):
    # items: list of dicts with at least U, W, and m/phi_m
    from math import tanh
    U = sum(x.get("U", 0.0) for x in items)
    W = sum(x.get("W", 0.0) for x in items)
    a_pool = tanh(U / max(W, eps_w)) if W > 0 else 0.0

    # parity spot-check (classical values untouched)
    for x in items:
        m = x.get("m", 0.0)
        phi_m = x.get("phi_m", m)
        assert abs(m - phi_m) < 1e-12  # phi((m,a)) = m

    return a_pool

Order/shard invariance. Reducers must recover a_pool := tanh( sum(U) / max(sum(W), eps_w) ) independent of order or sharding.


M9) Quick producer checklist

  • Clamp first. a_c := clamp(a, -1+eps_a, +1-eps_a); u := atanh(a_c).
  • Fuse. U += w*u, W += w, a := tanh( U / max(W, eps_w) ).
  • Parity. Keep m unchanged (phi((m,a)) = m); emit phi_m := m for quick checks.
  • Chooser + gate. RSI_env := g_t * RSI or tanh( g_t * atanh(RSI) ) per manifest.
  • Header keys. Fill v, iso_utc, knobs_hash, stamp, band; include tool_versions when possible.

M10) Acceptance checklist (must pass)

  • Parity. phi((m,a)) = m for every item; phi_m == m.
  • Replay. Reducers recover a_pool := tanh( sum(U) / max(sum(W), eps_w) ) independent of order/sharding.
  • Boundedness. All a, RSI, RSI_env in (-1,+1); clamp with eps_a.
  • Versioning. Required keys present; v recognized; older readers ignore unknowns.
  • Determinism. Same knobs_hash and inputs ⇒ identical outputs, bands, and stamps.
  • Security. No PII; knobs_hash and stamps included for integrity.

Stamp example (append to any row)

SSMCLOCK1|iso_utc|svc=wire|U=0.586900|W=1.000000|a=0.417200|RSI=0.528100|g=0.81|RSI_env=0.427800|band=A0|manifest=knobs_hash

One-line takeaway. A tiny, versioned lane envelope (JSON/CSV/Proto) passes m unchanged and a/RSI transparently — deterministic replay via (U,W), bounded by design, portable across vendors.


Navigation
Previous: SSM-AI – Appendix M — Interop & Wire Protocol (M4–M6)
Next: SSM-AI – Appendix N — Economics & Rollout Worksheets (N1–N3)


Directory of Pages
SSM-AI — Table of Contents