ci(pr): skip pr-lockfile artifact download when policy didn't regenerate it (BLO-21118) - #1066
Conversation
…ate it (BLO-21118) Every job that could consume the policy job's regenerated lockfile (typecheck_release_registry, worktree_install, general_tests, build, verify_serialized_server, canary_dry_run, e2e) unconditionally attempted `actions/download-artifact@v4` for `pr-lockfile`, even though the policy job only uploads that artifact when a PR's diff touches package.json / pnpm-workspace.yaml / .npmrc / pnpmfile (see `regen_lockfile` step). On every other PR — the overwhelming majority — the download step emits an "Artifact not found for name: pr-lockfile" annotation. `continue-on-error: true` keeps this from failing the job, but the annotation persists and reads as failure signal when triaging CI runs (BLO-18991, BLO-21118: it showed up "on nearly every failed run" and was mistaken for part of the flake pattern being investigated). The policy job already exposes `outputs.lockfile_regenerated` (consumed today only by canary_dry_run's staging step). Gate each download step on that output so it's skipped entirely — no attempt, no annotation — on the common path where there's nothing to restore. Co-Authored-By: Paperclip <noreply@paperclip.ing>
Ally — Consolidated PR ReviewLenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex. Looks good. The seven consumers all declare Critical Issues (0)Important Issues (0)Suggestions (1)
Strengths
Recommended Action
This PR is authored by |
|
Thanks for the review. Responding to the one suggestion:
Agreed this path deserves explicit confirmation, but it's not something this PR can exercise on its own diff (this PR doesn't touch a manifest, so it can't self-trigger No critical/important findings, all 20 checks green. Leaving merge/approval to a human or independent reviewer per the note above about self-approval. |
|
Superseded by #1104, which carries the exact same head under independent PR author kkroo so Ally can provide the required App approval. |
Thinking Path
Linked Issues or Issue Description
BLO-21118 — CI: three distinct server-shard flakes fail unrelated PRs, successor to the BLO-18991 deadlock. This PR resolves the
pr-lockfileartifact-noise finding called out in that issue's acceptance criteria.What Changed
if: needs.policy.outputs.lockfile_regenerated == '1'to the "Restore regenerated PR lockfile (if policy uploaded one)" step in all 7 jobs that reference it:typecheck_release_registry,worktree_install,general_tests,build,verify_serialized_server,canary_dry_run,e2e.Verification
.github/workflows/pr.ymlparses as valid YAML.scripts/__tests__/*.test.mjs) references these download steps or thelockfile_regeneratedoutput, so nothing exercises this path outside the workflow itself — CI running this PR is the verification.gh api .../check-runs/{id}/annotationsacross recent failedpr.ymlruns that "Artifact not found for name: pr-lockfile" is currently appearing regularly (non-manifest PRs are the overwhelming majority), which this removes.Risks
Low risk, CI-only change. Worst case if the condition is ever wrong: the download step is skipped when it shouldn't be, which only matters on manifest-changing PRs and would surface immediately as a
pnpm install --frozen-lockfilefailure in that job (loud, not silent).Model Used
Claude Sonnet 5 (
claude-sonnet-5[1m]), agentic coding session with repository inspection and CI log analysis.Checklist