Skip to content

Merge dev to main#1263

Merged
zbigniewsobiecki merged 2 commits intomainfrom
dev
May 6, 2026
Merged

Merge dev to main#1263
zbigniewsobiecki merged 2 commits intomainfrom
dev

Conversation

@zbigniewsobiecki
Copy link
Copy Markdown
Member

Promote dev to main after PR #1262 landed on dev.\n\nIncludes:\n- #1261 alerting agent system prompt\n- #1262 worker boot-failure visibility\n\nValidation before promotion:\n- PR #1262 CI passed on head e4cae33\n- Local pre-push test: 175 files, 3556 passed, 23 skipped

zbigniewsobiecki and others added 2 commits May 6, 2026 16:20
* docs(spec): 018 alerting agent + worker boot-failure visibility + plans

Spec captures two related gaps surfaced by the first sentry-bound agent run
(2026-05-06): alerting agent's missing prompt template and the silent worker
boot-failure path that masked it.

Two plans downstream: alerting-prompt (feature) and boot-failure-visibility
(hardening, follow-on to spec 017). Linear DAG, plan 1 → plan 2.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(plan): 018/1 lock

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(agents): alerting agent system prompt template (spec 018, plan 1)

Author the system prompt template that the alerting agent's worker tries to
load at boot. Every other piece of the alerting agent — YAML definition,
capabilities, trigger handlers, context pipeline, Sentry integration — was
already wired. Missing the .eta produced an ENOENT at agent boot when the
first prod-traffic Sentry alert arrived (cascade project, 2026-05-06). After
this plan, an alerting agent dispatched via existing trigger handlers reaches
its execution phase end-to-end.

The prompt structures the agent's behavior as a three-phase investigator
(parse pre-loaded event → confirm root cause via source reads → file or
comment) with an explicit INVESTIGATE-AND-FILE-ONLY guardrail. Predictable
output structure: 'Investigate: <ErrorType> in <Function> (<file>:<line>)'
title and a 4-6 sentence + bullets description.

The agent's read-only guarantee is enforced statically by the YAML's
capability declaration (no fs:write, no scm:*) — the resolved gadget allowlist
excludes WriteFile, CreatePR, CreatePRReview. Plan task #2 was downgraded from
a heavy E2E integration test to a static capability-allowlist test (more
reliable than behavioral negative-assertions that depend on LLM cooperation);
divergence noted in the plan itself.

Tests: 10 new in tests/unit/agents/prompts.test.ts; 4 new in
tests/unit/agents/definitions/alerting.yaml.test.ts. All green; full unit
suite (8808 tests) green; lint + typecheck clean.

Spec ACs 1-6 satisfied (full). Marks plan 018/1 as .done.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore(plan): 018/2 lock

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix: surface worker boot failures

* fix: expose sentry alert work item ids

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

❌ Patch coverage is 91.42857% with 12 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/db/repositories/runsRepository.ts 0.00% 8 Missing ⚠️
src/agents/shared/bootFailureError.ts 90.90% 1 Missing and 1 partial ⚠️
src/agents/shared/executionPipeline.ts 94.28% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@zbigniewsobiecki zbigniewsobiecki merged commit 43f5f26 into main May 6, 2026
15 checks passed
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