Repository navigation
ci: publish @moq/libav and its sources to nix.moq.dev - #7902
Conversation
Quest-Claim: 75f77211c989a4e5
Check's `bun install` builds `moq-libav` outside the dev shell, so the Cache workflow never pushed it and every hosted Check compiled it from source, fetching ffmpeg, opus and emfiberthreads from their upstream mirrors. Push the built package and a link farm of everything its build downloads alongside the dev shell. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 24 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 671bf39
No actionable code findings. The source farm retains the three upstream tarballs, libav.js source and npm dependencies, and the cache script pushes both the package and source closures after the dev shell. The existing main-only cache-write workflow remains in place.
Overall direction: the implementation addresses the missing cache roots. Deployment verification remains outstanding: a successful main Cache run and a subsequent clean Check substituting these paths are needed to establish the deleted quest's no-upstream-fetch outcome; a narinfo HTTP 200 alone does not establish that outcome.
Verification limits: GitHub source review only, including the pinned Nix helper implementations. I did not run Nix builds, upload to the cache, or exercise substitution on any platform.
(Written by review (OpenAI))
There was a problem hiding this comment.
ℹ️ No critical issues — one minor suggestion inline.
Reviewed changes
js/libav/package.nix— adds asourcespassthrulinkFarmover the three fetched tarballs, the libav.js source, and theimportNpmLockdeps.sh/gh/cache.sh— after the dev-shell push, buildsmoq-libavandmoq-libav.sourcesand pushes both out-links tonix-ci-moq-dev.cache.yml/.github/justfile/infra/README.md— renames the step and documents that Cache now publishesmoq-libavand its sources.quest/m0/ci/— deletes the completedlibav-sourcesquest and its index bullet.
The mechanism checks out: Check runs on aarch64-linux (ubuntu-24.04-arm), Cache has a matching leg, wasm.src is forced at evaluation by importNpmLock, and the fixed-output paths are nixpkgs-independent, so substituting them works across a flake.lock bump.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏
moq-libav copies the wasm build's files instead of referencing them, so pushing its closure left the wasm derivation behind. A change to the package alone (version bump, README, index.d.ts) would then recompile ffmpeg in Check. Build and push .#moq-libav.wasm alongside it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 9cc461c
No new actionable findings. The update addresses the missing wasm cache root: sh/gh/cache.sh now builds the package, wasm output and source farm, then passes all three out-links to the existing closure-upload recipe. Because the package copies rather than references the wasm files, publishing that output separately preserves reuse across package-only changes. The glob is confined to the fresh temporary directory and excludes the dev-shell links.
Overall direction: the targeted fix closes the cache-root omission. The earlier deployment-verification limit remains: confirm a successful main Cache run and clean Check substitution, including a package-only rebuild, before treating the operational outcome as proven.
Verification limits: GitHub-only source/delta review; no Nix build, cache upload or substitution was run.
(Written by review (OpenAI))
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
sh/gh/cache.sh— builds.#moq-libav.wasmalongside the package and sources, then pushes all three out-links with the"$roots"/libav*glob. This closes the prior finding: the package copies${wasm}/*, so its closure never referenceswasm, and a package-only change now still substitutes the ffmpeg compile.infra/README.md— documents that Cache publishesmoq-libav, its wasm build, and its downloaded sources.
The out-link numbering (libav, libav-1, libav-2) matches the corrected push, and a fresh mktemp -d per run means the glob can't pick up stale links. shellcheck and bash -n pass. The earlier inline thread is resolved.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

Problem
Check failed twice on 2026-11-03/04 because
ffmpeg.orgwas unreachable: moq-dev/moq#7685 and moq-dev/moq#7760 (run 41777407147: "cannot download ffmpeg-9.0.tar.xz from any mirror").Root cause:
moq-libavwas never onnix.moq.dev. The rootpostinstall(js/libav/build.ts) runsnix build .#moq-libavoutside the dev shell, andsh/gh/cache.shpushes only the dev shell's closure. So every hosted Check compiled ffmpeg to WebAssembly from source and downloadedffmpeg-9.0.tar.xz,opus-1.6.1.tar.gz,emfiberthreads-1.3.tar.gz, the libav.js tag from GitHub, and terser's npm tarballs. On 2026-11-04, before this change,https://nix.moq.dev/<hash>.narinforeturned 404 for bothmoq-libavand itswasmderivation on x86 Linux, ARM Linux and ARM macOS. Run 41777407147's log shows it buildingffmpeg-9.0.tar.xz.drv,libav.js-opus-aac-af-6.10.9.0.drvandmoq-libav-0.1.0.drv.Approach
js/libav/package.nixadds asourcespassthru: alinkFarmover every download the wasm build makes (three tarballs, the libav.js source, and theimportNpmLockdeps). Its closure is about 36 MB.sh/gh/cache.shbuilds.#moq-libav,.#moq-libav.wasmand.#moq-libav.sourcesafter it pushes the dev shell, then pushes all three tonix-ci-moq-devon every Cache matrix leg.moq-libavcopies the wasm build's files instead of referencing them, so its closure is just its own path. Pushingwasmseparately means a change to the package alone (a version bump, the README,index.d.ts) still substitutes the ffmpeg compile.infra/README.md,.github/justfileandcache.ymlnow mention it.Impact
moq-libavderivation and its output are unchanged; only its passthru grows.moq-libavon each leg whenever its derivation changes. Once that's done, hosted Check skips the ffmpeg wasm compile entirely.Choices made without asking
moq-libav. Cache runs on main pushes only, and the dev shell is pushed first, so a libav failure still fails the job without blocking the dev shell.linkFarmpassthru instead of listing each fetcher incache.sh, so a new download inpackage.nixis covered automatically.curl -sI https://nix.moq.dev/$(nix eval --raw .#packages.aarch64-linux.moq-libav.outPath | cut -d/ -f4 | cut -d- -f1).narinfo(expect 200).Validation
nix build .#moq-libav .#moq-libav.wasm .#moq-libav.sourcesbuilt all three on x86 Linux. The out-links arelibav(the package),libav-1(wasm) andlibav-2(sources), andcache.shpushes them all with"$roots"/libav*.nix path-info -ron the package lists only itself, which confirms thatwasmneeds its own push. The sources closure is 24 paths, about 36 MB: the three tarballs, the libav.js source, and the npm tarballs.shellcheck sh/gh/cache.sh,just gh check(actionlint, zizmor, test-inventory),quest check --base origin/main: pass.cache.shhas no tests of its own.quest gate nix develop --command just ci origin/main: biome, js, markdown, gh, workers, quest, shell, and the text/toml/nix/justfile lints all pass.check flakefails building the runner image:unshare: write failed /proc/self/uid_map: Operation not permitted. This is pre-existing.checks.x86_64-linux.github-runner-vm-imageevaluates to the same derivation (zp08za9k...-vm-test-run-github-runner-vm-image.drv) on this branch and on its base f37d964, and quest/m2/audit-ci.md already records it as reproducing on main.main, with thecache-writeEnvironment.Overlap
moq-dev/moq#7662 (draft) adds a separate runtime job to
cache.ymland its ownsh/gh/cache-runtime.sh. The work doesn't overlap, but both PRs edit the sameinfra/README.mdparagraph, so whichever lands second needs a simple text merge.Follow-ups
None.
Review
Codex,
gpt-6.1-sol, medium effort, reviewed head9cc461c8978095bedce76fe6620f17dbac16f87dagainstorigin/main(round 2). It reported no findings. Round 1, on671bf39c37, also reported none.pullfrog's inline finding (the wasm build wasn't published) was valid. It is fixed in 9cc461c and the thread is resolved.
(Written by Claude Opus 5.5)