feat(q1-27): orchestration telemetry — runs table + ingest + admin read endpoint#94
Merged
Merged
Conversation
…ad endpoint
Captures Q1 2027 orchestration runs end-to-end so the founder dashboard
can show real activity once /ashlr-orchestrate users start arriving.
Server-side:
- Migration: orchestration_runs table with identity_hash, github_hash,
graph_id, goal, tier, mode, started_at, finished_at, duration_ms,
node_count, fail_count, ok, total_tokens_{in,out}, received_at.
Indexes on (received_at DESC) and (identity_hash, started_at DESC).
- POST /v1/orchestration-runs — unauthenticated ingest matching the
/v1/events + /v1/session-events precedent. zod-validated. 202 on
success, 400 on bad payload, never logs raw identity_hash.
- GET /admin/orchestration-runs?days=N&limit=M — bearer-auth via
ASHLR_ADMIN_TRIGGER_TOKEN (constant-time compare). Returns recent
runs + summary aggregation (total, ok_count, success_rate, token
totals, mode breakdown, tier breakdown). 503 when env unset.
- Both routes mounted before the user-token-gated /admin/* middleware.
Plugin-side:
- scripts/orchestrate-emit-telemetry.ts: emitOrchestrationRunTelemetry()
builds the payload from a RunResult + TaskGraph, gates on
isTelemetryEnabled(), fire-and-forget POST with 5s timeout, swallows
network errors so the runner never blocks on telemetry.
- scripts/orchestrate-run.ts: calls the emit at the end of runTaskGraph,
best-effort. mode='stub' for the MVP runner; the wk 4-6 real-LLM
wiring will pass mode='real-llm' once it lands.
Tests: 6 plugin (emit) + 24 server (ingest + admin read) = 30 new
tests. All green.
Dashboard panel deferred: a small <OrchestrationActivitySection> in
site/app/admin/wad-d/page.tsx is the natural follow-up; the read
endpoint is shipped + ready to consume.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Captures orchestration runs end-to-end. New table + ingest + admin read endpoint + plugin emit hook. Dashboard panel deferred to a follow-up — the read endpoint is shipped + ready to consume.
What ships
orchestration_runstable (11 columns, 2 indexes)/v1/orchestration-runs— unauth ingest, matches /v1/events pattern/admin/orchestration-runs— bearer-auth read with summary aggregationscripts/orchestrate-run.ts, gated on telemetry consent, fire-and-forgetTests
Follow-up
<OrchestrationActivitySection>panel in site/app/admin/wad-d/page.tsx🤖 Generated with Claude Code