SSM-AI – Appendix M — Interop & Wire Protocol (M4–M6)

Proto sketch, deterministic errors, and privacy-by-default transport.

M4) Optional Protobuf sketch (for gRPC)

message LaneItem {
  string iso_utc = 1;
  string svc = 2;
  string knobs_hash = 3;
  double m = 4;
  double phi_m = 5;
  double a = 6;
  double U = 7;
  double W = 8;
  double RSI = 9;
  double g_t = 10;
  double RSI_env = 11;
  string band = 12;
  string lens_id = 13;
  double c = 14;
  double Unit = 15;
  string w_rule = 16;
  string gate_mode = 17;
  string stamp = 18;
  repeated double a_in_items = 19;   // flattened pairs [a,w,...]
  repeated double a_out_items = 20;  // flattened pairs [a,w,...]
}

message LaneBatch {
  string v = 1;            // "SSM-LANE/1"
  string svc = 2;
  string iso_utc = 3;
  string knobs_hash = 4;
  double eps_a = 5;
  double eps_w = 6;
  string bands_json = 7;   // canonical JSON if you prefer dynamic bands
  string gate_json = 8;    // canonical JSON of gate config
  string tool_versions = 9;
  repeated LaneItem items = 10;
}

Notes. Keep classical magnitudes unchanged (phi((m,a)) = m). Maintain bounded alignment and chooser: |a| < 1, |RSI| < 1. Fuse order-invariant via U += w*atanh(a), W += w, a_out := tanh( U / max(W, eps_w) ).


M5) Error codes & fallbacks

  • LANE_EPS_BREACH — input |a| >= 1 before clamp ⇒ producer clamps: a_c := clamp(a, -1+eps_a, +1-eps_a).
  • LANE_DIV_STRICT — division near zero under "strict" ⇒ consumer falls back to classical path; stamp cause.
  • LANE_MISSING_TELEMETRY — absent g_t ⇒ treat as g_t := 1 and flag.
  • LANE_MISMATCH_PHIphi_m != m ⇒ reject item; stamp and alert (parity failure).
  • LANE_VERSION_UNSUPPORTED — unrecognized v ⇒ parse best-effort, drop unknowns, or reject per policy.

Fallback guarantee. All fallbacks keep m intact (phi((m,a)) = m).


M6) Security & privacy (defaults)

  • No PII in any lane field; lens_id, svc, and stamp are structured tokens, not free text.
  • Integrity. Include knobs_hash (manifest digest) and stamp chain to make tamper-evident roll-ups trivial.
  • Retention. Raw JSON/CSV ≤ 30 days; roll-ups store only (sumU, sumW) and counts.
  • Boundedness. Enforce clamps with eps_a = 1e-6; chooser respects eps_w = 1e-12.
  • Gate purity. Apply alignment-only gating: RSI_env := g_t * RSI or tanh( g_t * atanh(RSI) ) per manifest.
  • Replayability. Deterministic recovery of a_pool := tanh( sum(U) / max(sum(W), eps_w) ) regardless of order/shard.

Navigation
Previous: SSM-AI – Appendix M — Interop & Wire Protocol (M1–M3)
Next: SSM-AI – Appendix M — Interop & Wire Protocol (M7–M10)


Directory of Pages
SSM-AI — Table of Contents