Long-Run Continuity Canary — Stage A

Isolated, non-production Val Town canary for directly testing whether one cloud execution retains a one-use rotating capability continuously for at least 100 wall-clock minutes.

Frozen scored-run policy

  • Target duration: 100 minutes.
  • Maximum accepted heartbeat gap: 8 minutes (hard requirement ≤10 minutes).
  • Absolute lifetime: 120 minutes.
  • Tokens: 32-byte CSPRNG opaque values.
  • Durable state stores SHA-256 digests only. Raw continuity tokens must never be written to Brain blobs/files, scheduled prompts, checkpoints, or successor handoffs.
  • Every accepted heartbeat atomically consumes the presented token and returns exactly one fresh token.
  • Wrong, replayed, late, expired, terminal, ambiguous, or CAS-losing uses fail closed. There is no blind retry that can recreate continuity.

The protocol adapts OAuth refresh-token rotation / replay-detection semantics (RFC 9700 §4.14.2) to continuity measurement. Passing Stage A does not establish physical identity, independence, P_real, Work product identity, or superhero capacity.

HTTP surface

GET /health returns the frozen policy and non-production classification.

POST /start with { "agent_id": "..." } creates one canary and returns the raw start token once.

POST /heartbeat with { "canary_id": "...", "agent_id": "...", "token": "..." } atomically consumes that token and returns the rotated token once.

POST /finish with the same binding terminalizes the run. PASS is possible only after the 100-minute target; early finish is FAIL.

GET /receipt?canary_id=...&agent_id=... returns hash/timestamp/sequence evidence only.

Qualification

Run stage_a_adversarial_test.ts. It covers concurrent same-token race, stale-token replay, wrong canary/agent, late heartbeat, absolute expiry, module/runtime reload persistence, hash-only durable evidence, terminal replay, malformed input, deterministic receipt reconstruction, and policy freeze.

This Val is intentionally isolated from the canonical Brain kernel/admission/protocol. It performs zero paid spend and no Sprites calls.