Skip to content

Run work queue smoke every 6h with 3 tasks and add a failure and latency monitor - #79146

Merged
pelikhan merged 3 commits into
mainfrom
smoke-work-queue-monitor
Nov 19, 2026
Merged

pelikhan merged 3 commits into
mainfrom
smoke-work-queue-monitor

Conversation

@elefthei

Copy link
Copy Markdown
Collaborator

Runs the work-queue smoke loop every 6 hours with 3 tasks instead of 1 task daily, and adds an observer workflow that reports failures and slow cycles.

Changes

  • smoke-work-queue-dispatcher.md: schedule daily around 14:00 → every 6 hours (compiled 21 */6 * * *). Stages three Work items (smoke-1, smoke-2, smoke-3, same payload) with one bounded dispatch (max_claims: 3, max_dispatches: 3). dispatch-workflow.max is 3, and verify_smoke_dispatch requires 3 accepted launches.
  • aw.json: smoke-work-queue pool concurrency 1 → 3. daily-report-dispatcher, engine-conformance-dispatcher and eslint-factory-dispatcher embed the full Policy, so their lock files change too; the only difference is this pool's limits (logical_limit/native_limit 1 → 3).
  • New smoke-work-queue-monitor.md: read-only observer at 30 1-23/6 * * *, 31–90 min after each dispatcher slot.
    • Checks the dispatcher run, the 3 worker runs, the cohort Work (via the work-queue MCP tool) and the pool backlog.
    • Opens a [WorkQueue Health] Smoke Work Queue Failures - … issue only when something failed. close-older-issues: true closes the previous one; issues expire after 2 days.
    • Healthy cycles end in noop, with report-as-issue: false.

Benchmarks

A script step that runs before the agent reads dispatcher and worker runs and their jobs from the Actions API. It writes /tmp/gh-aw/agent/smoke-benchmark.json and a table to the run summary on every run. The agent reports these numbers as given and does no arithmetic of its own.

Metric From → to
Dispatch latency dispatcher start → worker run created
Pickup worker run created → first job started
activation / agent / safe_outputs worker job durations
Task total dispatcher start → that worker's verified Result (verify_smoke_completion succeeded)
End to end dispatcher start → last verified Result, or time elapsed so far while incomplete

A task total over 30 min or end to end over 45 min counts as a failure and goes into the issue's Benchmarks table. A failed API read is recorded as error and reported as a failure, never as healthy.

Required after merge

The installed Policy does not change with aw.json. While the queue has no unfinished Work, reservations or delivery barriers, a maintainer runs:

gh aw work-queue --repo github/gh-aw policy --from-config --epoch smoke-pool-3-2026-11-19

Until then, each cycle admits 3 Work items but grants 1 Claim. The dispatcher check fails and the monitor reports it. That failure is expected.

Security review

  • The compiler's safe-update check flagged two new actions in smoke-work-queue-monitor.lock.yml: docker/setup-buildx-action@f87e5991… (v4.4.1) and docker/build-push-action@c3c9e263… (v7.4.0). They come from the dev-mode agentic-workflows tool, which builds the gh-aw MCP image locally with push: false. Other agentic-workflows users such as agent-job-health.lock.yml already use the same pins.
  • No new secrets were flagged.
  • Monitor permissions: contents: read, actions: read, copilot-requests: write. Its only writes are the create-issue and noop safe outputs. It has no tools.work-queue (no GH_AW_WORK_QUEUE_ROLE in the lock) and cannot submit, dispatch or finish Work.

Validation

  • make agent-report-progress passed: 367/367 workflows compiled, lock files in sync, impacted tests pass.
  • Plan staging via work_queue_intents.cjs produced 2 intents and 3 distinct nodes.
  • The verify_smoke_dispatch body exits 0 for 3 accepted launches, and 1 with Smoke requires exactly three worker dispatches for 2.
  • I ran the benchmark step locally against real past cycles. They are single-task, so for the end-to-end number I set the expected task count to 1:
Cycle Dispatch latency Pickup activation agent safe_outputs Task total Result
2026-11-18 6m21s 0m14s 3m30s 1m46s 5m18s 17m31s within budget
2026-11-16 6m22s 50m49s 2m12s 2m44s 3m06s 65m27s over budget (runner pickup)
  • I did not dispatch any workflow. The live checks (failure issue, close-older, healthy noop) start after merge.

Risks

  • Queue read time. Monitor steps 3–4 call the work-queue MCP tool, which runs gh aw work-queue state. Run locally, that command used the CPU flat out and did not finish within 900 s, against the monitor's 15-minute limit. I haven't measured it in Actions. If it times out there, the issue reports a "Queue read" failure every cycle. The fallback is tools.work-queue: true with work_queue_read, which daily-work-queues-report already uses.
  • Mirror issues. Each admitted Work creates a [work queue] <id> issue, so this goes from 1 to 12 per day.

…nitor

- smoke-work-queue-dispatcher: every 6 hours, stages smoke-1..3 with one bounded dispatch (max_claims/max_dispatches 3); verifier requires 3 accepted launches
- aw.json: smoke-work-queue pool concurrency 1 -> 3 (embedded Policy in the other queue dispatcher locks updates accordingly)
- smoke-work-queue-monitor: read-only observer at 30 1-23/6 UTC; reads dispatcher/worker runs and work-queue state, opens a [WorkQueue Health] issue only on failure, close-older-issues retires the previous one
- Installed Policy needs a quiescent `gh aw work-queue policy --from-config --epoch <new>` after merge before 3 Claims are granted
- smoke-work-queue-monitor: deterministic pre-agent step reads dispatcher/worker runs and jobs from the Actions API, writes /tmp/gh-aw/agent/smoke-benchmark.json and a run-summary table
- Per task: dispatch latency, runner pickup, activation/agent/safe_outputs durations, task total (dispatcher start to verified Result); end to end: dispatcher start to last verified Result
- Budgets: task total > 30 min or end to end > 45 min is a failure and opens the [WorkQueue Health] issue with a Benchmarks table; healthy noop line carries end-to-end and slowest task
- Agent reads run facts from the file instead of list_workflow_runs; github actions toolset dropped
Then a Benchmarks table with one row per worker run (run link, conclusion,
`dispatch_latency_s`, `pickup_s`, `jobs_s` activation, agent and
safe_outputs, `task_total_s`, over budget) and a final End to end row.
Put raw tool output in `<details>`. End with `**References:**` listing the
@elefthei
elefthei marked this pull request as ready for review November 19, 2026 01:41
Copilot AI adaptive review requested due to automatic review settings November 19, 2026 01:41
@github-actions

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills...

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Warning

Threat detection engine error

Threat detection could not complete its analysis due to a tooling error. This is not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs to troubleshoot the error.

Test Quality Sentinel

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~2 AIC · ⊞ 7.3K · ◷

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Warning

Threat detection engine error

Threat detection could not complete its analysis due to a tooling error. This is not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs to troubleshoot the error.

Ponytail Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated by Ponytail Reviewer for #79146 · codex · routed: gpt61 medium · ~6 AIC · ⊞ 185 · ◷

@github-actions

Copy link
Copy Markdown
Contributor

🚀 PR Specification Reviewer has started processing this pull request

@github-actions

Copy link
Copy Markdown
Contributor

🔎 PR Code Quality Reviewer is reviewing code quality for this pull request...

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The monitor can execute untrusted PR build inputs with job credentials, while unauthorized queue reads and omitted delivery failures undermine its health checks.

9 open issues
What changed in this PR

Expands gh-aw’s work-queue smoke coverage to three tasks every six hours and adds an observer for failures and slow cycles.

Changes:

  • Stages and verifies three worker launches, with smoke-pool concurrency increased to three.
  • Adds scheduled checks of dispatcher runs, workers, queue state, and backlog, reporting failures through issues.
  • Computes task and end-to-end benchmarks against 30-minute and 45-minute budgets.
File Description
.github/​workflows/​smoke-work-queue-monitor.md Defines health checks, benchmarks, and failure reporting.
.github/​workflows/​smoke-work-queue-monitor.lock.yml Compiles the monitor into GitHub Actions jobs.
.github/​workflows/​smoke-work-queue-dispatcher.md Runs every six hours and requires three accepted launches.
.github/​workflows/​aw.json Raises smoke-pool concurrency from one to three.

Review effort: Max (adaptive)

engine: copilot
imports:
- shared/reporting.md
tools:
imports:
- shared/reporting.md
tools:
agentic-workflows:
step 1 found no run.
4. Pool backlog. Call the same tool with
`{"operation":"state","repo":"${{ github.repository }}","pool":"smoke-work-queue","state":"<S>","limit":256}`
for S in `available`, `claimed`, `cancelled`, following `next_offset`.
Comment thread .github/workflows/aw.json
"pools": {
"default": {},
"smoke-work-queue": { "concurrency": 1 },
"smoke-work-queue": { "concurrency": 3 },
Comment on lines +55 to +56
assert.equal(receipt.dispatches, 3, "Smoke requires exactly three worker dispatches");
assert.equal(receipt.launches.length, 3);
Comment on lines +93 to +94
nodes: ["smoke-1", "smoke-2", "smoke-3"].map(node),
dispatch: { pool: "smoke-work-queue", max_claims: 3, max_dispatches: 3 },
Comment on lines +64 to +67
for (const run of await runsOf("smoke-work-queue-worker.lock.yml")) {
const worker = await timing(run);
worker.dispatch_latency_s = secs(origin, run.created_at);
worker.task_total_s = secs(origin, worker.verified_at);
Comment on lines +115 to +117
3. Cohort Work. Call the `work-queue` tool from the agentic-workflows MCP with
`{"operation":"state","repo":"${{ github.repository }}","pool":"smoke-work-queue","graph":"smoke-work-queue:<DISPATCH_RUN>","limit":256}`
and follow `next_offset` until exhausted. `rows[]` mix `kind: "graph"`,
`dispatch_latency_s`, `pickup_s`, `jobs_s` activation, agent and
safe_outputs, `task_total_s`, over budget) and a final End to end row.
Put raw tool output in `<details>`. End with `**References:**` listing the
dispatcher run, up to two failed worker runs, and this run:
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

Warning

Threat detection engine error

Threat detection could not complete its analysis due to a tooling error. This is not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs to troubleshoot the error.

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (.github/workflows/smoke-work-queue-monitor.md:15): address unresolved feedback - Review comment
  3. Review (.github/workflows/smoke-work-queue-monitor.md:16): address unresolved feedback - Review comment
  4. Review (.github/workflows/smoke-work-queue-monitor.md:125): address unresolved feedback - Review comment
  5. Review (.github/workflows/aw.json:48): address unresolved feedback - Review comment
  6. Review (.github/workflows/smoke-work-queue-dispatcher.md:56): address unresolved feedback - Review comment
  7. Review (.github/workflows/smoke-work-queue-dispatcher.md:94): address unresolved feedback - Review comment
  8. Review (.github/workflows/smoke-work-queue-monitor.md:67): address unresolved feedback - Review comment
  9. Review (.github/workflows/smoke-work-queue-monitor.md:117): address unresolved feedback - Review comment
  10. Review (.github/workflows/smoke-work-queue-monitor.md:154): address unresolved feedback - Review comment
  11. Fix failing check agent (FAILURE): Check run.
  12. Fix failing check agent (FAILURE): Check run.
  13. Fix failing check agent (FAILURE): Check run.
  14. Fix failing check conclusion (FAILURE): Check run.
  15. Fix failing check conclusion (FAILURE): Check run.
  16. Fix failing check conclusion (FAILURE): Check run.

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "da8352c9fecb3ecf5d2e93311732f9e69aa9d56a",
  "kind": "requested",
  "schema_version": "1",
  "state": "73ee2cfb848f500189a45a4eb4c49295b801db8964e87d3f62390d5697f97ced",
  "work": [
    "0a5b71dd5f9bd0b0c79d1b246d2584cc75ab3668526fb22b00881171f14ea536",
    "0bcd3e445b7da9f366788bd7e5a5014cf465364e1f2d8a619297bec7ed434995",
    "2211d402793ffc957c541c9f466fb9fe60c98ea24a854b482346937bc34a27e0",
    "3316f81b4fb22a58638f8d73e5e21ad617ad61fd910f400323f10fb8e9ad85ca",
    "34f38971738f6a752a646bd7797a6c8d47fb096e4eb6f91e946a91255433c8c4",
    "51e2287c3d1ee41b7e13769862add61dcd292a623cf943abc5968c984e246bcf",
    "694144627eabdcbc4d7cc1a0880b405e340f24f28c495d13ac28b4b0a3b8e02a",
    "a15be655ae0bd411cd3617a7dbb22936ad37602c6110ea8ddba0f66ea3a8a8d1",
    "b5ce10d550bb69d7050e189c85a1819c7305cca2e34b3dddad11a37355e107b2",
    "cd0a00ad0db994717a5cb09f857d0a36e08aaa914feee7888c101c87edf1a72d",
    "d04a7844e1963a8503d54ea22c2ef2217a59eb741cd80d79b3c336685741a3aa"
  ],
  "workflow": "pr-sous-chef"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~3 AIC · ⊞ 7K · ◷
Comment /souschef to run again

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
attempts: work.attempts,
max_attempts: queueState.policy?.retry?.max_attempts ?? null,
delivery: work.barrier,
cancellation_reason: work.cancellation_reason ?? null,
imports:
- shared/reporting.md
tools:
agentic-workflows:
@pelikhan
pelikhan merged commit 3a8462f into main Nov 19, 2026
43 of 46 checks passed
@pelikhan
pelikhan deleted the smoke-work-queue-monitor branch November 19, 2026 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants