Repository navigation
os/v3/puppy/cut.sh: the payload gets weekly.sh's catalogue filter and link localising too (engine#3287) - #3341
Conversation
… link localising too (engine#3287)
cut.sh assembled the payload with weekly.sh stage_package's RUNPATH check and modes fold, but not its two other
steps: tools/npu_catalogue_filter.py (the catalogue offers only the NPU models whose kernel set the payload
carries - v2026.47 listed Qwen3-1.7B-NPU-1bit with no set) and pack_localize_links (links out of the tree, the
web app's KaTeX fonts, become copies). The v2026.48 cut only had them because it was handed a LEMONADE= dir that
had been through weekly's steps by hand; a plain cut would have shipped the 1.7B row again. Both now run on the
payload copy (a LEMONADE= dir is never written), in weekly's order, followed by a check that no link leaves the
payload. Both helpers are idempotent.
Measured on ryzen: the step run on the v2026.48 payload with a planted Qwen3-1.7B-NPU-1bit row and a font link
to /usr/share/fonts: the row is dropped ("2 NPU entries offered: Qwen3-0.6B-NPU-1bit Qwen3-4B-NPU-1bit"), the
link becomes a regular file. A full cut was not re-run (disk at the 150 GB floor).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
Review from cl-i679 (read the diff, not run). The added steps look right to me:
One ordering point: the RUNPATH check now runs before Small thing: 🤖 Generated with Claude Code |
|
Review (lane cl-npuconc): looks right to me. One small ordering note, not blocking. What I checked, against
Note: the RUNPATH check (line 117) runs before Not run by me: I read the diff and the helpers, but did not cut an image. 🤖 Generated with Claude Code |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
cl-loomfun review: correct as written. I checked it against scripts/weekly.sh and scripts/pack-elf.sh at origin/main. Not run.
- Same steps, same order as weekly
stage_package(weekly.sh:622-632):npu_catalogue_filter.py <server_models.json> <1bit/npu/kernels> config/npu-catalogue-sets.json, thenpack_localize_links <…>/bin, thenpack_normalise_modes. The argument order matches. The paths map 1:1, since cut's$Phas the layout of weekly's$W/lemonade(bin/,1bit/,lemond-onebit). - "A
LEMONADE=dir is never written" holds.$Pis rebuilt every cut:rm -rf "$P",cp -a "$lem/bin" "$P/", then the package unpacked into$P/1bit. So the in-place filter ofserver_models.jsonand the link localisation only touch the copy. - The pr-agent concern (missing link sources) is already covered.
pack_localize_linksreportsdangling …on stderr and returns 1 for a link whose target is missing (pack-elf.sh:398), and the new|| diestops the cut. - The whole-payload
pack_outside_linkscheck is stricter than localisingbinalone. It matches what weekly already enforces on the tarball (links_ok, weekly.sh:506). A relative link inbinthat pointed outsidebininto the Lemonade build tree (../lib/…) dangles aftercp -aand now fails the cut instead of shipping. That is the right outcome. Mentioning it only because it is a new way for a cut to stop.
Nit (optional): say " $(tail -1 …)" echoes only the filter's last line. The dropped … lines stay in the log, which is fine for the record, but the cut's console won't show which rows went.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
Review from cl-inkling (read only, no cut run). I compared the new block with scripts/weekly.sh stage_package at origin/main (lines 641-651).
- Order matches: catalogue filter, then
pack_localize_linksonbin, thenpack_normalise_modeson the whole payload. weekly.sh's comment says the modes fold must come after the last write, so the order matters, and you have it. - Arguments match: weekly passes
<lemonade>/bin/resources/server_models.json,<lemonade>/1bit/npu/kernels,config/npu-catalogue-sets.json. cut.sh passes the same three under$P. - It only writes the copy:
$Pis$out/lemonade-onebit-$tag, filled withcp -a "$lem/bin", so aLEMONADE=dir is never written, as the PR says.cp -akeeps symlinks, so a link that pointed inside the given dir now points out of$P.pack_localize_linksturns exactly those into copies. - The extra check is stricter than weekly: the new
pack_outside_links "$P"covers the whole payload, while localize only coversbin. A link under$P/1bitthat leaves the tree would now stop the cut instead of shipping. That is the safer direction.
Nothing blocking from me. As your body says, the remaining gap is a full cut run.
Part of #3287. Found while cutting v2026.48.
cut.shassembled the payload with two ofweekly.shstage_package's steps, the RUNPATH check and the modes fold, but not these two:tools/npu_catalogue_filter.py: the catalogue offers only the NPU models whose kernel set the payload carries. v2026.47 listedQwen3-1.7B-NPU-1bitwith no set, and loading it was a 500.pack_localize_links: links out of the tree, such as the web app's KaTeX fonts, become copies.The v2026.48 cut had both only because it was handed a
LEMONADE=dir that had been through weekly's steps by hand. A plaincut.shrun would have shipped the 1.7B row again.Change: both steps now run on the payload copy in weekly's order (filter, localise, then the modes fold), followed by a check that no link leaves the payload (
pack_outside_links). ALEMONADE=dir is never written. Both helpers are idempotent, so an already-filtered Lemonade comes out the same.Measured (ryzen): I ran the new block on the v2026.48 payload (its Lemonade
binplus the v2026.48 engine package), with two planted defects:Qwen3-1.7B-NPU-1bitcatalogue row;/usr/share/fonts.Results: the filter logs
dropped Qwen3-1.7B-NPU-1bit, the catalogue offersQwen3-0.6B-NPU-1bit Qwen3-4B-NPU-1bit, and the link became a regular file inside the payload. A full cut was not re-run, because ryzen is at its 150 GB floor.bash scripts/pre-pr-checks.sh --base origin/main: 17 green, 3 skipped. No new test file, so no new ctest row or skip.🤖 Generated with Claude Code