Skip to content

Harden uncertain work queue launch recovery and diagnostics - #76331

Merged
pelikhan merged 4 commits into
mainfrom
pelikhan-automatic-fiesta
Nov 9, 2026
Merged

pelikhan merged 4 commits into
mainfrom
pelikhan-automatic-fiesta

Conversation

@pelikhan

@pelikhan pelikhan commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Why

GitHub can return HTTP 500 after successfully creating a worker run. In dispatcher run 42593076813, the Codex worker launched despite the failed response. Reporting an unresolved launch without attempting bounded recovery makes these incidents harder to diagnose.

Approach

Reuse the existing authenticated, bounded reconciliation path for the original reservation after an ambiguous dispatch response. Never resend the launch POST or cancel the worker. Missing, conflicting, or unavailable evidence leaves the reservation fenced; concurrent worker activation can resolve the original launch.

Add always-visible, sanitized recovery diagnostics for marker persistence, elapsed time, binding/release/conflict outcomes, and disabled resends. Preserve the durable start fence even if uncertain-marker publication fails. Update the operator reference and add a patch changeset.

Validation

  • npm --prefix actions/setup/js run test:js -- work_queue_dispatch.test.cjs work_queue_logging.test.cjs --reporter=dot: 381 tests passed.
  • make agent-report-progress: passed, including build, changed-file lint, typecheck, and 210 dispatch tests. No changed Go files required impacted Go tests.
  • Coverage includes server and transport failures after launch, absent/unavailable/conflicting evidence, concurrent activation, failed recovery reads, one-POST fencing, cancellation suppression, and log redaction.
  • No live queue mutations or workflow dispatches were performed.

Review note

The initial security review passed with no confirmed vulnerabilities. The runtime implementation is unchanged since that review. One mocked failure fixture was subsequently corrected and now passes, but same-reviewer follow-up was unavailable; the initial verdict does not cover that test-only correction.

@pelikhan
pelikhan marked this pull request as ready for review November 9, 2026 22:48
Copilot AI adaptive review requested due to automatic review settings November 9, 2026 22:48
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

PR Specification Reviewer

Outcome: reported_no_action

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.

Generated from PR Specification Reviewer · gpt56 · ~3 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 1.6K · ◷

Generated by PR Specification Reviewer for #76331

@github-actions

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

Design Decision Gate 🏗️

Outcome: reported_no_action

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.

Generated from Design Decision Gate 🏗️ · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 8.5K · ◷

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills...

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

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.

Generated from Ponytail Reviewer · routed: gpt61 medium · ~5 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 181 · ◷

Generated by Ponytail Reviewer for #76331

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

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.

Generated from Test Quality Sentinel · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 7.2K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

@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.

Reviewed the changed launch recovery, tests, and documentation. No actionable correctness, security, performance, or maintainability issues found in the changed lines. The recovery path preserves the start fence, disables resend/cancellation, uses bounded reconciliation, and maps outcomes into the existing controls success/recovery accounting. Static review only; repository code was not executed per review constraints.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again

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

HTTP 204 or malformed 200 receipts can incorrectly pass controls through worker discovery during reconciliation, bypassing the required receipt contract.

1 open issue
What changed in this PR

This PR hardens gh-aw’s work-queue dispatcher when a worker launch may have succeeded despite a failed response, reusing existing reconciliation and reservation fencing.

Changes:

  • Attempt bounded recovery of the original reservation without resending the launch or cancelling the worker.
  • Add sanitized, always-visible recovery diagnostics while preserving the durable start fence.
  • Expand recovery tests, update operator guidance, and add a patch changeset.
File Description
docs/​src/​content/​docs/​reference/​work-queue.md Documents inline recovery, diagnostic events, and retained reservation fencing.
actions/​setup/​js/​work_queue_dispatch.test.cjs Adds ambiguous-response, evidence-failure, and concurrent-activation coverage.
actions/​setup/​js/​work_queue_dispatch.cjs Reconciles uncertain launches and reports sanitized recovery outcomes.
.changeset/​patch-work-queue-ambiguous-launch-recovery.md Records the recovery and diagnostics changes for a patch release.

Review effort: Max (auto)

const recoveryStarted = Date.now();
log.diagnostic("launch.recovery.start", { uncertain_marker_persisted: uncertainMarkerPersisted, resend_allowed: false });
try {
const recovered = await reconcileDispatch({ ...options, assignment, requestCancellation: false });
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Fix failing check conclusion (FAILURE): Check run.
  3. Fix failing check JS Tests (shard 8/8) (FAILURE): Check run.
  4. Fix failing check JS Tests (shard 8/8) (FAILURE): Check run.

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "993825db33f283680d8149a4a8e7e9910cfc5269",
  "kind": "requested",
  "schema_version": "1",
  "state": "2fd07cb37ca8f72e88e02d99eb5677158390d54b98183329039946e3259079af",
  "work": [
    "27ac911a80a91d6b02a3e07caef39b800cb632677606247471a58f9a93975854",
    "51e2287c3d1ee41b7e13769862add61dcd292a623cf943abc5968c984e246bcf"
  ],
  "workflow": "pr-sous-chef"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 high · ~2 AIC · ⌖ ~2 AIC · ⊞ 6.9K · ◷
Comment /souschef to run again

Copilot AI commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:...

Updated from main with make merge-main in 108195f. Fixed both reported JS failures by removing the unused YAML parser dependency in 5d754a2; temporary test fixtures were removed in 9b9de70. Shard 8 passes locally: 4,440 passed, 24 skipped. The final repository validation gate and secret scan passed; CodeQL timed out.

The conclusion failure remains unresolved: run 42715163832's reviewer exited without a terminal safe output, and the collector correctly reported missing_terminal_safe_output. I left that failure signal intact. No CI reruns, workflow dispatches, or PR merge were performed.

Copilot AI requested a review from gh-aw-bot November 9, 2026 23:48
@pelikhan
pelikhan merged commit 8dc103c into main Nov 9, 2026
33 of 34 checks passed
@pelikhan
pelikhan deleted the pelikhan-automatic-fiesta branch November 9, 2026 23:59
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.2.2

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