i2goSignals

goSignals

Operations Guide

This guide explains how SET delivery streams behave at runtime, how the system responds to failures, and how operators recover from each failure class. It is the canonical vocabulary reference for stream lifecycle and error handling.

If you are configuring a deployment for the first time, read docs/configuration_properties.md for the full env-var reference and docs/Cluster.md for clustering. This document focuses on operational behavior once the system is running.

Contents

  1. Delivery semantics invariant
  2. Stream lifecycle and states
  3. Push delivery: failure classes and responses
  4. Ingest status codes (push receiver and SSTP acceptor)
  5. Receiver-status interrogation
  6. Idle keepalive (verify events)
  7. Operational events
  8. Recovery playbook
  9. Event retention
  10. Signing key selection
  11. Configuration knobs

Delivery semantics invariant

An acknowledged event is a delivered event. Auto-recovery never invents acks. The system treats RFC8417 / RFC8935 / RFC8936 acknowledgement as a contract: a JTI is only marked delivered when the receiver confirmed receipt (HTTP 202 for push; explicit poll-acknowledgement for poll).

This is the load-bearing rule for everything that follows:

If a stream goes from enabled to disabled after exhausting retries, every JTI that was unacked at the time of disable remains pending. Re-enabling the stream replays them in order. Auto-recovery does not drop, dead-letter, or silently ack any event.

Stream lifecycle and states

Every stream — push or poll, transmitter or receiver — exposes a status field with one of three values. The semantics are intentionally narrow so that dashboards and alerts can be written against unambiguous meanings.

State Meaning Self-healing? Operator action required?
enabled actively delivering n/a no
paused the remote endpoint has self-paused; this side is waiting yes no
disabled this side has given up; will not deliver until re-enabled no yes

enabled

Normal steady state. Push transmitters drain the buffer and POST events as they arrive. Poll receivers poll on schedule. Any single failure may transition the stream to paused (if the remote reports it) or initiate retry/recovery (see failure classes). If the stream eventually exhausts its retry budget, it transitions to disabled.

paused

The local stream is in paused only because the remote endpoint reported itself as paused via its /status endpoint. The local side stops attempting delivery, persists the reason in ErrorMsg, and periodically re-checks the remote status (every I2SIG_PUSH_PROBE_INTERVAL for push; the equivalent I2SIG_POLL_PROBE_INTERVAL for poll). When the remote re-enables, the local stream auto-resumes. No operator action is required.

If the remote pause persists indefinitely, the local stream stays in paused indefinitely. This is intentional — the remote owns its state, and the local side is correctly reflecting it. Operators may inspect why the remote paused itself but cannot move this side out of paused other than by waiting for the remote.

disabled

Terminal state for this side. Reached via one of:

disabled is the system’s signal that operator attention is required. The stream’s ErrorMsg field contains the diagnostic. Re-enabling the stream starts delivery again on the node that handled the request, without a restart, and replays all unacked JTIs that accumulated while it was failing. Re-enabling a signing transmitter that still has no active signing key is refused with 400 and leaves the status unchanged.

Push delivery: failure classes and responses

When a push attempt completes, the response is classified into one of the buckets below. The classification drives the response.

Push response What it means System response Cap
HTTP 202 Accepted success ack JTI; reset backoff and idle timer —
Transport error (DNS, refused, TLS, timeout) network or cert problem exp backoff; retry until cap; then disabled I2SIG_PUSH_RETRY_LIMIT (6h default)
HTTP 5xx (500/502/503/504) server-side problem same as transport error 6h
HTTP 401 Unauthorized auth rejected bounded retries with fixed delay; then disabled I2SIG_PUSH_AUTH_RETRY_LIMIT × I2SIG_PUSH_AUTH_RETRY_DELAY (10 × 15s default)
No active signing key (nothing sent) the transmitter’s own key is missing, suspended or revoked ERROR log; paused; retry the key with fixed delay; resume when it is back, else disabled I2SIG_PUSH_AUTH_RETRY_LIMIT × I2SIG_PUSH_AUTH_RETRY_DELAY (10 × 15s default)
HTTP 403 Forbidden auth forbidden disabled immediately —
HTTP 429 Too Many Requests rate-limited honor Retry-After; if absent, exp backoff; no cap (peer back-pressure) none
HTTP 4xx other (404/410/422/…) unexpected protocol disabled + verbose log —
RFC8935 §2.4 error receiver rejected the SET see RFC8935 protocol errors —
Remote /status = enabled healthy resume normal operation —
Remote /status = paused remote self-paused local paused; re-check every I2SIG_PUSH_PROBE_INTERVAL —
Remote /status = disabled remote disabled local disabled —

Backoff curve

For transport errors and 5xx, the backoff is:

delay_n = min( BASE * FACTOR^n , MAX )

with defaults BASE=1s, FACTOR=2.0, MAX=5m. The cap is total elapsed time (RETRY_LIMIT, default 6h), not attempt count — this prevents a flapping receiver from accumulating an unbounded retry budget.

When the cap is reached, the stream transitions to disabled with ErrorMsg recording the elapsed time and the last failure class.

RFC8935 protocol errors

RFC8935 §2.4 defines a small set of error codes the receiver returns in a 400 Bad Request body when it rejects a SET:

All RFC8935 §2.4 errors are deterministic per-SET. The same signed token will produce the same error every time it is re-pushed. There is no value in retrying the same SET. The system therefore transitions the stream to disabled on first occurrence and persists the offending JTI, error code, and description in ErrorMsg. Operators see the failure immediately rather than after a long retry budget elapses.

Single exception — jws_signature_failed: this can also indicate that the receiver’s JWKS does not yet have our current signing key — a key rotation race. The system handles this by:

  1. Invalidating the local issuer-key cache for the affected stream.
  2. Reloading the signing key.
  3. Re-signing the SET.
  4. Retrying once.

If the retry succeeds (202 Accepted), the JTI is acked normally. If the retry returns any 400 (including another jws_signature_failed), the stream transitions to disabled — the problem is not a transient cache miss.

There is no dead-letter path for RFC8935 errors. Operationally, every RFC8935 §2.4 code reflects a configuration problem (wrong audience, wrong issuer, missing key, etc.) and the operator must intervene. See the recovery playbook for how to triage.

Ingest status codes (push receiver and SSTP acceptor)

The table above is the transmitter’s view. When this server is the receiver — an RFC 8935 push receiver endpoint, or the SSTP acceptor at POST /sstp/{id} — it answers as follows. A SET that is not durably stored is never acknowledged (ADR 0038), and a store failure is reported as retryable so the sender keeps the SET instead of dropping it.

Situation Push receiver (RFC 8935) SSTP acceptor Sender should
SET stored 202 Accepted 200, JTI in ack treat as delivered
Duplicate JTI (already stored, ADR 0017) 202 Accepted 200, JTI in ack treat as delivered
SET fails parsing, signature, audience or event validation 400 with an RFC 8935 §2.4 err (e.g. invalid_request) 200, per-JTI entry in setErrs; the rest of the message is unaffected not retry that SET
Event store cannot durably store the SET 503 Service Unavailable + Retry-After, body {"err":"temporarily_unavailable",...} 503 Service Unavailable + Retry-After for the whole exchange; nothing in it is acked and no outbound SETs are returned resend after Retry-After

Retry-After is I2SIG_INGEST_RETRY_AFTER seconds (default 2). temporarily_unavailable is not an RFC 8935 §2.4 registry code; the 503 status and Retry-After header are the signal, and the code is informational. A goSignals push transmitter classifies this response as rate-limited back-pressure: it honours Retry-After and retries with no cap (see the table above).

When the SSTP acceptor refuses an exchange, SETs in it that were stored before the failure are stored already. The sender resends them with the rest, they come back as duplicates, and they are acked then.

Receiver-status interrogation

The push transmitter actively interrogates the receiver’s /status endpoint in three situations:

T1 — Reactive on push failure

When a push fails (transport or 5xx), the transmitter fetches the receiver’s /status to disambiguate the failure:

This mirrors the poll receiver’s handleTransmitterStatus behavior.

T2 — Pre-flight at lease acquisition

When a node acquires a push stream’s cluster lease (see docs/Cluster.md), it fetches the receiver’s /status before sending the first event. If the receiver is already paused or disabled, no events are wasted — the local side enters the matching state immediately.

This means after a node failover, a paused receiver does not get hammered with retry attempts on the new owner.

T3 — Idle keepalive

See Idle keepalive (verify events) below.

Status endpoint discovery

The push transmitter discovers the receiver’s /status URL via the SSF well-known configuration (/.well-known/ssf-configuration) on the receiver’s host. If well-known discovery fails, the transmitter falls back to a derived URL based on the configured push endpoint (replacing the path segment).

The status fetch reuses the same authorization the push uses.

Idle keepalive (verify events)

If a push stream goes idle — no successful push for I2SIG_PUSH_KEEPALIVE_INTERVAL (default 5 min) — the transmitter generates a real SSF verify event as an end-to-end heartbeat:

  1. The verify event is created via the standard https://schemas.openid.net/secevent/ssf/event-type/verification event type.
  2. It is persisted as an operational event (with Operational=true).
  3. It is submitted directly to the target stream’s push buffer (it does not fan out via the matcher).
  4. It flows through the normal push path. The receiver responds with 202 on success.
  5. The idle timer resets on every successful push, including the verify event itself.

If the verify event push fails, the failure is classified and dispatched exactly like a business event would be (T1 takes over). This is what makes the verify event a meaningful heartbeat: it tests the full delivery path (auth, signing, network, receiver), not just receiver liveness.

The idle timer is suppressed during recovery (no verify events are emitted while the stream is in paused or actively backing off — the recovery sub-loop is already probing the receiver via /status).

Idle state is local to the node holding the push lease. Failover resets the idle clock to “now.”

Operational events

The system distinguishes business events from operational events:

Operational events follow three rules:

  1. Persisted for audit. They are stored in the event store like any other event. The Operational=true flag distinguishes them.
  2. Scoped to a single SSF endpoint relationship. Each operational event is generated for one specific stream and submitted directly to that stream’s buffer. It is never matched against other streams, even if iss/aud would otherwise overlap. This is a strict point-to-point communication, consistent with the RFC8935 / SSF model where verify is semantically a per-relationship probe.
  3. Excluded from replay. When an operator sets ResetDate or ResetJti, the replay query returns only business events. Stale operational events from prior days are not replayed — they are operationally meaningless after the fact and would pollute a recovery operation.

If the system later introduces additional auto-generated event types, they should be marked Operational=true and they will inherit all three behaviors automatically.

Recovery playbook

This section walks through the three most common recovery scenarios.

Scenario A: stream stuck in disabled after RFC8935 protocol error

Symptom. A push stream is disabled. ErrorMsg contains an RFC8935 error code such as invalid_audience or authentication_failed along with the JTI of the offending event.

What happened. The receiver explicitly rejected a SET as malformed, unauthorized, or otherwise unacceptable. The system did not retry because the same SET would produce the same error on every attempt.

How to triage:

  1. Read the JTI from ErrorMsg and inspect that event in the event store.
  2. Identify the cause from the error code:
    • authentication_failed → wrong Authorization header on push config. Update the stream’s push delivery method and re-enable.
    • invalid_audience → stream’s aud does not match what the receiver expects. Update stream config and re-enable.
    • invalid_issuer → stream’s iss does not match what the receiver expects. Update stream config and re-enable.
    • invalid_key / jws_signature_failed (after the single auto-retry exhausted) → receiver’s JWKS does not have our kid. Either ask the receiver to refresh its JWKS, or rotate to a key the receiver does know.
    • invalid_request → likely a malformed SET payload. Inspect the event content; this is rare and usually points to a transmitter bug.
  3. Decide what to do with the offending event:
    • Most cases: fix the configuration and re-enable. The unacked JTI replays automatically and now succeeds.
    • The event itself is bad (rare): delete it from the event store before re-enabling, OR set ResetJti on the stream to skip past it.

Scenario B: stream stuck in disabled after exhausting retry cap

Symptom. A push stream is disabled. ErrorMsg indicates the retry cap was exceeded (e.g., “transport recovery exceeded 6h” or “401 attempts exhausted”).

What happened. The receiver was unreachable or rejecting authorization for an extended period. The system retried with exp backoff up to the cap, then disabled the stream so the database stops accumulating un-deliverable events.

How to triage:

  1. Determine why the receiver was unreachable: DNS gone? Cert expired? Network partition? Credentials revoked? Receiver actually offline?
  2. Fix the underlying cause (rotate credentials, fix DNS, restore network, etc.).
  3. Re-enable the stream. All unacked JTIs that accumulated during the outage replay in order.

Scenario C: receiver pauses then re-enables

Symptom. The local stream’s status flips to paused then back to enabled. No operator action was needed.

What happened. The remote receiver’s operator paused the stream from their end. The local side detected this via /status interrogation, stopped attempting delivery, and periodically re-checked. When the remote re-enabled, the local side resumed automatically.

Operator action. None required. This is the system working as designed — the paused state is transient and self-healing.

Using ResetDate / ResetJti

ResetDate and ResetJti are fields on StreamConfiguration. They are operator-controlled retransmission levers and are the only mechanism in the system for replaying historical events.

Field Effect
ResetDate re-mark all (business) events at-or-after this timestamp as pending
ResetJti re-mark events from the named JTI forward as pending

Both are one-shot — the server clears them after applying. Use them when:

Operational events (verify, stream-updated) are excluded from replay. Setting ResetDate=7-days-ago returns only business events from that window — your recovery is not polluted with stale heartbeats.

The system never invokes ResetDate/ResetJti on its own. Auto-recovery relies exclusively on the unacked-JTI mechanism (failed JTIs stay pending and replay automatically when the stream re-enables).

Event retention

A community deployment keeps every data event forever. Nothing in the shipped configuration ever expires a data SET. That is intentional (ADR 0055), not a defect — but it is silent, so an operator who never opts in does not find out until the collections are already large. Ping events are the one exception: they are purged 24 hours after they are stored (see below, ADR 0048).

Ping events are purged after 24 hours

A ping event is an SSF Verification Event, whoever sent it: an idle keepalive or an operator-triggered verify this server transmits, or one it received from a peer. Pings are diagnostic, so they are not kept forever.

Why nothing expires

Retention is resolved per stream, in days, from the retention_window_days field on the stream state record. A nil or non-positive window means keep-forever, and RetentionEngine.PurgeExpired skips such a stream entirely.

Two independent things hold community at keep-forever:

  1. The default resolver is dormant. services.DefaultEffectiveWindow honours only the per-stream retention_window_days override, which is unset unless somebody set it. There is no server-wide default window and no env var that supplies one — the finite window is expected to come from the per-stream override, or from an enterprise resolver that folds in an enrollment-bundle default and cap.
  2. No purge engine is bound. services.NewRetentionEngine has no caller in community. dbProviders.Persistence.EventDAO exposes the live event store precisely so an embedder can bind one, but the community server does not. So even a stream that does carry a window has nothing running to act on it.

Because the second condition holds regardless of the first, setting a window on a community server today changes nothing about what is stored.

What it costs

Both events (the global SET bodies) and deliveredEvents (the per-stream acked index) grow monotonically. One benchmark sweep of the dev cluster — 5000 events, 16 concurrent clients — left roughly 274,000 documents in events and 263,000 in deliveredEvents. A long-running server ingesting continuously has no ceiling other than the volume it sits on.

There is no operator knob for it today

retention_window_days is a goSignals operator field on the stream state record. It is deliberately not an RFC 8935 StreamConfiguration field, and unlike its sibling operator knobs — default_subjects, subject_filter_mode, event_source, subject_removal_grace_seconds, event_validation — it is not applied by StreamService.CreateStream or StreamService.UpdateStream, and the goSignals CLI exposes no flag for it. So there is no supported operator path in the community server: no API call, no CLI flag, no environment variable sets it.

The field is persisted and round-trippable, so an embedder — code that links this server as a library rather than running the binary — can set it directly on the stream state record and update the stream through the DAO:

// ssfModels.StreamStateRecord.RetentionWindowDays is *int:
//   nil  => keep forever (the community default)
//   0    => keep forever, stated explicitly
//   n>0  => retain for n days
days := 30
rec.RetentionWindowDays = &days
err := streamDAO.Update(ctx, rec)

Setting it changes what RetentionEngine.PurgeExpired would purge. It does not by itself cause anything to expire, because no purge engine is bound in this build — see the section above. Treat the field as forward-compatible configuration, not as an enforcement switch.

Binding the retention engine to the running store, and with it a real operator knob, is the subject of planning issue independentid/i2gosignals-planning#75 (event-family retention, ADR 0055 Amendments 7-8). It is not part of this build.

What an operator should do instead

Signing key selection

An issuer signs SETs, and the token issuer signs auth tokens, with its newest active key of the algorithm in use. Newest means the latest creation time: the server stamps one on every key record it creates, rotates or loads, and a suspend, reactivate or revoke never changes it. A record with a creation time is newer than any record without one, and records without one, or created in the same millisecond, are ordered by record id. See ADR 0028.

Upgrading a store from v0.11.0 through v0.12.0-alpha.19

Key records minted by those versions carry random record ids and no creation time. Upgrading needs no migration, and nothing re-stamps existing records.

Configuration knobs

The push state machine is tuned via the following environment variables. See docs/configuration_properties.md for the canonical reference and any poll-side analogues.

Env var Default Purpose
I2SIG_PUSH_RETRY_BASE_DELAY 1s Base delay for exp backoff on transport/5xx
I2SIG_PUSH_RETRY_BACKOFF_FACTOR 2.0 Multiplier per retry attempt
I2SIG_PUSH_RETRY_MAX_DELAY 5m Cap on individual sleep
I2SIG_PUSH_RETRY_LIMIT 6h Total elapsed time before transport recovery exits to disabled
I2SIG_PUSH_AUTH_RETRY_LIMIT 10 Max 401 retry attempts, and max signing-key retries, before disabled
I2SIG_PUSH_AUTH_RETRY_DELAY 15s Sleep between 401 retries, and between signing-key retries
I2SIG_PUSH_PROBE_INTERVAL 30s Cadence of /status re-checks while in paused
I2SIG_PUSH_KEEPALIVE_INTERVAL 5m Idle threshold before generating a verify-event keepalive

The existing I2SIG_PUSH_BACKFILL_INTERVAL and I2SIG_PUSH_BACKFILL_BATCH continue to govern active-mode buffer refilling — they are independent of the recovery state machine and remain at their previous defaults.

Cluster lease ownership (#364) is tuned by one variable:

Env var Default Purpose
I2SIG_LEASE_SAFETY_MARGIN 5s How long before a lease’s recorded expiry a node stops acknowledging as its owner (Go duration). It covers clock drift and the time an acknowledgement batch takes to reach the store. A value over half the lease duration is capped at half (15s for the 30s production leases) and logged once at WARN; a negative value is treated as 0 and logged at WARN; an unparsable value falls back to the default

(C)2026 Independent Identity Inc.