Repository navigation
Give each work-queue Claim its full worker-finalizer verification budget - #79334
Conversation
… verification within a job
The worker's own trusted finalizer now measures its delivery-verification
budget from the later of Completion and the moment it holds the verified
ledger, so a slow ledger load in safe_outputs no longer leaves a verifiable
Claim delivery_pending with zero attempts. While its own run is active it
publishes only a verified Result; DeliveryFailure exhaustion, maintenance
recovery and missing-verifier expiry stay anchored at the original
Completion. Claim delivery diagnostics report the attempt count.
Trusted steps of one work-queue job reuse ledger checkpoint verification
through a private ${RUNNER_TEMP}/gh-aw/work-queue-verification.json that
compiled safe-output jobs opt into with GH_AW_WORK_QUEUE_VERIFICATION_CACHE.
Reuse is limited to Git transport for the same repository and branch; every
read still re-advertises the ref with its own credential, and shared, linked,
foreign or malformed cache files are ignored.
make recompile also refreshes the two LangGraph lock files that predate the
TMPDIR exclusion from #79277.
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: 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.
|
|
✅ PR Code Quality Reviewer completed the code quality review. Caution agentic threat detected DetailsPotential security threats were detected in the agent output. Detected threat types: prompt injection. Review the workflow run logs for details. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: 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.
|
Comment MemoryPeek at saved memory (spec-review-history)History |
There was a problem hiding this comment.
Caution
agentic threat detected
Threat detection flagged this output in warn mode. Manual review is REQUIRED before any follow-up automation.
Details
Potential security threats were detected in the agent output. Detected threat types: prompt injection.
Review the workflow run logs for details.
Found one blocking cache-integrity issue: the job-scoped verification cache can be rewritten by same-UID untrusted steps, and cache hits skip re-reading the Git blob. The inline comment explains how this can allow forged queue contents to bypass verification. Static review only; tests were not run per review instructions.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~2 AIC · ⊞ 1.6K
Comment /review to run again
Comment MemoryPeek at saved memory (review-history)History |
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs and /tdd. Requesting changes because the new finalizer budget can still be consumed by reloads that happen before verification starts.
📋 Key Themes & Highlights
Key Themes
- Budget anchor is set too early:
ledgerReadyAtis captured before the per-member ledger reload and native-run fetch, so their elapsed time is charged against the worker's verification budget. - Test gap: the slow-load test delays only the initial read, so it does not cover the per-member reload that the fix targets.
- Unflagged behavior change: one terminal-evidence test now expects the verifier to run
max_attemptstimes where it previously expected no calls. - Low-severity hardening: the verification-cache temp file name is predictable.
Positive Highlights
- ✅ The job-scoped verification cache is validated on load (owner, mode,
nlink,O_NOFOLLOW, size, schema) and written atomically. - ✅ Maintenance keeps the Completion-anchored window, and its tests now use the dispatcher context.
- ✅ The
attemptsdiagnostic and theGH_AW_WORK_QUEUE_VERIFICATION_CACHEenv var are small, targeted changes.
Limitation: I could not run the JS test suites. npm ci in actions/setup/js failed with a self-signed certificate error from the package proxy, so the findings above come from static analysis of the diff and source. The anchor concern should be confirmed by a test that delays the per-member reload.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~8 AIC · ⌖ ~2 AIC · ⊞ 6.7K
Comment /matt to run again
There was a problem hiding this comment.
🟡 Changes recommended
Malformed optional caches can fail jobs instead of falling back to Git, while shared finalizer deadlines can skip later Claims and attempt counts can report zero despite verification having run.
3 open issues
What changed in this PR
This PR improves gh-aw work-queue finalization by preventing slow initial ledger verification from consuming the worker’s delivery-verification window. It also reuses verified ledger state across trusted steps in the same job.
Changes:
- Adjust the worker finalizer’s verification budget and add attempt counts to failure diagnostics.
- Add an opt-in, job-scoped Git verification cache and enable it in generated workflows.
- Extend regression tests, update the protocol specification, and add patch release notes.
| File | Description |
|---|---|
pkg/workflow/compiler_safe_outputs_envvars.go |
Enable caching in work-queue safe-output jobs. |
docs/src/content/docs/specs/work-queue-specification.md |
Document verification windows and cache rules. |
actions/setup/js/work_queue_store.cjs |
Persist and reuse verified heads and checkpoint proofs. |
actions/setup/js/work_queue_git_transport.test.cjs |
Cover cache reuse, rejection, and head extension. |
actions/setup/js/safe_output_routing_parity.test.cjs |
Update expected attempt-count diagnostics. |
actions/setup/js/safe_output_handler_manager.cjs |
Include attempts in delivery failure messages. |
actions/setup/js/finish_work_queue_claim.test.cjs |
Cover slow loads and maintenance deadlines. |
actions/setup/js/finish_work_queue_claim.cjs |
Adjust worker budgets and expose attempt counts. |
.github/workflows/smoke-work-queue.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/smoke-work-queue-worker.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/smoke-work-queue-monitor.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/smoke-work-queue-dispatcher.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/smoke-langgraph.lock.yml |
Refresh runtime temporary-variable exclusions. |
.github/workflows/repo-tree-map.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/eslint-refiner.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/eslint-monster.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/eslint-miner.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/eslint-factory-dispatcher.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/engine-conformance-pydantic-ai.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/engine-conformance-pi.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/engine-conformance-opencode.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/engine-conformance-mini-swe-agent.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/engine-conformance-langgraph.lock.yml |
Enable caching and refresh temporary-variable exclusions. |
.github/workflows/engine-conformance-kiro.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/engine-conformance-goose.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/engine-conformance-gemini.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/engine-conformance-factory.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/engine-conformance-dispatcher.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/engine-conformance-deepseek-harness.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/engine-conformance-cursor.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/engine-conformance-crush.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/engine-conformance-copilot.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/engine-conformance-codex.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/engine-conformance-claude.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/engine-conformance-aider.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/engine-conformance-agy.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/deep-report.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/daily-work-queues-report.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/daily-token-consumption-report.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/daily-team-evolution-insights.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/daily-secrets-analysis.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/daily-report-dispatcher.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/daily-repo-chronicle.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/daily-regulatory.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/daily-observability-report.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/daily-issues-report.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/daily-firewall-report.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/daily-evals-report.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/daily-compiler-quality.lock.yml |
Enable job-scoped verification caching. |
.github/workflows/artifacts-summary.lock.yml |
Enable job-scoped verification caching. |
.changeset/fix-work-queue-finalizer-verification-budget.md |
Describe the patch and recompilation requirement. |
Review effort: Max (adaptive)
|
Excellent work on the work-queue finalization improvements! 🎯 This PR is well-aligned with the project's core agentic workflows focus: ✅ Clear problem statement — You've detailed the timeout issue in "Process Safe Outputs" with concrete examples and timings. ✅ Comprehensive solution — The dual approach (finalizer budget + job-scoped verification cache) is well-reasoned, with security considerations clearly addressed in the Review notes section. ✅ Strong validation — Impressive test coverage across ✅ Protocol safety — The review notes thoughtfully address the trust boundary for the cache file and explain why the longer deadline window cannot produce late failures. The PR is in great shape and ready for core team review. After merge, monitoring the first scheduled
|
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "6ed26916d20da02926585f21f64da1c5dea656b6",
"kind": "requested",
"schema_version": "1",
"state": "bdb31ecf77595e6abde182d99e0e8465f05d3b2bdbc4250458b034e39f5c6ae5",
"work": [
"13b9e0d47c65e6137513f2aa36364d488bc8f9796eb97a7254ff786aaf4e10ea",
"2fa7f8fe5b16a0bb5cbb24260ea70503b4ec1f6af2d7cc4b9697dd2966de7c92",
"45eacbd945a9f22cdf612905f5135a883b614de80b76d61e10fae3ae81d16d14",
"7e3ca58e7a6eec0ea0a27dc160aaaa9b392ff855e01c50357e61e93de56db9b3",
"c281f29ebc66d1980ca5eeeb696823f7e07c4dd298eb1173f757355ecb5fbb47",
"ccf8992ca62a5ab62cd024108a90d6e992070fe4a5c8a51d32f333df3f07986b",
"ed06a5a5d68b2cf2a60b1c5eb1406a76f6c30d5308b846ec80dc663dd85ca470",
"fed289866868337a85576cafd77d966cbc4df3816a4e108941fe5fd7fdc127fb"
],
"workflow": "pr-sous-chef"
}
|
…verification-budget Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Merged |
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "03907c09a1d94aeb86beac4ffb89a2ed8bc96849",
"kind": "requested",
"schema_version": "1",
"state": "9846de9d21e781aa1702c6d28acf3e2df28532f3ab83245eddecee54c5e6fc05",
"work": [
"8b8e96afa57abc9c0b1273828ac899c27c0a396da52d9fa477a1de8b83e81d0b"
],
"workflow": "pr-sous-chef"
}
|
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Fixed in |

The work-queue worker's own finalizer in
safe_outputscould start after its delivery-verification deadline and make zero attempts, leaving a verifiable Claimdelivery_pending. This gives each Claim its full worker-finalizer verification budget after ledger loading and the native-run check.Problem
Smoke Work Queue Worker run 41657791793 failed in "Process Safe Outputs" with
One or more Claim deliveries remain unverified…andwork_queue_outcome=delivery_pending; run 42171469229 has the same signature. The Claim (effect_contract: none, no safe-output messages) would have verified on its first attempt.work.completion_at)finalizeWorkerResultsstarts 378 s after CompletionWith the default
reconciliation.deadline_ms: 300000, the remaining budget was negative, the verification loop never ran, and the manager failed the step.Loads are slow because
verifyCheckpointGitHistoryre-verifies every checkpoint generation with one full ledger replay each (about 3 new generations a day), and its in-memory caches die with eachgithub-scriptstep, so one job pays that cost twice. Later daily runs pass only because the ledger is currently short; the cost grows every day.Changes
Finalizer budget (
finish_work_queue_claim.cjs)DeliveryFailurewithout terminal native-run evidence. Failure exhaustion, maintenance recovery, and missing-verifier expiry remain anchored at Completion.attempts, including a successful call whose proof is later discarded after a controls change. Manager diagnostics include that count.Cache-integrity review resolution (
03907c09)Connector CI repair (
connectors_imports_test.go)aw wrapfragment in the connector documentation.Docs: per-Claim delivery-verification semantics in
work-queue-specification.md, plus a patch changeset.Review notes
Resultafterdeadline_msand deadline-gates onlyDeliveryFailure; replay and exhaustion rules are unchanged. While its own run is active, the worker can publish only a verifiedResult. Maintenance still uses the original Completion deadline.actions/setup/md/xpia.md. It reportedsecret_leak: falseandmalicious_patch: false. This is separate from the valid cache-integrity finding addressed by removing the disk cache; no detector or security policy was disabled.Validation
aaf521f799cab14f4a5d050bc8068725198f816b.npm --prefix actions/setup/js run test:js -- --no-file-parallelism finish_work_queue_claim.test.cjs safe_output_routing_parity.test.cjs work_queue_store.test.cjs work_queue_git_transport.test.cjs— 250 tests passed across 4 files (46.56 s).