Skip to content

feat: instant "@bot status" reply from the control plane - #20

Draft
oponder wants to merge 1 commit into
mainfrom
upstream-status-command
Draft

feat: instant "@bot status" reply from the control plane#20
oponder wants to merge 1 commit into
mainfrom
upstream-status-command

Conversation

@oponder

@oponder oponder commented Aug 18, 2026

Copy link
Copy Markdown

Fork-side twin of paradigmxyz#1415 — same branch, so a live pass here validates the upstream PR 1:1. Replaces #18 (pre-sync base).

No migration: an index on session_executions(created_at) would speed up the report's scans, but a fork-local migration version risks colliding with a future upstream one and breaking api-rs startup. The scans are cached 10s, so it's fine without. create index concurrently by hand if it ever gets slow.

Deploy for testing: deploy-centaur -f ref=upstream-status-command -f services="api-rs discordbot" (needs DISCORDBOT_STATUS_CHANNEL_IDS — gerard#106).

A bare "@bot status" (or "health") mention in an allowlisted Discord
channel gets an instant reply assembled from api-rs — no sandbox turn —
so it keeps working when the agent pipeline itself is broken.

api-rs grows a read-only GET /api/status (protected router): recent and
in-flight executions with requester + one-line error, a 24h tally,
active session sandboxes, warm-pool state (claimed/failed windowed to
24h — they are lifetime history), and a 7-UTC-day run histogram. The
report is cached in-process for 10s and a new migration indexes
session_executions(created_at) for the global recency scans.

discordbot renders it as monospace tables + a histogram block, gated by
DISCORDBOT_STATUS_CHANNEL_IDS (unset = feature off — the report exposes
cross-platform titles/requesters/errors, so exposure is explicit
opt-in). Interpolated titles/errors are fence-neutralized; failures get
a generic reply with details kept in service logs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@oponder
oponder force-pushed the upstream-status-command branch from a480fed to 0ab4ae2 Compare August 20, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant