Skip to main content
The EduFest sentinel calls the Hall and Mira desk. Install tuturuuu-edufest-oncall with the Codex plugin for the operator runbooks and command reference. Pass the untouched request to the shared receiver helpers as request. They stream the body before authentication or JSON parsing, cap the actual UTF-8 body at 16 KiB, cancel oversized streams, and return HTTP 413. Keep body-parsing middleware after this boundary.

Hall action receiver

Use receiveHallAction from @tuturuuu/edufest-ops for POST /api/ops/actions under the Hall base path. The verifier binds the exact path, action kind, UUIDv8 idempotency key, SHA-256 of the exact request body, Unix timestamp in seconds, and random nonce to the X-Edufest-Sentinel-Assertion header. It uses Web Crypto HMAC verification and accepts up to 60 seconds of skew against the receiver’s clock. The shared secret is 32 bytes encoded as base64url.
  • Atomically claim each verified nonce once in durable storage scoped to the sender and credential. Keep it through the verifier’s supplied expiry. Reject requests when replay storage is unavailable.
  • Supply server-owned shard and feature allowlists. Validate the action and all parameter values before mutation. The sentinel uses shard restart for known shards and a 15-minute rate-limit lease with factor 0.5. Approve additional features explicitly on the receiver.
  • Use (sender, Idempotency-Key) as the durable action key. Bind it to the request body digest and reject a conflicting digest with 409. Keep completed and pending records through the event and its reconciliation period, at least three days.
  • Apply the effect and confirm the idempotency record atomically. For a downstream effect, use the same stable key at the downstream boundary and reconcile uncertain outcomes before retrying. Return 200 with { ok: true, id, kind } only after confirmed completion. A matching duplicate returns that stored response.
  • X-Edufest-Confirm-Only: 1 changes the signed operation from POST to CONFIRM. Look up the same durable key and digest and return its confirmed response or a non-200 result. This path must never claim or apply an action. It lets the sentinel settle an ambiguous write after health changes or becomes unavailable.
  • A revert uses a separate key derived from the original action ID with the suffix :revert. Require a matching confirmed original action and compare its kind and parameter scope. Release only that action’s lease. Restore baseline settings only when no newer operator change or independent lease owns them. The receiver must expire temporary overrides independently of the sentinel.
See packages/edufest-ops/src/body.ts, packages/edufest-ops/src/ops-auth.ts, and packages/edufest-ops/src/receiver.ts for the wire format and required storage callbacks. The rehearsal uses the same verifiers with a simulated atomic store.

Mira desk receiver

Use receiveWebhook with the dedicated Mira secret and receiver time. Verify the exact timestamp and body with HMAC and allow 120 seconds of clock skew. Bind Idempotency-Key to the signed channel and message ID. The desk must use a durable outbox or a provider idempotency key to avoid duplicate delivery, including after a crash. Complete a duplicate with the stored result and return 409 when the same key arrives with a different digest.

Cloudflare rollback credential

Grant Workers Scripts edit through the Individual Workers Editor role for the single Hall script in the specific Cloudflare account. The account and script in sentinel configuration must match that grant. The sentinel submits at most one deployment POST for a recorded rollback and reconciles an uncertain result by listing deployments and matching its action marker and target version. An unresolved rollback is escalated to the owner. See Cloudflare Workers roles and permissions.