Skip to content

Handle an absent work-queue branch during dispatcher activation - #67104

Merged
pelikhan merged 5 commits into
mainfrom
copilot/fix-github-actions-job
Oct 9, 2026
Merged

pelikhan merged 5 commits into
mainfrom
copilot/fix-github-actions-job

Conversation

Copilot AI commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

The ESLint Factory Dispatcher failed during activation when the work-queue branch had not yet been created. Snapshot creation treated genuine branch absence as a missing-Policy error.

  • Activation: Allow an authenticated dispatcher to capture the absent queue as an empty, uninitialized snapshot. Existing policyless ledgers and worker snapshots remain errors.
  • Dispatcher behavior: Exit with noop when the branch is absent; do not submit or dispatch work without installed Policy.
  • Coverage: Add regressions for absent-branch reads, summaries, and rejection of invalid existing queues.

Copilot AI and others added 3 commits October 9, 2026 03:41
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review October 9, 2026 04:21
Copilot AI balanced review requested due to automatic review settings October 9, 2026 04:21
@pelikhan

pelikhan commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts on this branch.

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 absent dispatcher still cannot emit the required noop because safe-output normalization rejects all unassigned-dispatcher messages.

2 open findings
What changed in this PR

Allows authenticated dispatchers to treat an absent work-queue branch as an uninitialized snapshot while preserving Policy validation.

Changes:

  • Supports absent-branch dispatcher snapshots and summaries.
  • Rejects existing policyless ledgers and worker snapshots.
  • Updates dispatcher guidance and regression coverage.

Security review found no permission or supply-chain weakening; compiler scanners were not run under review constraints.

File Description
actions/​setup/​js/​write_work_queue_snapshot.test.cjs Tests absent dispatcher snapshots.
actions/​setup/​js/​write_work_queue_snapshot.cjs Allows absent non-worker queues.
actions/​setup/​js/​work_queue_summary.test.cjs Tests absent-queue summaries.
actions/​setup/​js/​work_queue_summary.cjs Summarizes absent dispatcher queues.
actions/​setup/​js/​work_queue_mcp_server.test.cjs Tests snapshot validation.
actions/​setup/​js/​work_queue_mcp_server.cjs Loads absent non-worker snapshots.
actions/​setup/​js/​work_queue_documentation.test.cjs Updates workflow documentation assertions.
actions/​setup/​js/​work_queue_claim_scope.cjs Admits absent dispatcher scope.
.github/​workflows/​eslint-factory-dispatcher.md Directs absent queues to noop.
.github/​workflows/​eslint-factory-dispatcher.lock.yml Regenerates workflow metadata.

🧠 Review effort: Balanced

Comment on lines +141 to +142
if (snapshot.transactionLog === "" && !(snapshot.sha === null && role !== "worker" && (role !== "observer" || configuredRole === "observer")))
throw scopeError("work_queue_policy_missing: existing queues and workers require an installed Policy", "work_queue_policy_missing");

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.

Fixed in cb6cdb9: the safe-output append path now permits only noop for an absent dispatcher snapshot, with regressions rejecting queue-control messages, worker effects, ordinary dispatch, and existing policyless ledgers.

Comment on lines +54 to +55
`"uninitialized"` with a null snapshot SHA means the queue branch does not
exist yet. Treat it as an empty backlog and stop with `noop`; there is no

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.

Updated the shared work-queue guidance in cb6cdb9 to distinguish a null-snapshot_sha absent branch from an existing policyless ledger; workers still require Policy.

@pelikhan

pelikhan commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts on this branch.

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

Copilot AI commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts on this branch.

Merged origin/main and resolved the generated workflow lock conflict. Merge commit: 93172bd.

Copilot AI commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts on this branch.

The branch is already up to date with origin/main; merge commit 93172bd is present, and there are no unresolved conflicts.

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Great work on the dispatcher fix for the absent work-queue branch — the regression tests are a nice touch. This looks ready for review.

Generated by ✅ Contribution Check · copilot · auto · 41.5 AIC · ⌖ 0.61 AIC · ⊞ 9.2K · ◷

@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/work_queue_claim_scope.cjs:142): The newly admitted absent-dispatcher scope still cannot produce the required noop. readClaimScopeContext() now returns { assignment: null, ... }, but the safe-output append path calls normalizeRuntimeMessage(), which rejects every message for an unassigned dispatcher; an absent dispatcher calling {type: "noop"} therefore throws instead of exiting successfully. Permit only noop for this absent-dispatcher state (while continuing to reject worker effects and ordinary dispatch), and cover the actual safe-output append path. - Handle an absent work-queue branch during dispatcher activation #67104 (comment)
  3. Review (.github/workflows/eslint-factory-dispatcher.md:55): This new absent-branch behavior contradicts the shared work-queue authoring guidance at .github/aw/work-queue.md:90-92, which still says every uninitialized result is a deployment failure and not an empty backlog. Update that guidance to distinguish a null-SHA absent branch from an existing policyless ledger; otherwise future dispatcher workflows will continue implementing the old failure path. - Handle an absent work-queue branch during dispatcher activation #67104 (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: 93172bd
Sous-chef work: c2c31f539c2384cce02a9ae48cfe5cdfc42d9908c2a8a6d0ae77e08d9b657074 d4fd807fcf1a5573b4222cba150031a083bcd2f5090a24870f82f501ae4104a0
Sous-chef state: 4b0ed8191c41db476ccbf9d9a9087e74599b20cbc62da4db8a699e729e311d1e

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

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Copilot AI requested a review from gh-aw-bot October 9, 2026 05:26
@pelikhan
pelikhan merged commit faf0312 into main Oct 9, 2026
15 of 16 checks passed
@pelikhan
pelikhan deleted the copilot/fix-github-actions-job branch October 9, 2026 05:36
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.91.7

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