fix: CI/packages hardening sub-slices — pin action SHAs + --all guard (#88), manifest .part/top-level-gguf (#89)#117
Merged
Conversation
…#88), manifest .part/top-level-gguf (#89) #88 (CI/CD hardening): - Pin every GitHub Action in ci.yml + release.yml to its full commit SHA (actions/checkout, setup-node, upload-artifact @v7; softprops/action-gh-release @V3), each keeping a trailing `# vN` marker dependabot still tracks. Behavior unchanged — only the ref is pinned. - Tighten tests/test-ci-artifacts.sh's workflow-lockstep grep to require `git bundle create … --all`, so a future edit dropping `--all` (a shallow, unclonable bundle) fails CI. Added a floating-tag lint asserting no `@vN` action refs remain across both workflows. (24/0) #89 (packages manifest correctness) — scripts/server.js computePackages: - Filter in-progress entries from /api/packages: a `*.part` partial or a tool/ model dir mid-extraction (holding a `.tmp_*` temp) is no longer advertised as a ready package, matching the ZIM enum's existing `.part` discipline. - Enumerate top-level single `.gguf` files directly under the model root (the flat layout getModelsStatus supports), served at /api/archive/models/<name>. - Extended tests/test-packages.sh: an in-progress `.part`/mid-extraction dir is NOT listed; a top-level `.gguf` IS listed. (8/8) Learnings baked into docs/knowledge/gotchas.md (anchors ci-sha-pin-88, pkg-inprogress-89, pkg-toplevel-gguf-89). Part of #88 Part of #89 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jul 18, 2026
mvalancy
added a commit
that referenced
this pull request
Jul 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Accumulated review follow-ups on the #88 (CI/CD) and #89 (packages) epics, landed as one minimal PR. Each sub-slice was independently re-verified against the code before fixing.
#88.1 — assert
--allin the artifact validatorWhat: tightened
tests/test-ci-artifacts.sh's workflow-lockstep grep fromgit bundle createtogit bundle create .*--all.Why: the bundle must be full-history —
bootstrap.shdoes a plaingit clone <bundle>. A future edit dropping--allwould ship a shallow, unclonable bundle yet still pass the old bare-substring grep.Test: verified the tightened grep matches the real
release.yml(has--all) and does NOT match a copy with--allstripped → CI would fail on the regression.test-ci-artifacts.sh24/0.#88.2 — pin GitHub Actions to commit SHAs
What: pinned every action in
ci.yml+release.ymlto the full commit SHA the tag points at, each with a trailing# vNmarker:actions/checkout@v7→@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7actions/setup-node@v7→@820762786026740c76f36085b0efc47a31fe5020 # v7actions/upload-artifact@v7→@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7softprops/action-gh-release@v3→@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3Why: a floating major tag silently follows whoever moves it — supply-chain exposure in a public repo. The SHA-pinned form is the hardened standard; dependabot still bumps it. Behavior/versions unchanged, only the ref is pinned. SHAs resolved via
gh api repos/<owner>/<action>/commits/<tag>(dereferences the annotatedaction-gh-releasetag to its commit; theactions/*tags are lightweight → commit directly), each cross-verified against both the refs and commits endpoints.Test: added a floating-tag lint in
test-ci-artifacts.sh(^…uses:…[^#]*@v[0-9],[^#]*so the# vNcomment never trips it) that fails if any workflow regresses to@vN; confirmed it stays quiet on the pinned+comment form and fires on a floating sample.#89.3 — filter in-progress /
.partdirs from/api/packagesWhat:
computePackages(sections 1 & 3) now skips a*.partsingle-file partial and a tool/model directory mid-extraction — one still holding a.tmp_*archive temp (written bydownload_and_extract, removed only on a successful extract), via a new_pkgInProgress()helper.Why: the ZIM enum already excludes
foo.zim.part, but the app/model enums listed every non-dotfile entry — so a half-fetchedmodel.gguf.partor a mid-extraction dir (reporting size 0) was advertised as a ready package.Test:
test-packages.shnow seeds a partial.gguf.part(in a category and at top level), a mid-extraction app dir and a mid-extraction model dir → asserts none appear; proven to leak against the pre-fix server.#89.4 — enumerate top-level single
.gguffilesWhat: added a pass over the model root listing each top-level
*.gguffile (models/<name>.gguf, no category dir) asmodel:<name>→/api/archive/models/<name>.Why:
getModelsStatussupports that flat layout, but the manifest only descended into category directories, silently dropping top-level models. Requiring the.ggufsuffix keeps a*.gguf.partpartial out for free.Test:
test-packages.shseedsmodels/toplevel.gguf→ asserts it's listed with the right size/url; proven absent against the pre-fix server.test-packages.sh8/8.Learnings
Baked into
docs/knowledge/gotchas.mdunder distinct anchors:ci-sha-pin-88,pkg-inprogress-89,pkg-toplevel-gguf-89.Notes
Zero-dep server preserved; web UI untouched; no network in tests (the only network was the one-time
gh apiSHA lookups during implementation). These epics have more slices — not a full fix.Part of #88
Part of #89
🤖 Generated with Claude Code