feat: instant "@bot status" reply from the control plane - #20
Draft
oponder wants to merge 1 commit into
Draft
Conversation
oponder
force-pushed
the
upstream-status-command
branch
2 times, most recently
from
August 20, 2026 19:03
c8f5188 to
a480fed
Compare
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
force-pushed
the
upstream-status-command
branch
from
August 20, 2026 19:17
a480fed to
0ab4ae2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 concurrentlyby hand if it ever gets slow.Deploy for testing:
deploy-centaur -f ref=upstream-status-command -f services="api-rs discordbot"(needsDISCORDBOT_STATUS_CHANNEL_IDS— gerard#106).