Repository navigation
fix(kit): aur builder fails loudly on zero produced packages (R8) - #4
Conversation
The aur stage's `find … -exec cp` silently succeeds on zero matches, so a package that moved from the AUR into a repo (yay -S --needed installs it without building) produced an EMPTY /tmp/aur-pkgs copy layer that was committed + cached — the masked failure behind the pgvector / check-cachyos-immich-ml-pod build failure. Add a guard: a non-empty aur: package list producing zero .pkg.tar.zst now exit 1s with a fix hint. Verified: rendering test asserts the guard follows the copy; shell logic exits 1 on empty dir, 0 with an artifact. Behavioral arch-test build rides the superproject consumer PR. Assisted-by: Claude (fully tested and validated)
pr-validator — APPROVED ✅Change class: code/config (sdk
Non-blocking note (pre-existing, out of scope): Decision: The diff appends Assisted-by: Claude (fully tested and validated) |
…-output guard) Assisted-by: Claude (fully tested and validated)
Summary
The
aurbuilder stage ended withfind /tmp/aur-build -name '*.pkg.tar.zst' -exec cp {} /tmp/aur-pkgs/ \;— which silently succeeds on zero matches. When a package listed under a candy'saur:block has moved from the AUR into a repo,yay -S --neededinstalls it from the repo without building, zero.pkg.tar.zstare produced, and an empty/tmp/aur-pkgsCOPY layer gets committed and cached — the masked failure behind the pgvector /check-cachyos-immich-ml-pod"could not find or read package" build failure (fixed separately by moving pgvector topackage:). Added a guard after the copy: a non-empty package list that produced no artifact nowexit 1s with a message pointing at the fix.Change class + gate
sdk (kit) library.
go build ./... && go test ./...green;TestAurStage_EmptyOutputGuardasserts the rendered stage carriesls /tmp/aur-pkgs/*.pkg.tar.zst … exit 1after thefind|cp. Guard shell logic proven:exit 1on an empty dir,exit 0when an artifact is present. The behavioral gate (a real arch aur build with a genuine AUR package —arch-test/yay-bin— that the guard must NOT break) rides the superproject consumer PR that bumps this pointer, per the SDK-first landing order.Tier: fully tested and validated.
Assisted-by: Claude (fully tested and validated)