Created
Jul 06, 07:45
Started
Jul 06, 13:39
Completed
Jul 06, 16:20
DevOps handoff
Type
Feature
Shape
backend
Worktree Slug
test-telemetry-from-ci
Repositories
mcritchie-studio
Release Slug
—
Branch
feat/test-telemetry-from-ci
Acceptance Criteria
Expected Test Plan
Checks Run
Agent Context
APPROACH CHANGED to Option A (local ingestion) per operator 2026-07-06 — NOT the in-CI POST originally filed. Goal unchanged: CI runs become gradeable kind=test_scope rows in /alex/pipeline alongside local certs (A3) and release runs (A1/A2). DESIGN: a session-side capture reads gh pr checks for a PR and self-reports one test_scope AgentAction per completed CI job, reusing the EXACT A3 emit path (bin/agent-activity action → kind=test_scope, event_slug, result_slug, duration_ms), attributed to the open span. NO CI secret, NO ci.yml change, NO server/API/model change, NO fork-PR issue. Read: gh pr checks <pr> --json name,bucket,startedAt,completedAt (bucket=pass/fail/pending/skipping/cancel). For each job whose bucket is pass or fail: event_slug=ci_<normalized job name> (ci_test, ci_lint, ci_scan_ruby, ci_scan_js), result_slug=pass|fail, duration_ms=(completedAt-startedAt) in ms; skip pending/skipping. Register a ci_scopes: section in config/devops_test_suites.yml (phase: ci, host: ci, stable keys) and broaden the heartbeat_helper scope-meta merge to include it so pipeline rows get phase/tier/host facets. IDEMPOTENCY (important): carry a stable idempotency_key like ci:<pr>:<headSha>:<job> on the emit so re-reading CI (dor-check/preflight run twice) does not create duplicate rows — check whether bin/agent-activity action / AgentAction.capture support idempotency_key (release events use it); if not, add a lightweight guard. HOME: pick the cleanest integration — a standalone bin helper (e.g. bin/ci-scope-capture <task-or-pr>) is fine; do NOT bolt side-effects onto dor-check (keep it a pure read-only gate). Mirror A3's guards EXACTLY (session gate, span self-check no-op, output discarded, errors swallowed — telemetry NEVER breaks anything). See bin/full-suite-check emit_test_scope + config full_suite_scopes for the pattern.
Stage Timeline
Who handled each stage, the time it took (measured), and the model / tokens / cost reported (best-effort) — plus who's on it right now. — means the agent didn't report that metric.
Conversation
QA review feedback, agent handoffs, and follow-up notes for this task.
Avi review approved; ready for Steffon's qa-release sweep. Two approvals (Avi primary + Carl backend light), no blockers: all 4 acceptance criteria met, idempotency airtight (partial unique index + find-first + RecordNotUnique rescue ordered before StandardError; idempotency_key is the only unique index on agent_actions so the rescue can't mis-fire), emit is best-effort/non-fatal/session-gated, and the no-ci.yml/no-CI-secret scope claim holds. DoR fingerprint-fresh at PR tree (7494c34 == d342414^{tree}); CI green (4). Non-blocking advisory for deploy: the idempotency unique index builds non-concurrently (no disable_ddl_transaction! + algorithm: :concurrently), a brief write lock on agent_actions during migration — acceptable since telemetry writes are best-effort, but worth watching at ship.
Sealed-bid sizing
Edit →Alex (PM)
—
Avi (PO)
SMALL
Dev
SMALL
Actual
XL
We emailed a one-tap sign-in link to . It expires shortly and can only be used once.
No email? Check spam, or close this and try again.