Repository navigation
Fix first-use work-queue pool and worker registration - #71787
Conversation
Verify new workers at the immutable default revision and register additive pool profiles without draining or resetting existing queue state. Keep Go and JavaScript replay, native evidence checks, schemas, checkpoints, formal models and deployment guidance aligned. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
✅ 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.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ 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.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.
|
✅ Design Decision Gate — ADR VerifiedADR reviewed: ADR-71495: Additive First-Use Pool Installation for AW-Managed Work Queues. This PR revises that ADR on the branch, and the implementation matches the revised decision. 🏗️ Next action: When the design is final, review the ADR and change its status from 📋 Verification SummaryWhy the gate ran: The PR adds 262 lines under ADR completeness: The ADR has Context, Decision, Alternatives Considered (3), and Consequences (Positive, Negative and Neutral). How the code matches the revised Decision (pool installation can now also add missing worker profiles):
No divergences or uncovered architectural changes found.
|
There was a problem hiding this comment.
Review: no blocking findings
I found no actionable correctness, security, or performance issue in the changed lines. The specialist pass was unavailable because its file-read invocation was denied; this review is based on the prefetched diff and targeted source inspection. No tests were run, per the static-review instructions.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again
There was a problem hiding this comment.
🔵 Needs a closer look
Cross-engine worker authorization and active-state preservation require human review, particularly with unresolved registration failures.
4 open issues
What changed in this PR
This PR extends gh-aw’s work queue so trusted first-use processing can register new workers and install pools without draining existing work.
Changes:
- Add default-revision worker verification and additive profile registration.
- Align Go and JavaScript replay, publication checks, schemas, and deployment preservation.
- Expand tests, formal-model scenarios, fixtures, and operational guidance.
| File | Description |
|---|---|
specs/work-queue/transactions.tsp |
Add optional registration provenance. |
specs/work-queue/README.md |
Document registration assumptions and model scenarios. |
specs/work-queue/QueuePoolInstall.tla |
Model profile additions and deployment preservation. |
specs/work-queue/PoolInstallUnauthorized.cfg |
Set new model parameters for unauthorized publication. |
specs/work-queue/PoolInstallUnapprovedRoute.cfg |
Preserve the unapproved-route rejection scenario. |
specs/work-queue/PoolInstallProducerWitness.cfg |
Update the producer-installation witness parameters. |
specs/work-queue/PoolInstallNewWorkerWitness.cfg |
Add a new-worker registration witness. |
specs/work-queue/PoolInstallNewWorker.cfg |
Cover verified registration in a new pool. |
specs/work-queue/PoolInstallInvalidRoute.cfg |
Update invalid-route model parameters. |
specs/work-queue/PoolInstallInvalidProposal.cfg |
Update invalid-proposal model parameters. |
specs/work-queue/PoolInstallInvalidPool.cfg |
Update invalid-pool model parameters. |
specs/work-queue/PoolInstallExpandedRepositoryAllowlist.cfg |
Preserve repository-expansion rejection coverage. |
specs/work-queue/PoolInstallExistingPool.cfg |
Cover registration in an existing pool. |
specs/work-queue/PoolInstall.cfg |
Set baseline registration model parameters. |
specs/work-queue/fixtures/generate_prefix.py |
Generate an additive worker-registration transaction. |
specs/work-queue/fixtures/canonical-prefix.json |
Add registration replay and expected-prefix fixtures. |
specs/work-queue/check.sh |
Run the three new model scenarios. |
pkg/workqueue/types.go |
Add PoolInstallOperation.ConfigRef. |
pkg/workqueue/schema/RequestParameters.json |
Allow provenance in request parameters. |
pkg/workqueue/schema/QueueRequest.json |
Allow provenance in queue requests. |
pkg/workqueue/schema/QueueOperation.json |
Allow provenance in queue operations. |
pkg/workqueue/schema/QueueCommit.json |
Allow provenance in committed operations. |
pkg/workqueue/schema/PoolInstallOperation.json |
Extend the generated installation schema. |
pkg/workqueue/schema/OperationsParameters.json |
Extend operation-parameter validation. |
pkg/workqueue/replay.go |
Support additive profiles and validate authority boundaries. |
pkg/workqueue/provisioning_pool.go |
Verify new workers before native publication. |
pkg/workqueue/pool_install_test.go |
Cover registration, state preservation, and rejection cases. |
pkg/workqueue/evidence.go |
Route installation requests through evidence verification. |
pkg/workqueue/deployment.go |
Preserve existing deployment records during initialization. |
docs/src/content/docs/specs/work-queue-specification.md |
Specify additive registration and verification requirements. |
docs/src/content/docs/reference/work-queue.md |
Update first-use setup and recovery guidance. |
docs/src/content/docs/patterns/workqueue-ops.md |
Explain registration without draining existing work. |
docs/adr/71495-additive-first-use-work-queue-pool-installation.md |
Record the expanded registration decision and trust boundary. |
actions/setup/js/work_queue_replay.cjs |
Support additive registration in JavaScript replay. |
actions/setup/js/work_queue_pool_install.cjs |
Discover and verify missing worker profiles. |
actions/setup/js/work_queue_logging.test.cjs |
Update recovery-message expectations. |
actions/setup/js/work_queue_logging.cjs |
Explain registration failures and recovery steps. |
actions/setup/js/work_queue_dispatch.test.cjs |
Extend first-use lifecycle and preservation coverage. |
actions/setup/js/work_queue_dispatch.cjs |
Invoke registration during submission and dispatch processing. |
actions/setup/js/work_queue_deployment.cjs |
Retain existing deployment history during initialization. |
.github/workflows/smoke-work-queue-dispatcher.md |
Update smoke instructions for first-use registration. |
.github/workflows/smoke-work-queue-dispatcher.lock.yml |
Refresh generated body and admission hashes. |
.github/aw/work-queue.md |
Update internal registration and preservation guidance. |
.changeset/patch-work-queue-worker-registration.md |
Add the patch-release note. |
Review effort: Max
| if (missing.length) throw queueError("work_queue_pool_not_installed", "the requested pool is absent from the installed Policy and no compiled pool proposal is available"); | ||
| return latest; | ||
| } | ||
| const targets = poolNames.filter(name => missing.includes(name) || Object.keys(proposal.pools[name]?.profiles ?? {}).some(profile => !Object.hasOwn(latest.projection.policy.pools[name].profiles, profile))); |
| let configRef; | ||
| for (const [poolName, pool] of candidates) { | ||
| for (const [name, profile] of Object.entries(pool.profiles)) { | ||
| const installed = latest.projection.policy.pools[poolName]?.profiles[name]; |
| if _, exists := state.Policy.Pools[install.Pool].Profiles[name]; exists { | ||
| continue |
| /\ publications = 0 | ||
| /\ installedPools' = IF ExtendExistingPool THEN installedPools | ||
| ELSE installedPools \cup {NewPool} | ||
| /\ registeredProfiles' = registeredProfiles \cup {"new-worker"} |
|
🎉 This pull request is included in a new release. Release: |

Why
smoke-work-queuewas configured and compiled, but its pool and worker were absent from installed Policy. First use failed before admission or launch because automatic pool installation could only reuse already-installed worker authority. Adding a new worker therefore required the manual, quiescent Policy update that first-use installation should avoid.Approach
PoolInstallto add missing worker profiles as well as new pools. Trusted submit/dispatch processing verifies genuinely new workers against the immutable default revision: worker-enabled Markdown source, matching compiled assignment contract, canonical workflow path, singleton repository-scoped authority, and active native registration.config_refrecords provenance; it does not grant authority by itself.Workers, observers, previews, and accepted-request recovery cannot trigger registration. No live queue mutation, workflow dispatch, reset, cancellation, or forced completion was performed.
Validation
go test ./pkg/workqueue -count=1passed; focused registration/checkpoint tests passed again after lint-only helper extraction.QueuePoolInstallTLC configurations passed.make fmt,make lint-cjs,make recompile, exact smoke-dispatcher compilation, and workflow drift checks passed. Exact smoke compilation produced no warnings; full-repository compilation retained unrelated warnings.make agent-report-progresspassed impacted Go/JS tests but initially failed lint because of shared linter contention and the function-size limit. After helper extraction,make agent-report-progress-no-testcompleted the remaining formatting, lint, schema, and workflow-drift gates without repeatingtest-unit.This publishes the implementation fix, not a production deployment or a claim that historical delivery failures have been repaired.