Skip to content

ci(npu): never clean up the whole runner, and fail the repro when a Lemonade can't start - #6655

Merged
kovtcharov-amd merged 2 commits into
mainfrom
kalin/repro-npu-cleanup-guard
Nov 4, 2026
Merged

kovtcharov-amd merged 2 commits into
mainfrom
kalin/repro-npu-cleanup-guard

Conversation

@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

The NPU repro workflow from #6651 could kill every process on the shared Strix Halo runner, including the runner agent itself: its always-run cleanup searched for its work folder before that folder was set, so a failed checkout made the search match everything. The work folder is now set before anything else, and cleanup skips when it isn't set. A Lemonade version that can't start now fails the job (exit 2, as the script already documented) instead of showing green.

Test plan

  • pytest tests/unit/test_repro_npu_embedded.py (7 passed, including a new test for the exit-2 case)
  • CI green

…emonade can't start

The cleanup step matched processes by the repro's work folder, but that folder is only set after both checkouts. If a checkout failed, the always-run cleanup searched with an empty pattern, which matches every process the runner user owns. The work folder is now set first and the cleanup does nothing without it.

A Lemonade version that can't start (bad tag, missing asset) now exits 2 as the script documents, so the job goes red instead of reporting a failed cell.
@kovtcharov-amd kovtcharov-amd added this to the v0.25.4 milestone Nov 4, 2026
@github-actions github-actions Bot added devops DevOps/infrastructure changes tests Test changes labels Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Verdict: Approve

This fixes two problems in the NPU repro workflow. Cleanup could kill every process on the shared runner, and a Lemonade version that couldn't start showed green. Both fixes are correct and small. The work-folder variable is now set before any step can fail, cleanup exits early when it's empty, and a version that can't start now returns exit 2, which the workflow already treats as a failed job.

Real-world evidence

N/A: this is a CI workflow and a test-only repro script, with no user-facing CLI, API, MCP or UI surface. The verdict rests on static review. I couldn't re-run the new test here because pytest isn't installed on this runner, so the author's local "7 passed" and the PR's CI are the test evidence.

🔍 Technical details

Issues found: none blocking.

Checked

  • Linux cleanup (.github/workflows/repro_npu_embedded.yml): moving "Paths for this run" ahead of both checkouts means a failed checkout can no longer leave REPRO_WORKDIR unset. The [ -n "${REPRO_WORKDIR:-}" ] || exit 0 guard covers any remaining path where it is unset. The step's own script lives under _temp/, not npu-repro, so pgrep -f won't match its own shell.
  • The Windows cleanup was already guarded (if ($root)), so no sibling path is left on the old behaviour. It still sets REPRO_WORKDIR inside the install step rather than first. That's harmless because of the guard, but a failed install there leaves the workdir uncleaned. Optional.
  • run_all (util/repro_npu_embedded.py:711) now returns 2 on any fatal record, which matches the module docstring ("2 when the run could not start"). Both workflow jobs fail on code -ge 2, so the job goes red as the PR describes. Cell failures still return 1, which the workflow treats as a finding rather than a broken run.
  • The new test lives under tests/unit/, so the unit lane collects it. It drives the real run_all with a stub spawn that writes a fatal record for one version, which tests the exit-2 contract and not a mock of it.
  • Known bug classes: this PR directly fixes the "teardown that stops something GAIA did not start" class.

Strengths

  • The guard comment is one line and explains why the check exists.
  • The test pins the exit-code contract the workflow depends on, so a later refactor can't make a broken run green again without failing the test.

@github-actions github-actions Bot added the website GAIA website (amd-gaia.ai) label Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Skill audit

Skill Verdict Claimed tier Cleared tiers Findings Rules
.claude/skills/gaia-release ✅ ALLOW experimental experimental, community none —
.claude/skills/github-issue-response ✅ ALLOW experimental experimental, community none —

✅ All audited skills cleared the tier they claim.

Per-finding detail is withheld here on purpose. Read it in the Security > Code scanning tab, or download the skill-audit-reports artifact from this run. Offending source text is withheld from CI everywhere — reproduce it locally with gaia skill audit <dir> --show-snippets.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Verdict: Request changes

🟡 The Strix Halo commit also rewrites about 100 unrelated files under website/ and workers/ (the admin, agent-hub and website-router Workers) with Windows line endings. Nothing in their content changed, but the PR now shows ~24K added and ~24K deleted lines, GitHub can't render the diff, and anyone who later edits or blames those files gets churn that has nothing to do with this CI fix. Drop those files from the commit so it touches only test_linux_strix_halo.yml. The NPU repro and cleanup-guard changes are still fine.

🔍 Technical details
  • Commit 27b268170 changes 105 files. Every hunk outside .github/workflows/test_linux_strix_halo.yml swaps LF for CRLF with the content unchanged (for example website/tailwind.config.mjs, workers/agent-hub/Dockerfile and every workers/admin/migrations/*.sql file now end each line with ^M).
  • This most likely comes from a Windows checkout with core.autocrlf off, or from an editor that normalized the files on save.
  • To fix it: git checkout origin/main -- website workers, then amend or add a fix-up commit, and check that git diff origin/main --stat lists only the four CI and repro files.
  • To stop it from happening again, consider adding * text=auto eol=lf to .gitattributes. That belongs in a separate PR, so it isn't required here.

@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit a02461f Nov 4, 2026
39 of 40 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the kalin/repro-npu-cleanup-guard branch November 4, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops DevOps/infrastructure changes tests Test changes website GAIA website (amd-gaia.ai)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant