Repository navigation
fix(juicefs): bound the compose mount cache, fix the largest-free-mount survey, gateway sources the helper (#2501 follow-up) - #3491
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… unbounded site This PR's title claims "at all mount call sites"; this one was missed. Enumerating every real `juicefs mount` on the branch: mk/egress.mk:379 $JFS_CACHE_FLAGS bounded scripts/juicefs-cross-node-setup.sh $CACHE_FLAGS bounded docker-compose.juicefs-mount.yml:34 (nothing) UNBOUNDED So the documented `docker-compose.yml -f docker-compose.juicefs-mount.yml` flow — the path an operator is most likely to take — still inherited the JuiceFS default --cache-size 102400 (100 GiB in /var/jfsCache) and --free-space-ratio 0.1. That is precisely the kvm4-class disk exhaustion this PR exists to prevent. Rather than inline a copy of the df logic (compose renders on the host, the cache lives on the container's /data volume, so the measurement must run at container start), the canonical helper is bind-mounted read-only and executed in place, then its output spliced exactly as the two working call sites do. The empty-output refusal mirrors egress.mk:380 so a helper failure cannot degrade to an unbounded mount. Checked rather than assumed: juicedata/mount:ce-v1.3.0 ships /bin/bash and /usr/bin/awk, so it runs the helper unmodified. Verified by executing the exact command shape in that image — argv resolves to --cache-dir /data/jfsCache --cache-size 102400 --free-space-ratio 0.100 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…e mount
The df bracket was already right-anchored; the survey loop above it still read
positional $4/$6 via `read -r _fs _size _used avail _pct mnt`. A Filesystem name
containing spaces shifts every field after it. Measured on a Git-Bash host, where
df reports "/" as "C:/Program Files/Git":
avail=[1937292876] mnt=[97% /]
`avail` was the Used column and `mnt` was not a path, so the -d test rejected the
row and the survey dropped "/" — the largest-free mount — without a word, picking
a smaller one instead. Same root cause as the bracket, different failure: there it
was a loud division-by-zero, here it is a silently worse choice.
Anchors on Capacity (the only fixed-shape field, preceded by exactly three numeric
columns) instead of counting from either end. That pins the layout regardless of
how many words the Filesystem takes, and unlike counting back from NF it leaves a
mountpoint containing spaces intact — whether such a mount may be USED is the
JFS_CACHE_DIR whitespace contract, which this deliberately does not decide.
Verified by execution on this node:
before: Largest-free writable mount: /g (54.7 GiB)
after: Largest-free writable mount: / (57.6 GiB, was being skipped)
Synthetic df covering spaced device, spaced mountpoint, pseudo fs and a '- - - -'
backend parses all four correctly. Garbage df still reaches the conservative
floor (512 MiB), and the no-parsable-row case still falls back to $HOME.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…iving df
The gateway carried a compacted copy of the helper's df logic, and the copy had
already drifted into a third instance of the fixed-column bug:
awk 'NR==2{a=$4;t=$2; ...}'
`$4`/`$2` are the wrong columns the moment a Filesystem name contains a space, so
the gateway sized its cache off USED space and reported a plausible wrong number.
Fixing a third copy would leave a third copy to drift again — the same shape that
produced four copies of the cleanup recipe.
The helper is now bind-mounted read-only and run in the container, so there is one
implementation and the two compose services and two shell call sites share it. The
image can run it unmodified (verified: /bin/bash and /usr/bin/awk both present),
and the helper creates its own cache dir, so the explicit mkdir is gone. An empty
result now refuses to start rather than falling through to an unbounded gateway.
Verified by executing the command shape in juicedata/mount:ce-v1.3.0: argv resolves
to --cache-dir /data/jfsCache --cache-size 102400 --free-space-ratio 0.100 and
/data/jfsCache is created by the helper.
docker-compose.juicefs.yml regenerated via scripts/split_compose.py; --check clean.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one): 1
Please check the settings in the CodeRabbit UI or the
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
ORGSIM-MIRROR drift check (advisory, fail-soft)vv3 / 8 files / VERIFIED 124 / DRIFTED 10 / UNDECIDED 29 / digest d72317b00e7c Zero-LLM deterministic audit - unreachable = UNDECIDED, never dead - scripts/runbook_drift.py |
Docker Hardening ValidationHardening Validation ReportValidated: Thu Nov 19 20:52:36 UTC 2026Services CheckedPMOVES.AI compose hardening ratchet[INFO] Checking: /home/runner/work/PMOVES.AI/PMOVES.AI/pmoves/docker-compose.hardened.yml [INFO] Validating: agent-zero [INFO] Validating: archon [INFO] Validating: channel-monitor [INFO] Validating: comfy-watcher [INFO] Validating: deepresearch [INFO] Validating: extract-worker [INFO] Validating: ffmpeg-whisper [INFO] Validating: grayjay-plugin-host [INFO] Validating: hi-rag-gateway-gpu [INFO] Validating: hi-rag-gateway-v2 [INFO] Validating: hi-rag-gateway-v2-gpu [INFO] Validating: invidious-companion-proxy [INFO] Validating: jellyfin-bridge [INFO] Validating: langextract [INFO] Validating: media-audio [INFO] Validating: media-video [INFO] Validating: mesh-agent [INFO] Validating: nats-echo-req [INFO] Validating: nats-echo-res [INFO] Validating: notebook-sync [INFO] Validating: p7-room-orchestrator [INFO] Validating: pdf-ingest [INFO] Validating: pmoves-yt [INFO] Validating: presign [INFO] Validating: publisher-discord [INFO] Validating: render-webhook [INFO] Validating: retrieval-eval [INFO] Validating: supaserch =================================== |
|
Damage-control disclosure (4090-Claude, 2026-11-19). Some compose edits in this PR were made by a Python script in a non-project clone ( |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Docker Hardening ValidationHardening Validation ReportValidated: Thu Nov 19 21:59:23 UTC 2026Services CheckedPMOVES.AI compose hardening ratchet[INFO] Checking: /home/runner/work/PMOVES.AI/PMOVES.AI/pmoves/docker-compose.hardened.yml [INFO] Validating: agent-zero [INFO] Validating: archon [INFO] Validating: channel-monitor [INFO] Validating: comfy-watcher [INFO] Validating: deepresearch [INFO] Validating: extract-worker [INFO] Validating: ffmpeg-whisper [INFO] Validating: grayjay-plugin-host [INFO] Validating: hi-rag-gateway-gpu [INFO] Validating: hi-rag-gateway-v2 [INFO] Validating: hi-rag-gateway-v2-gpu [INFO] Validating: invidious-companion-proxy [INFO] Validating: jellyfin-bridge [INFO] Validating: langextract [INFO] Validating: media-audio [INFO] Validating: media-video [INFO] Validating: mesh-agent [INFO] Validating: nats-echo-req [INFO] Validating: nats-echo-res [INFO] Validating: notebook-sync [INFO] Validating: p7-room-orchestrator [INFO] Validating: pdf-ingest [INFO] Validating: pmoves-yt [INFO] Validating: presign [INFO] Validating: publisher-discord [INFO] Validating: render-webhook [INFO] Validating: retrieval-eval [INFO] Validating: supaserch =================================== |
ORGSIM-MIRROR drift check (advisory, fail-soft)vv3 / 8 files / VERIFIED 124 / DRIFTED 10 / UNDECIDED 29 / digest b72f957d82e6 Zero-LLM deterministic audit - unreachable = UNDECIDED, never dead - scripts/runbook_drift.py |
ORGSIM-MIRROR drift check (advisory, fail-soft)vv3 / 8 files / VERIFIED 124 / DRIFTED 10 / UNDECIDED 29 / digest 98a750958f6a Zero-LLM deterministic audit - unreachable = UNDECIDED, never dead - scripts/runbook_drift.py |
Docker Hardening ValidationHardening Validation ReportValidated: Fri Nov 20 00:09:49 UTC 2026Services CheckedPMOVES.AI compose hardening ratchet[INFO] Checking: /home/runner/work/PMOVES.AI/PMOVES.AI/pmoves/docker-compose.hardened.yml [INFO] Validating: agent-zero [INFO] Validating: archon [INFO] Validating: channel-monitor [INFO] Validating: comfy-watcher [INFO] Validating: deepresearch [INFO] Validating: extract-worker [INFO] Validating: ffmpeg-whisper [INFO] Validating: grayjay-plugin-host [INFO] Validating: hi-rag-gateway-gpu [INFO] Validating: hi-rag-gateway-v2 [INFO] Validating: hi-rag-gateway-v2-gpu [INFO] Validating: invidious-companion-proxy [INFO] Validating: jellyfin-bridge [INFO] Validating: langextract [INFO] Validating: media-audio [INFO] Validating: media-video [INFO] Validating: mesh-agent [INFO] Validating: nats-echo-req [INFO] Validating: nats-echo-res [INFO] Validating: notebook-sync [INFO] Validating: p7-room-orchestrator [INFO] Validating: pdf-ingest [INFO] Validating: pmoves-yt [INFO] Validating: presign [INFO] Validating: publisher-discord [INFO] Validating: render-webhook [INFO] Validating: retrieval-eval [INFO] Validating: supaserch =================================== |
Addresses codex P1 review thread on #3494: RELEASE rows need a signed ACK. Evidence is the merge commit + mergedAt per PR, and a CHIT trail entry signed via make sign-trail. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…3494) * docs(register): release 4090-CLAUDE lanes merged as #3491 and #3492 Rows appended via pmoves/tools/register_append.py release (+2/-0). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(register): signed ACKs for the #3491/#3492 release rows Addresses codex P1 review thread on #3494: RELEASE rows need a signed ACK. Evidence is the merge commit + mergedAt per PR, and a CHIT trail entry signed via make sign-trail. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Lands three follow-up commits from #2501 that never reached main. They existed only in a local worktree on the 4090 (
.worktrees/r2501) and were found by the 2026-11-19 local-work audit, which compared content against main. The commits are carried as written (authored 2026-08-10, with their original verification in the commit messages) and applied onto current main.What it fixes on main today
docker-compose.juicefs-mount.ymlranexec juicefs mount --enable-xattrwith no cache flags, so it inherited JuiceFS's default--cache-size 102400(100 GiB) and--free-space-ratio 0.1. That is the kvm4-class disk-exhaustion case fix(ops): bound JuiceFS cache per-host (df-measured) at all mount call sites #2501 set out to prevent. It now runs the canonical helper in the container and refuses to start when the helper gives empty output.juicefs-cache-bounds.shsurvey loop read positional df columns, so a filesystem name containing spaces (Git-Bash:C:/Program Files/Git) shifted the fields and the best mount was rejected without a word. It now anchors on the Capacity column.juicefs-gatewaysources the helper (bind-mounted read-only) instead of carrying an inline awk that had the same wrong-column bug.Rebase note (conflict resolved, receipts)
SUPABASE_DB_PASSWORDwas reintroduced into the gateway command.docker-compose.juicefs.ymlwas regenerated with the sanctioned generator (make compose-split). Thecompose-split-checkdrift gate passes.Verification (2026-11-19, 4090, Git Bash)
bash -n scripts/juicefs-cache-bounds.sh: OK.--cache-size 102400 --free-space-ratio 0.055(rc 0)./isC:/Program Files/Git(spaced name) with the most free space:/is selected (858 GiB). The old loop dropped it.docker compose -f docker-compose.juicefs-mount.yml --profile juicefs configrenders. The command contains the helper call and the empty-output refusal, and the bind mountscripts/juicefs-cache-bounds.sh:/usr/local/bin/...:rois present.docker compose -f docker-compose.base.yml -f docker-compose.juicefs.yml --profile juicefs config --services→juicefs-format,juicefs-gateway./bin/bash,/usr/bin/awkinjuicedata/mount:ce-v1.3.0) is from the original commits' verification.Doc provenance
docs/operations/B850_BRINGBACK_RUNBOOK.md:200-248already runs this same helper by hand (withJFS_CACHE_MEASURE_DIR, still supported atjuicefs-cache-bounds.sh:52). This PR makes the compose path match the runbook. No doc text changes are needed.Out of scope, flagged
docker-compose.juicefs-mount.yml:49still passessupabase_admin:${SUPABASE_DB_PASSWORD}inside the meta URL on the command line. This is pre-existing on main; fix(juicefs): keep metadata and object-store credentials off the command line #3322 moved the gateway and format services toMETA_PASSWORDbut missed this site. It is worth a small follow-up.Register: CLAIM
fix/juicefs-cache-bounds-followup(4090-CLAUDE, TTL 48h) is included in this branch.🤖 Generated with Claude Code