repositories / smith

smith

There are many coding harnesses - but this one is fast

owned by bugabinga

Restore the security-alert sweep

0593af2aa04aeb150c05b118ee782826d50647bc

agent-smith-bugabinga-adc[bot] <306488075+agent-smith-bugabinga-adc[bot]@users.noreply.github.com> ·

SSH signature · not checked

Browse filesCompare with HEAD

adw-alerts had 92 runs and 92 startup failures since July 19, so the
external-alert loop had never once executed. The cause was its triggers:
dependabot_alert and code_scanning_alert are webhook events, not Actions
events, and an unrecognised trigger fails the workflow at startup on every
event that touches it. Both are dropped, along with the relay job and the
dead if: guards they existed to serve.

The supported daily whole-state poll becomes the sole automatic path, with
manual dispatch kept for diagnosis. Both alert queries now paginate — as the
sole security path, a repo with more than thirty open alerts would otherwise
drop every high-severity one past the first page while still claiming a
whole-state sweep. The roster, the reaction-workflow framing, and adw-plan's
relay comment are updated so the spec-of-record no longer names a trigger
that no longer exists.

Surface: .github/workflows/adw-alerts.yml, adw-plan.yml's relay comment, and
the roster + reaction table in AGENTIC-DEVELOPMENT.md.

Changed files (3)

+15 / −33 text lines

Diff layout

.github/workflows/adw-alerts.yml

Modified

+6 / −25 text lines

33# only covers alerts present while a PR is open; this closes the gap the roster
44# always claimed security-reviewer owned but nothing wired.
55#
6# The alert events are automation-only (the action rejects them like `push`), so
7# they relay to a workflow_dispatch — the event the action serves. A daily
8# schedule is the backstop so nothing lingers even if an event is missed.
6# GitHub exposes alert activity as webhook events, but not as Actions workflow
7# triggers. Poll daily so the sweep is both supported and deterministic; manual
8# dispatch remains available for diagnosis.
99#
1010# Needs the App to be granted "Dependabot alerts: read" and "Code scanning
1111# alerts: read" (owner, #14) — without them the gh queries error (that error is
1313name: adw-alerts
1515on:
16 dependabot_alert:
17 types: [created, reopened, reintroduced]
18 code_scanning_alert:
19 types: [created, reopened, appeared_in_branch]
2016 schedule:
21 - cron: "41 6 * * *" # daily backstop
17 - cron: "41 6 * * *"
2218 workflow_dispatch: {}
2420permissions:
3127 cancel-in-progress: true
3329jobs:
34 # alert events can't run the action, so hand off to the automation event.
35 relay:
36 if: github.event_name == 'dependabot_alert' || github.event_name == 'code_scanning_alert'
37 runs-on: ubuntu-latest
38 steps:
39 - id: token
40 uses: actions/create-github-app-token@v1
41 with:
42 app-id: ${{ secrets.APP_ID }}
43 private-key: ${{ secrets.APP_PRIVATE_KEY }}
44 - env:
45 GH_TOKEN: ${{ steps.token.outputs.token }}
46 run: gh workflow run adw-alerts.yml -R ${{ github.repository }}
4830 triage:
49 if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
5031 runs-on: ubuntu-latest
5132 steps:
5233 - uses: actions/checkout@v4
6344 prompt: |
6445 Use the security-reviewer subagent on ${{ github.repository }} to sweep
6546 open security alerts that no PR is covering. Read Dependabot alerts
66 (`gh api /repos/${{ github.repository }}/dependabot/alerts?state=open`)
47 (`gh api --paginate /repos/${{ github.repository }}/dependabot/alerts?state=open`)
6748 and code-scanning alerts
68 (`gh api /repos/${{ github.repository }}/code-scanning/alerts?state=open`).
49 (`gh api --paginate /repos/${{ github.repository }}/code-scanning/alerts?state=open`).
6950 For each unresolved high/critical with no existing tracking issue, open
7051 ONE escalation issue labeled `needs:security` (and `risk:high`) for the
7152 owner. Alerts originating only from `prototypes/` are disposable

.github/workflows/adw-plan.yml

Modified

+1 / −1 text lines

55# The action serves only `workflow_dispatch` and `schedule` (same as adw-alerts), so
66# the two events it rejects — `push` and `issues` — are relayed to a dispatch by
77# plain no-Claude watchers that `gh workflow run` with the App token (the same relay
8# adw-alerts / adw-release use). Subscription auth; no CLI, no metered API.
8# adw-release uses). Subscription auth; no CLI, no metered API.
99name: adw-plan
1111on:

docs/plans/AGENTIC-DEVELOPMENT.md

Modified

+8 / −7 text lines

@@ -108,7 +108,7 @@ The roster — mission · artifact
108108| `planner` | spec change on `main`; a `needs:breakdown` epic; weekly `schedule` | interpret spec diffs into work-orders, slice epics into single work-orders, and groom the backlog + board | **Issues** + `docs/plans/*` | fable | xhigh |
109109| `surveyor` | `schedule` | measure the spec-vs-code gap and open the next unbuilt slice as a work-order | **one Issue** per tick | fable | high |
110110| `reviewer` | `pull_request` | adversarial correctness review vs the spec — a *second* model | a **PR review** | opus | xhigh |
111| `security-reviewer` | PR on sensitive surface / `needs:security` / scanner alert | security review; escalate high severity | a **PR review** + `risk:*` | opus | high |
111| `security-reviewer` | PR on sensitive surface / `needs:security` / `adw-alerts` daily sweep or manual dispatch | security review; escalate high severity | a **PR review** + `risk:*` | opus | high |
112112| `builder` (Claude) | issue labeled `ready` | build one **UI/UX** slice per `WALKING-SKELETON`, hardened, tested | a **branch + PR** | opus | high |
113113| `builder` (Codex) | issue labeled `codex` | build one **backend** slice per `WALKING-SKELETON`, hardened, tested | a **branch + PR** | terra | high |
114114| `codex-review` | `pull_request` | cross-family second opinion (advisory; never a gate label) | a **PR comment** | sol | high |
@@ -352,8 +352,9 @@ Reaction workflows — the loops that make it self-sustaining
353353## Reaction workflows — the loops that make it self-sustaining
355Beyond the issue→PR spine, five workflows wake agents on GitHub's own feedback
356events, each carrying a loop-guard so agents never react to themselves:
355Beyond the issue→PR spine, five workflows keep agents moving: three react to
356GitHub feedback events, while the other two use owner input or a deterministic
357schedule. Each carries a guard against an endless self-loop:
358359| Workflow | Wakes on | Does | Loop-guard |
359360|---|---|---|---|
@@ -361,14 +362,14 @@ Reaction workflows — the loops that make it self-sustaining
361362| `adw-docs` | merged PR touching **product code** (not docs/site/prototypes/config) | `docs-writer` updates docs + site to match, or no-ops | doc-only PRs are `paths-ignore`d, so `docs-writer`'s own PR can't re-trigger it |
362363| `adw-release` | `v*` tag (the owner's release touchpoint) | `release-manager` drafts notes, verifies §14, publishes a Release | tag push is owner-made; relayed via dispatch (the action can't serve `push`) |
363364| `adw-comment` | **owner** writes `@smith …` on an issue/PR | routes the instruction to the fitting agent, or answers | locked to `author_association == OWNER` — a non-owner's comment does nothing; agents' own comments aren't the owner |
364| `adw-alerts` | Dependabot / code-scanning alert (or daily) | `security-reviewer` sweeps open alerts, escalates real high-severity, ignores prototype-only ones | alert events relay to dispatch (action can't serve them); a schedule backstops missed events |
365| `adw-alerts` | daily schedule / manual dispatch | `security-reviewer` sweeps open Dependabot + code-scanning alerts, escalates real high-severity, ignores prototype-only ones | one supported whole-state poll; dedupe against existing tracking issues |
365366| *CI self-heal* | — | folded into `sweeper` (hourly), not a per-event trigger | avoids the fiddly `check_suite`→PR mapping and its loop risk; fits the predictability dial |
367368The one deliberately-owner-gated reaction is `adw-comment`: because the repo is
368369public, a comment body is untrusted input, so only the owner may steer through it.
369Everything else keys off structural events (a review verdict, a merge, a tag) that
370agents produce as a matter of course, which is why the loop-guards matter — without
371them, an agent's own review or merge would wake another agent without end.
370Everything else keys off structural events (a review verdict, a merge, a tag) or
371the deterministic alert schedule. The guards prevent agents from reacting to their
372own work.
373374Claude Code rejects bot-originated events by default. The intentionally
374375bot-originated build, plan, review, revise, and alert-triage lanes therefore