Skip to content

[avenger] Fix stale work-queue integration fixtures - #67585

Merged
pelikhan merged 1 commit into
mainfrom
avenger/fix-work-queue-integration-2921-36e708552761f1aa
Oct 11, 2026
Merged

pelikhan merged 1 commit into
mainfrom
avenger/fix-work-queue-integration-2921-36e708552761f1aa

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

CI failure and repair

The first failed job in CI run 38100223336, Integration: Workflow Misc Part 2, exposed stale work-queue integration fixtures.

  • Expect the current AW-authorized policy environment for dispatcher workflows.
  • Preserve explicit-principal legacy coverage in non-strict fixture mode and isolate those compilers from this repository's aw.json scheduling configuration. Production strict-mode behavior is unchanged.
  • Provide the shared workflow imports required by the linter-factory documentation examples.
  • Match the dispatch mock against the workflow basename used by the native dispatch API adapter, retaining all identity-mismatch assertions.

Only four test/helper files changed; no production code or .github/workflows/ files are included.

Validation

  • Passed all five originally failing integration test groups: TestWorkQueueDispatchCredentialActualCompilation, TestWorkQueueNamedProfileCompilation, TestWorkQueueDispatchCompilerConfiguration, TestWorkQueueCompiledPolicyAndLaunchIdentity, and TestWorkQueueFactoryDocumentationExcerptsCompile (including their subtests).
  • Passed make fmt, make lint-cjs (existing warnings, zero errors), and git diff --check.
  • make agent-report-progress built the CLI, but the overall gate hit its 150-second budget after starting lint and impacted tests. It reported missing golangci-lint; no installation was attempted. Full Go lint and unit-test completion are not claimed.
  • The additional standalone Vitest command timed out after 45 seconds; the modified JavaScript helper was exercised successfully by the Go integration tests.

Environment limits

Fetching origin/main failed TLS certificate verification; verification was not bypassed. The available local origin/main was already merged and matched the failed CI revision (fed2eb5). No valid steering issue number was supplied, so steering comments could not be queried. The report_progress tool is unavailable in this run; the repair is committed locally for safe-output publication.

Generated by 🦸 Avenger · copilot · gpt60 · 287 AIC · ⌖ 68.1 AIC · ⊞ 20.2K · ◷

  • expires on Oct 12, 2026, 5:31 PM UTC-08:00

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review October 11, 2026 01:41
Copilot AI balanced review requested due to automatic review settings October 11, 2026 01:41
@pelikhan
pelikhan merged commit 3364ee6 into main Oct 11, 2026
11 checks passed
@pelikhan
pelikhan deleted the avenger/fix-work-queue-integration-2921-36e708552761f1aa branch October 11, 2026 01:42
@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ PR Code Quality Reviewer completed the code quality review.

Reviewed PR #67585 locally, but safeoutputs review submission was blocked by the harness: one attempt required unavailable approval and a second attempt was rejected by the shell guard. No GitHub write was emitted.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Ponytail Reviewer completed successfully!

Lean already. Ship.

Generated by Ponytail Reviewer for #67585

@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor Author

🧠 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 11, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ 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 #67585: has_implementation_label=false and default_business_additions=13 (<=100 threshold, no custom .design-gate.yml). Neither Condition A nor Condition B is met.

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

Copy link
Copy Markdown
Contributor Author

🔬 Test Quality Sentinel is analyzing test quality on this pull request...

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.

🟢 Approval recommended

The fixture updates consistently reflect existing production behavior without changing runtime code.

0 open findings

What changed in this PR

Updates stale work-queue integration fixtures to match current repository scheduling and dispatch behavior.

Changes:

  • Expect AW-authorized dispatcher policies.
  • Isolate legacy non-strict fixtures from repository configuration.
  • Add shared imports and correct dispatch workflow basename assertions.

Security review found no production regression; changes are test-only.

File Description
pkg/​workflow/​work_queue_persistent_memory_integration_test.go Links shared workflow imports into fixtures.
pkg/​workflow/​work_queue_dispatch_identity_integration_test.go Isolates legacy explicit-principal compilation.
pkg/​workflow/​work_queue_compilation_integration_test.go Updates strictness, isolation, and policy expectations.
actions/​setup/​js/​work_queue_control_adapter_checks.cjs Matches the native dispatch API’s basename behavior.

🧠 Review effort: Balanced


💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@github-actions github-actions Bot mentioned this pull request Oct 11, 2026

@github-actions github-actions Bot left a comment

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.

Skills-Based Review 🧠

Applied /diagnosing-bugs — this is a well-targeted root-cause repair, not a symptom patch. Approving with two minor suggestions.

📋 Key Themes & Highlights

Key Themes

  • Root cause verified, not papered over: The GH_AW_WORK_QUEUE_POLICY assertion flips track a real production change — .github/workflows/aw.json now configures work_queue, which work_queue_repo_config.go uses to set Authorization = "aw", causing the policy env var to always be emitted. The old NotContains assertions were simply stale, not something this PR is working around.
  • compiler.gitRoot isolation follows existing convention: Several other integration tests (compiler_repo_config_test.go, action_sha_validation_test.go, notify_comment_test.go) already set compiler.gitRoot to isolate fixtures from the real repo's aw.json. This PR applies the same pattern correctly to prevent the repo's scheduling config from leaking into legacy explicit-principal fixtures.
  • path.posix.basename(WORKFLOW) fix is correct: Confirmed in work_queue_native.cjs:135 and work_queue_provisioning.cjs:86 that production dispatch code already strips to basename — the mock assertion was stale, and this change correctly re-aligns it while preserving all identity-mismatch assertions.
  • Symlink fixture for shared imports: Minimal, scoped fix to provide the shared/ workflow imports the linter-factory doc excerpts require; no production code touched.

Minor suggestions (non-blocking)

  • Add a short inline comment explaining why the GH_AW_WORK_QUEUE_POLICY expectation flipped in work_queue_compilation_integration_test.go (lines 95-96 and ~604-605), consistent with the explanatory comments already added elsewhere in this PR (e.g. // Keep coverage of legacy explicit profiles...).
  • Consider one additional nested-path case in the .cjs fixture to make the posix.basename stripping assertion more meaningfully load-bearing.

Positive Highlights

  • ✅ Scope is tightly bounded — only test/fixture files touched, no production code or .github/workflows/*.lock.yml changes.
  • ✅ PR description includes clear validation evidence (which test groups pass) and is transparent about unverified items (full lint/unit suite, Vitest timeout).
  • ✅ Independently re-ran all five named integration test groups locally (go test -tags=integration) — all pass.

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

require.Equal(t, -1, mint)
}
require.NotContains(t, string(content), "GH_AW_WORK_QUEUE_POLICY:")
require.Contains(t, string(content), "GH_AW_WORK_QUEUE_POLICY:")

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.

[/diagnosing-bugs] Good fix — this flips the assertion to match current production behavior where GH_AW_WORK_QUEUE_POLICY is now emitted whenever aw.json configures work_queue (confirmed via work_queue_repo_config.go:100 setting Authorization = "aw"). One nit: add a short comment above this assertion explaining why the expectation flipped (repo-level aw.json now always triggers AW-authorized policy emission), mirroring the explanatory comments you added at lines 198 and the dispatch-identity test. That keeps the next person who touches this fixture from re-flipping it by mistake.

@copilot please address this.

assert.equal(dispatch.sender.run_attempt, 2);
assert.equal(parameters.ref, REF);
assert.equal(parameters.workflow_id, WORKFLOW);
assert.equal(parameters.workflow_id, path.posix.basename(WORKFLOW));

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.

[/diagnosing-bugs] Correct root-cause fix — verified work_queue_native.cjs:135 and work_queue_provisioning.cjs:86 already use posix.basename(destination.workflow) for dispatch calls, so this mock assertion was simply stale, not a workaround. Nice catch aligning the fixture with actual adapter behavior.

💡 Optional hardening

Consider adding one more case where WORKFLOW contains a nested path (e.g. shared/worker.lock.yml) to explicitly assert the basename-stripping behavior is intentional rather than incidental (since WORKFLOW is currently a flat .github/workflows/worker.lock.yml, basename happens to equal the filename and wouldn't fail even without posix.basename on the production side in simple cases).

@copilot please address this.

@github-actions

Copy link
Copy Markdown
Contributor Author

🧪 Test Quality Sentinel Report

✅ Test Quality Score: N/A — Infrastructure

Infrastructure-only change detected (fixture/setup modifications only). No behavioral tests were added or modified. Test files changed: 3 integration tests with fixture configuration corrections (+13 -2).

📊 Infrastructure Signals
Signal Value
Test files modified 3 Go integration
New behavioral tests 0
TestMain entries 0
goleak.VerifyTestMain entries 0
🚨 Hard violations 0

Changes reviewed:

  • Fixture configuration updates (strict: false)
  • Test setup initialization (compiler.gitRoot, symlink infrastructure)
  • Assertion corrections (fixture repairs, not new coverage)
  • All files have proper (go/redacted):build integration tags ✅

Verdict

✅ Passed. Infrastructure-only PR; behavioral test ratio not applicable. No violations detected.

🧪 Test quality analysis by Test Quality Sentinel · copilot · haiku45 · 83.2 AIC · ⌖ 8.37 AIC · ⊞ 8.2K · ◷
Comment /review to run again

@github-actions github-actions Bot left a comment

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.

Test Quality Sentinel: fixture repair PR with no new behavioral tests. Existing tests correctly repaired. ✅

🧪 Test quality analysis by Test Quality Sentinel · copilot · haiku45 · 83.2 AIC · ⌖ 8.37 AIC · ⊞ 8.2K
Comment /review to run again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants