fix: repair CI workflow bugs found in pipeline audit#9312
Conversation
- test.yml: watchdog gate never ran (implicit success() wrapping); any label add cancelled in-flight test runs; push/merge_group only passed via null==false coercion - make event conditions explicit - build-unitycloud.yml: drop dead merge_group trigger (prebuild never handled the event, so queue runs skipped every job) - auto-sync-main-to-dev.yml: don't fail when a sync PR is already open; fix dangling line continuation - enforce-group-approvals.yml: count only each reviewer's latest state-changing review so superseded approvals don't satisfy the gate - pr-comment-*.yml: scope find-comment to the build badge comment so it can't overwrite other bot comments - test-performance.yml: Library cache key was constant (immutable cache pinned the first-ever entry forever); align with test.yml - test.yml/test-performance.yml: remove githubToken that referenced a never-defined env var - build-game-ci-image.yml: remove push trigger (inputs are empty on push, producing a malformed image tag) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Claude finished @mikhail-dcl's task in 4m 2s —— View job PR Review: fix/ci-workflow-bugsTasks
Step 1 — ContextCI-only PR: 8 YAML workflow files, 84 additions, 25 deletions. No C# or runtime code changes. No ECS, Unity, or architecture docs relevant. Step 2 — Root-cause checkAll 10 fixes target root causes, not symptoms:
Step 3 — Design & integrationNo new long-lived units, systems, plugins, or state introduced. All changes are corrections to existing workflow logic. Lifecycle ownership is not applicable to YAML workflows. The Step 4 — Member auditNo C# code — not applicable. Step 5 — Line-level reviewNon-blocking: Race condition in
|
|
Claude finished @mikhail-dcl's task in 2m 21s —— View job Security-focused review — CI workflow changes
Dependency / supply-chain reviewNo dependency changes exist in this PR. No edits to Workflow security review (STEP W)No HIGH or MEDIUM security findings are introduced by this PR. Checked and cleared:
Pre-existing (out of scope, not introduced here): the actions touched by this diff ( Correctness of the 10 fixes — verifiedThe bug analysis is solid and I confirmed the mechanics of the trickier ones:
One minor robustness note (non-blocking) —
|
|
🔒 Claude reviewed this PR — sensitive paths modified ( |
|
Superseded by #9314, which now targets dev and contains all three commits. |
Pull Request Description
What does this PR change?
Fixes ten defects found in a full audit of the CI pipelines. No behavior is added — each change makes a workflow do what its code already claims to do.
test.ymlwatchdog never ran (verified on real runs, e.g. run 28808093323: Lintfailure, watchdogskipped). Itsifhad no status-check function, so GitHub wrapped it in an implicitsuccess()— false exactly when a needed job fails. Nowalways() && (…).on: pull_request: types: [labeled]+ unconditionalcancel-in-progress: truemeant bot labels added mid-run (new-dependencyat the start of Dependency Security Review,claude-approved,no QA needed) killed a running 80-minute test job and replaced it with a run that skips everything. Cancellation and job conditions are now gated the same waybuild-unitycloud.ymlalready does it.test.ymlpush/merge_group runs only worked by accident. The explicit clause checkedrefs/heads/main, which the dev-only push trigger can never produce; dev pushes (which seed the warning baseline) passed only becausenull == falsecoerces to true in Actions expressions. Event handling is now explicit.build-unitycloud.ymldeadmerge_grouptrigger removed. Prebuild'sifnever matched the event, so merge-queue runs would skip every job and report green without building. If a merge queue is ever adopted, proper support must be added instead.auto-sync-main-to-dev.ymlfailed on every push to main while a sync PR was already open (gh pr createerrors on duplicates); also removed a dangling\line continuation.enforce-group-approvals.ymlcounted stale approvals. A reviewer who approved and later requested changes still satisfied the gate. Only each user's latest state-changing review (APPROVED / CHANGES_REQUESTED / DISMISSED) counts now; COMMENTED reviews don't supersede an approval.pr-comment-artifact-url.yml/pr-comment-delete-artifact-url.ymlmatched the firstgithub-actions[bot]comment of any kind and overwrote it — the warning-ratchet and ext-contribution comments share that author. Now scoped withbody-includes: img.shields.io/badge/Build(present in all badge bodies, so existing PR comments keep working).test-performance.ymlLibrary cache never updated — constant keyLibrary-Explorer-Ubuntuon an immutable cache pinned the first-ever entry forever. Now uses the samehashFiles(...)key + restore-keys astest.yml(and shares its cache).githubToken: ${{ env.GITHUB_TOKEN }}in both test workflows referenced an env var that is never defined — removed the dead config (check reporting already goes through dorny/test-reporter).build-game-ci-image.ymlpush trigger removed — on push allinputs.*are empty, producing image tag…:--and empty build args.Flagged, not changed (needs a maintainer decision):
build-unitycloud.ymldeclares 12workflow_dispatchinputs; GitHub documents a limit of 10. No dispatch runs exist in the last 100 runs to confirm whether manual dispatch still works. If it is broken, two inputs need to be merged or dropped (e.g. the two delta thresholds).All changed files pass
actionlint(only pre-existing findings remain repo-wide).Test Instructions
CI-only change — there is no client behavior to run; verification is on the workflows themselves.
Steps (standard run): N/A (no Explorer/ changes; the build/test pipelines will skip or run unchanged on this PR).
Prerequisites
Test Steps
watchdogjob appears (it should beskippedwhen lint+tests pass).no QA needed) while a Unity Test run is in flight → the run must NOT be cancelled.force-lint→ lint re-runs; tests are not restarted.dev→ Unity Test still runs (baseline update path) — this exercises the explicit non-PR event condition.QA and DEV Approvalsmust report the approval as missing.Additional Testing Notes
img.shields.io/badge/Build), so no duplicate badge comments should appear on open PRs.merge_grouptrigger changes nothing observable.Quality Checklist
🤖 Generated with Claude Code