Repository navigation
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Some side-effect jobs bypass claim reconciliation, and an existing integration assertion is now stale.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Adds multi-claim work-queue reconciliation and claim-scoped safe-output processing while retaining single-claim compatibility.
Changes:
- Accepts and validates arrays of worker assignments and finish intents.
- Filters safe outputs by successfully completed claims.
- Updates compiler gating, prompts, documentation, and tests.
| File | Description |
|---|---|
pkg/workflow/compiler_safe_outputs_job.go |
Adds all-claim gating for custom effects. |
pkg/workflow/compiler_safe_outputs_job_test.go |
Tests partial-claim step gating. |
actions/setup/js/write_work_queue_snapshot.cjs |
Admits multiple effective assignments. |
actions/setup/js/write_work_queue_snapshot.test.cjs |
Tests batch assignment validation. |
actions/setup/js/work_queue_summary.cjs |
Summarizes every assigned claim. |
actions/setup/js/work_queue_mcp_server.cjs |
Adds per-claim finish intents. |
actions/setup/js/work_queue_mcp_server.test.cjs |
Tests batch finish handling. |
actions/setup/js/generate_safe_outputs_tools.cjs |
Adds optional claim identifiers to tools. |
actions/setup/js/generate_safe_outputs_tools.test.cjs |
Tests claim-aware tool schemas. |
actions/setup/js/finish_work_queue_claim.cjs |
Reconciles batches and filters outputs. |
actions/setup/js/finish_work_queue_claim.test.cjs |
Covers partial and incomplete batches. |
actions/setup/js/create_prompt.cjs |
Instructs workers about multiple claims. |
actions/setup/js/collect_ndjson_output.cjs |
Preserves validated claim identifiers. |
actions/setup/js/aw_context.cjs |
Parses single or array assignments. |
.github/workflows/smoke-work-queue.lock.yml |
Regenerates the all-claims gate. |
.github/aw/work-queue.md |
Documents multi-claim behavior. |
| const completed = new Set(workers.filter((_, index) => results[index].authorized).map(item => item.claim_id)); | ||
| const allCompleted = completed.size === workers.length; | ||
| const authorized = completeBatch && completed.size > 0; | ||
| if (authorized) filterClaimOutputs(completed, allCompleted, options.agentOutputPath || `${TMP_GH_AW_PATH}/${AGENT_OUTPUT_FILENAME}`); |
There was a problem hiding this comment.
Fixed in f9a913a. Both downstream jobs now depend on safe_outputs and consume its filtered reconciliation artifact with no fallback to the original artifact. Asset uploads require claim authorization and reconciled output types; custom jobs additionally require all claims completed. Added partial/cancelled/completed batch tests and downstream compilation coverage. Focused queue integration, full workflow-package unit tests, and 68 JavaScript tests pass.
| } | ||
| if isWorkQueueEnabled(data) { | ||
| typedStep.If = combineGitHubIfExpressions(workQueueClaimAuthorizedExpression, typedStep.If) | ||
| typedStep.If = combineGitHubIfExpressions("steps.work_queue_claim_reconciliation.outputs.all_authorized == 'true'", typedStep.If) |
There was a problem hiding this comment.
Fixed in f9a913a: the user-step assertion now expects all_authorized, while ordinary handler assertions retain authorized. The queue compilation integration check passes locally.
|
@copilot address the following outstanding work in one pass:
Push the necessary fixes, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved. Use the pr-finisher skill and stop when only human review or CI remains; do not trigger CI. Sous-chef head: 128ee74
|
…ueue-api-support-multiple-claims Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality Sentinel skipped because pre-fetch PR data was unavailable: unable to fetch test file diff
|
|
🔎 PR Code Quality Reviewer is reviewing code quality for this pull request... |
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Ponytail Reviewer completed successfully! Lean already. Ship.
|
Merged latest main using make merge-main (ded4e71) and pushed fixes in f9a913a. Closed the downstream artifact/authorization bypass, updated the integration assertion, fixed expression-valued concurrency queue schema validation, and corrected batch completion attempt collisions. Full workflow-package tests, queue integration, 68 JS tests, make lint, secret scanning, and 320-workflow drift validation pass. The progress gate still reports four pre-existing custom-linter findings in publish_assets.go. Replied to both review threads; thread resolution is unavailable with the authenticated tools here. Final automated review was unavailable and CodeQL timed out. CI on the new HEAD remains unverified; no CI was triggered. |
Comment MemoryPeek at saved memory (pr-code-quality-reviewer)Note This comment is managed by comment memory.Expand the saved memory block to view or edit the persistent context for this thread.
|
There was a problem hiding this comment.
Skills-Based Review 🧠
Reviewed with /codebase-design and /tdd. Note: the pre-fetched diff (commit 128ee74) is one commit behind the current HEAD (f9a913a, "Reconcile downstream queue effects and fix compilation checks"). I verified the current checkout state directly instead.
Finding: both prior Copilot review comments on this PR are already resolved in f9a913a:
- Claim-filtered
agent_output.jsonis now consumed correctly by downstream jobs —upload_assetsandsafe-outputs.jobsnow depend onsafe_outputsand download the reconciled artifact (workQueueReconciledArtifactName) instead of the raw agent artifact, withContinueOnErrordisabled for the fallback (pkg/workflow/safe_jobs.go,pkg/workflow/publish_assets.go,pkg/workflow/safe_outputs_steps.go). TestWorkQueueCompilationPhasesnow assertsall_authorizedfor the user-step block and adds coverage forupload_assets/deploygating onwork_queue_output_types/work_queue_all_authorized.
I additionally confirmed reconcileWorkerClaim now derives a per-claim attempt identity (`${attempt}/claim/${encodeURIComponent(item.claim_id)}`) for multi-claim batches, which avoids Completion-transaction collisions when several claims are reconciled in the same workflow attempt — a correctness detail worth calling out as a strength.
📋 Verification performed
go build ./...— passesgo test ./pkg/workflow/... -run TestGateSafeOutputStepsForPartialWorkQueueClaims— passesgo test -tags integration ./pkg/workflow/... -run TestWorkQueueCompilationPhases— passesgo vet ./pkg/workflow/...— clean- JS vitest suites could not run locally (no network access for
vitestinstall), but manual inspection offinish_work_queue_claim.test.cjs,work_queue_mcp_server.test.cjs, andwrite_work_queue_snapshot.test.cjsshows solid coverage of the new batch/array-claim paths (duplicate claim rejection, conflicting finish intents, per-claim filtering ofagent_output.json, andclaim_idschema injection into safe-output tool schemas).
✅ Positive highlights
- Backward compatibility is preserved cleanly: single-claim behavior is unchanged (
multiplebranch is opt-in based onArray.isArray). - The "all-or-nothing" semantics for an omitted finish intent (cancelling the entire batch) is a sound, conservative security default and is clearly documented in
work-queue.mdand in-code comments. - Good symmetry between
validWorkerduplication infinish_work_queue_claim.cjsandwork_queue_mcp_server.cjs— consider extracting to a shared helper in a follow-up to avoid drift, but not blocking.
No blocking issues found in the current HEAD state.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 82.7 AIC · ⌖ 14.4 AIC · ⊞ 10K
Comment /matt to run again
🏗️ Design Decision Gate — ADR RequiredThis PR adds 158 lines across business-logic directories (threshold: 100) and no existing ADR covers it, so ADR enforcement applies. I generated a draft ADR and pushed it to this branch. Draft ADR: Decision captured: accept an array of work-queue assignments in Evidence used
|
|
@copilot run pr-finisher skill |

Workers can receive multiple claims in
aw_context, but the existing finish and safe-output flow assumes one claim. This change supports partial completion without applying outputs for unfinished claims.claim_id; a missing intent cancels the batch and blocks safe outputs.claim_id. Tagged outputs apply only after that claim’s completion is verified. Untagged outputs and custom steps/actions require every claim to complete.