Skip to content

Clarify why the ESLint factory cannot dispatch workers - #67217

Merged
pelikhan merged 12 commits into
mainfrom
copilot/investigate-eslint-factory-work-queue
Oct 9, 2026
Merged

pelikhan merged 12 commits into
mainfrom
copilot/investigate-eslint-factory-work-queue

Conversation

Copilot AI commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

The ESLint factory dispatcher is failing before it can admit work or launch workers. Its work-queue branch and installed Policy are missing.

  • Activation: Identify an uninitialized queue in the logs without implying workers ran or initializing the queue implicitly.
  • Regression coverage: Verify that an absent queue produces an uninitialized snapshot without installing Policy.
  • Operator guidance: Document the protected-branch and Policy requirements for worker dispatch.

Worker execution remains blocked until an authorized administrator provisions the queue.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title Clarify ESLint factory work-queue deployment blocker Clarify why the ESLint factory cannot dispatch workers Oct 9, 2026
Copilot AI requested a review from pelikhan October 9, 2026 14:54
@pelikhan

pelikhan commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

@copilot update the work-queue protocol to automatically provision the work-queue branch when a workqueue produced submits work. (In the safe outputs).

Update specs, TLA+, safeoutputs runtime. Treat missing branch as empty. Remove requirement for admin to seed the work-queue.

@pelikhan
pelikhan marked this pull request as ready for review October 9, 2026 15:31
Copilot AI balanced review requested due to automatic review settings October 9, 2026 15:31

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 new message incorrectly directs custom-branch users to protect the default branch.

1 open finding
What changed in this PR

Clarifies that absent queue infrastructure blocks ESLint factory worker dispatch and adds regression coverage.

Changes:

  • Reports uninitialized queues with administrator guidance.
  • Tests that absent queues remain uninitialized without Policy installation.
  • Documents required queue protection and Policy provisioning.
File Description
docs/​src/​content/​docs/​patterns/​linter-factory.md Documents provisioning prerequisites.
actions/​setup/​js/​write_work_queue_snapshot.test.cjs Adds absent-queue regression coverage.
actions/​setup/​js/​write_work_queue_snapshot.cjs Improves activation logging.

🧠 Review effort: Balanced

configuration.core.setOutput?.("work_queue_origin", canonical(snapshot.origin));
configuration.core.info(
`Work queue activation: ${worker ? `${worker.claims.length} immutable Claims authenticated${staged ? " for staged preview (not bound)" : " and bound"}` : runtime.role === "observer" ? "read-only observer" : "unassigned queue-control context"}; snapshot captured`
`Work queue activation: ${worker ? `${worker.claims.length} immutable Claims authenticated${staged ? " for staged preview (not bound)" : " and bound"}` : latest.sha === null ? "queue uninitialized; an administrator must protect the work-queue branch and install Policy before workers can be dispatched" : runtime.role === "observer" ? "read-only observer" : "unassigned queue-control context"}; snapshot captured`

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The activation diagnostic now uses the configured queue branch, defaulting to WORK_QUEUE_BRANCH; the regression test covers a custom branch. Fixed in b58cc77f.

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.

No ADR enforcement needed for PR #67217: the PR does not carry the implementation label (has_implementation_label=false) and has 0 new lines in business logic directories (default_business_additions=0, threshold=100, 3 files changed, no custom .design-gate.yml).

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

No GitHub write was emitted because safeoutputs review commands returned permission denied from the runtime.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Lean already. Ship.

Generated by Ponytail Reviewer for #67217

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel skipped because pre-fetch PR data was unavailable: unable to fetch test file diff

🧪 Test quality analysis by Test Quality Sentinel

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (pr-code-quality-reviewer)
reviewed_at: 2026-10-09T15:43:01.067+00:00
review_event: COMMENT
top_themes:
  - configurable queue branch guidance
  - regression coverage for custom queue branches
files_reviewed:
  - actions/setup/js/write_work_queue_snapshot.cjs
  - actions/setup/js/write_work_queue_snapshot.test.cjs
  - docs/src/content/docs/patterns/linter-factory.md
comment_count: 1

Note

This comment is managed by comment memory.

Expand the saved memory block to view or edit the persistent context for this thread.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 36.1 AIC · ⌖ 7.36 AIC · ⊞ 19.6K · ◷
Comment /review to run again

@github-actions github-actions Bot 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.

Verdict

The new uninitialized-queue path still hard-codes the queue branch name, and the added regression test now cements that assumption instead of catching it.

Blocking theme

Any workflow that uses a non-default queue branch will get operator guidance for the wrong branch when the queue is absent. Because this PR is specifically trying to clarify that failure mode, the coverage needs to assert the configured branch instead of the baked-in work-queue string.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 36.1 AIC · ⌖ 7.36 AIC · ⊞ 19.6K
Comment /review to run again

expect(snapshot).toMatchObject({ sha: null, worker: null, role: "dispatcher" });
expect(initialize).not.toHaveBeenCalled();
expect(readWorkQueueState(loadWorkQueueSnapshot(options.snapshotPath)).queue_state).toBe("uninitialized");
expect(options.core.info).toHaveBeenCalledWith(expect.stringContaining("administrator must protect the work-queue branch and install Policy"));

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.

This assertion hard-codes work-queue, so the regression test will still pass while the runtime tells operators to protect the wrong branch whenever a workflow uses options.branch.

💡 Assert the configured branch

loadQueue() already accepts options.branch, but this test never sets one and then locks in the literal default branch name. Pass a custom branch (for example "custom-queue") and assert that the info message includes that branch so the test actually catches the runtime bug.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The absent-queue regression test now sets branch: "custom-queue" and asserts that branch appears in the activation guidance. Fixed in b58cc77f.

Copilot AI commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

@copilot update the work-queue protocol to automatically provision the work-queue branch when a workqueue produced submits work. (In the safe outputs).

Update specs, TLA+, safeoutputs runtime. Treat ...

Implemented and pushed in 9e0ba6a0: the first trusted producer safe-output submission now bootstraps an absent queue branch with compiler-approved Policy and Work in one genesis commit. Updated the replay rules, specs/TLA+, tests, and operator guidance; reads and dispatch-only requests still leave the branch absent.

@github-actions github-actions Bot 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.

Skills-Based Review 🧠

Applied /grill-with-docs — this is a small, well-scoped diagnostic + doc clarification. One outstanding issue from the earlier Copilot review (hardcoded branch name) remains unaddressed in the new log line.

📋 Key Themes & Highlights

Key Themes

  • Hardcoded branch name: the new work-queue branch wording in the log message ignores the configurable options.branch already forwarded by loadQueue, repeating a gap flagged in a prior unresolved review comment on the same line.
  • Regression test is solid: the new write_work_queue_snapshot.test.cjs case correctly asserts queue_state: uninitialized, no implicit initializeWorkQueue call, and the new log text — good /tdd coverage for this exact scenario.
  • Docs clarification is accurate and consistent with existing guidance in deploy-work-queue.md ("Protect the queue branch and install Policy"), reinforcing the existing domain vocabulary instead of inventing new terms.

Positive Highlights

  • ✅ Test precisely pins both the behavior (initialize not called) and the new operator-facing message text.
  • ✅ Docs addition uses existing terminology (work-queue branch, Policy, queue_state) rather than introducing new concepts.
  • ✅ Change is narrowly scoped to the exact failure mode it documents, with no unrelated edits.

No blocking issues; the branch-name hardcoding is worth fixing before merge but isn't a regression introduced by broader scope creep.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 98.9 AIC · ⌖ 14.5 AIC · ⊞ 10.1K
Comment /matt to run again

configuration.core.setOutput?.("work_queue_origin", canonical(snapshot.origin));
configuration.core.info(
`Work queue activation: ${worker ? `${worker.claims.length} immutable Claims authenticated${staged ? " for staged preview (not bound)" : " and bound"}` : runtime.role === "observer" ? "read-only observer" : "unassigned queue-control context"}; snapshot captured`
`Work queue activation: ${worker ? `${worker.claims.length} immutable Claims authenticated${staged ? " for staged preview (not bound)" : " and bound"}` : latest.sha === null ? "queue uninitialized; an administrator must protect the work-queue branch and install Policy before workers can be dispatched" : runtime.role === "observer" ? "read-only observer" : "unassigned queue-control context"}; snapshot captured`

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.

[/grill-with-docs] The new log text hardcodes the literal string "work-queue branch", but loadQueue (work_queue_binding.cjs:36) already forwards a configurable options.branch. If a custom branch is ever used, this message will mislead the administrator about which branch to protect.

💡 Suggested fix

Use the actual configured branch name (falling back to the default) when building the message, e.g. thread options.branch || "work-queue" through to the log string instead of the literal text. This keeps the diagnostic accurate for non-default deployments and matches the existing not-yet-addressed review comment on this same line.

@copilot please address this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The activation diagnostic now names the configured branch (with WORK_QUEUE_BRANCH as the default). Fixed in b58cc77f.

@github-actions github-actions Bot 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.

Impeccable review (refactor/cleanup — distill)

Reviewed the clarified ESLint-factory activation message and its new regression test / docs addition.

Findings:

  • The new latest.sha === null branch in the nested ternary at write_work_queue_snapshot.cjs is logically correct and matches the new test and docs wording ("administrator must protect the work-queue branch and install Policy"), consistent with existing deploy-work-queue docs.
  • Non-blocking: the ternary is now 4 levels deep on one ~417-character line, well past the repo's 240-char printWidth. Left an inline suggestion to extract a small helper function for readability.
  • No correctness, security, or test-coverage issues found; the new test covers the exact scenario described in the PR body.

No blocking issues — approving with one optional readability suggestion.

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · copilot · sonnet50 · 95 AIC · ⌖ 13.1 AIC · ⊞ 8.1K

configuration.core.setOutput?.("work_queue_origin", canonical(snapshot.origin));
configuration.core.info(
`Work queue activation: ${worker ? `${worker.claims.length} immutable Claims authenticated${staged ? " for staged preview (not bound)" : " and bound"}` : runtime.role === "observer" ? "read-only observer" : "unassigned queue-control context"}; snapshot captured`
`Work queue activation: ${worker ? `${worker.claims.length} immutable Claims authenticated${staged ? " for staged preview (not bound)" : " and bound"}` : latest.sha === null ? "queue uninitialized; an administrator must protect the work-queue branch and install Policy before workers can be dispatched" : runtime.role === "observer" ? "read-only observer" : "unassigned queue-control context"}; snapshot captured`

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.

This nested ternary is hard to parse at a glance, and the resulting template-literal line is ~417 characters (vs. the repo's printWidth: 240 in .prettierrc.json). The logic itself is correct (verified: when worker is falsy and latest.sha === null, the new branch wins before the observer/default branches), but consider extracting the message selection into a small helper function for readability, e.g.:

function activationMessage({ worker, staged, latest, runtime }) {
  if (worker) return `${worker.claims.length} immutable Claims authenticated${staged ? " for staged preview (not bound)" : " and bound"}`;
  if (latest.sha === null) return "queue uninitialized; an administrator must protect the work-queue branch and install Policy before workers can be dispatched";
  if (runtime.role === "observer") return "read-only observer";
  return "unassigned queue-control context";
}

Non-blocking, but would improve maintainability for future edits to this message.

@copilot please address this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Extracted activation message selection into activationMessage; it now also includes the configured queue branch for an absent queue. Fixed in b58cc77f.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot address the following outstanding work in one pass:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (actions/setup/js/write_work_queue_snapshot.cjs:70): This hard-codes the default branch even though main accepts options.branch and loadQueue forwards it (work_queue_binding.cjs:36). For an absent custom queue, the log would tell the administrator to protect the unrelated work-queue branch. Name the configured branch or use a generic "queue branch" message. - Clarify why the ESLint factory cannot dispatch workers #67217 (comment)
  3. Review (actions/setup/js/write_work_queue_snapshot.test.cjs:191): This assertion hard-codes work-queue, so the regression test will still pass while the runtime tells operators to protect the wrong branch whenever a workflow uses options.branch. - Clarify why the ESLint factory cannot dispatch workers #67217 (comment)
  4. Review (actions/setup/js/write_work_queue_snapshot.cjs:70): [/grill-with-docs] The new log text hardcodes the literal string "work-queue branch", but loadQueue (work_queue_binding.cjs:36) already forwards a configurable options.branch. If a custom branch is ever used, this message will mislead the administrator about which branch to protect. - Clarify why the ESLint factory cannot dispatch workers #67217 (comment)
  5. Review (actions/setup/js/write_work_queue_snapshot.cjs:70): This nested ternary is hard to parse at a glance, and the resulting template-literal line is ~417 characters (vs. the repo's printWidth: 240 in .prettierrc.json). The logic itself is correct (verified: when worker is falsy and latest.sha === null, the new branch wins before the observer/default branches), but consider extracting the message selection into a small helper function for readability. - Clarify why the ESLint factory cannot dispatch workers #67217 (comment)

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: 9e0ba6a
Sous-chef work: 11fc8f020c76102d13e0efb20604890641c33fb54cbf6464cf617761a0c2b430 213e81ae2346426ebcc7905453bba75fb3fded4745354ce15e020d5ec0cb7d43 8631772093f6c344fb99eaa3a8c256af6bcffcaaa04994a046bf5bff76638def d3e3d8076923e7bd367147455b7b50407c6dcd0054a0d97534a4f0e1ad136f63
Sous-chef state: a6e19d7775632219ca148141a0685c696fa939af0fb5d7151065d753530fd081

Generated by 👨‍🍳 PR Sous Chef · pi · haiku45 · 9.66 AIC · ⌖ 8.02 AIC · ⊞ 1K · ◷
Comment /souschef to run again

…slint-factory-work-queue

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Copilot AI and others added 2 commits October 9, 2026 16:55
…slint-factory-work-queue

# Conflicts:
#	actions/setup/js/work_queue_replay.cjs
#	pkg/workqueue/policy.go

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

@copilot merge main and fix conflicts

Merged the latest main, resolved the checkpoint/bootstrap conflicts, and added the replay safety fixes in 515b0ece.

@pelikhan

pelikhan commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Copilot AI and others added 2 commits October 9, 2026 18:42
…slint-factory-work-queue

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

@copilot merge main, fix https://github.com/github/gh-aw/actions/runs/37963995920/job/113968184025#step:4:1

Merged the latest main and fixed the integration build by moving parseMaintenanceJobs into an untagged test helper in a81eacc48e. The failing integration test command now passes locally.

@pelikhan

pelikhan commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

@pelikhan

pelikhan commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

@copilot fix https://github.com/github/gh-aw/actions/runs/37976228954/job/113985130553#step:4:1

Fixed in 27163d1: the AGY conformance tests now account for the work-queue worker’s scoped permissions, worker-only configuration, and CLI proxy setup.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

@copilot fix https://github.com/github/gh-aw/actions/runs/37976228971/job/113985157367#step:7:1

Fixed in the latest commit: updated the stale assertion to verify automatic bootstrap with compiler-approved Policy and Work, while retaining the guard against choosing or modifying Policy.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot address the following outstanding work in one pass:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.

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: 708cbbf
Sous-chef work:
Sous-chef state: fdecfab7089a4165129d2984710f8c656d8b27b74c2774977b804fc995ecf42c

Generated by 👨‍🍳 PR Sous Chef · pi · haiku45 · 4.56 AIC · ⌖ 6.99 AIC · ⊞ 1K · ◷
Comment /souschef to run again

@pelikhan

pelikhan commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts on this branch.

…slint-factory-work-queue

# Conflicts:
#	pkg/workflow/agy_engine_test.go
#	pkg/workqueue/replay.go

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

@copilot address the following outstanding work in one pass:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes....

Merged the latest main and resolved the replay and AGY conformance conflicts in fe5c200. Local build, recompile, lint, and impacted tests pass.

@pelikhan
pelikhan merged commit 7745f43 into main Oct 9, 2026
2 of 3 checks passed
@pelikhan
pelikhan deleted the copilot/investigate-eslint-factory-work-queue branch October 9, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants