can1357/oh-my-pi · info · HTTPException
replay disabled
Error message
replay disabled
What it means
The /replay endpoint re-dispatches a stored webhook delivery, but only when ROBOMP_REPLAY_TOKEN is configured. If cfg.replay_token is None the endpoint raises 404 'replay disabled' — replay is opt-in and off by default.
Source
Thrown at python/robomp/src/server.py:508
pool: WorkerPool = bag["pool"]
pool.wake()
log.info(
"queued", extra={"event": x_github_event, "delivery": x_github_delivery, "key": decision.issue_key}
)
else:
log.info("duplicate", extra={"event": x_github_event, "delivery": x_github_delivery})
return JSONResponse({"delivery": x_github_delivery, "state": "queued"}, status_code=202)
@app.post("/replay")
async def replay(
request: Request,
x_robomp_token: str | None = Header(None, alias="X-Robomp-Replay-Token"),
delivery_id: str = "",
) -> JSONResponse:
bag = request.app.state.bag
cfg: Settings = bag["settings"]
if cfg.replay_token is None:
raise HTTPException(404, "replay disabled")
if x_robomp_token != cfg.replay_token.get_secret_value():
raise HTTPException(401, "invalid replay token")
db: Database = bag["db"]
row = db.get_event(delivery_id)
if row is None:
raise HTTPException(404, "unknown delivery")
if not db.requeue_event(delivery_id, from_states=INACTIVE_EVENT_STATES):
raise HTTPException(409, f"delivery {delivery_id} is {row.state}; only inactive events can be replayed")
bag["pool"].wake()
return JSONResponse({"delivery": delivery_id, "state": "queued"})
def _require_trigger_token(cfg: Settings, token: str | None) -> None:
if cfg.replay_token is None:
raise HTTPException(404, "trigger disabled (set ROBOMP_REPLAY_TOKEN to enable)")
if token != cfg.replay_token.get_secret_value():
raise HTTPException(401, "invalid replay token")
@app.get("/api/github/issues")View on GitHub (pinned to 9690622007)
Solutions
- Set ROBOMP_REPLAY_TOKEN in the orchestrator environment and restart to enable replay.
- Call the endpoint with header X-Robomp-Replay-Token matching the configured token.
- If replay should stay disabled, use an alternative recovery path (e.g. redeliver the webhook from GitHub's delivery pane).
- Check the CLI output/HTTP status distinguishes 404 'replay disabled' from 401 'invalid replay token' to confirm which problem you have.
Example fix
// before (.env) # replay not configured // after (.env) ROBOMP_REPLAY_TOKEN=<long-random-secret>
Defensive patterns
Strategy: validation
Validate before calling
import os
if not os.environ.get('ROBOMP_REPLAY_TOKEN'):
raise SystemExit('Replay is disabled: set ROBOMP_REPLAY_TOKEN first') Try / catch
try:
resp = httpx.post(f'{base}/replay/{delivery}', headers={'X-Robomp-Replay-Token': token})
except httpx.HTTPStatusError as e:
if e.response.status_code == 404:
... # replay disabled (404) vs invalid token (401) vs unknown delivery (404) Prevention
- Set ROBOMP_REPLAY_TOKEN in environments where replay recovery is expected
- Differentiate 404 'replay disabled'/'unknown delivery' from 401 'invalid replay token' when debugging
- As a fallback, redeliver from GitHub's webhook 'Recent Deliveries' pane
When it happens
Trigger: POST /replay (or `robomp replay <delivery_id>` against a server) when the Settings has no replay token configured.
Common situations: Operator running `robomp replay` in a deployment where the env var was never set; fresh install from .env.example without the optional replay token; intentionally hardened production without replay.
Related errors
- Devin AssignModel error ${response.status} ${response.status
- GitLab Duo Workflow create failed with HTTP ${response.statu
- ${response.status} ${response.statusText}: ${text}
- the discovery endpoint returned incomplete upload-node metad
- Destination option ${optionName} must use http or https
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/d0ec9f51d06ff0e7.
Report an issue: GitHub.