Skip to content

fix(#479): share one followable network-FS remedy (the ~/.tracebloc advice couldn't work) - #518

Merged
shujaatTracebloc merged 2 commits into
developfrom
fix/479-nfs-hint-consistency
Jul 31, 2026
Merged

fix(#479): share one followable network-FS remedy (the ~/.tracebloc advice couldn't work)#518
shujaatTracebloc merged 2 commits into
developfrom
fix/479-nfs-hint-consistency

Conversation

@shujaatTracebloc

@shujaatTraceblocshujaatTracebloc commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

#479_pf_storage_type's network-FS remedy was un-followable

On a network filesystem, _pf_storage_type told operators:

Fix: point HOST_DATA_DIR at a LOCAL disk — the default ~/.tracebloc is local:
HOST_DATA_DIR="$HOME/.tracebloc" ./install-k8s.sh

But on a network HOME, ~/.traceblocis NFS (the very problem), and validate_config rejects paths outside$HOME — so the printed fix could never work. early_data_dir_guard (from #441) already had a followable remedy for exactly this case.

Fix: extract the followable remedy into a shared _pf_network_fs_remedy and use it from both_pf_storage_type and early_data_dir_guard, so they can't drift. It names the options that actually work:

  1. install as a user whose home is on a local disk (ask your admin), or
  2. TRACEBLOC_ALLOW_NETWORK_FS=1 to proceed anyway (not recommended — the DB can corrupt),

and notes datasets may stay on network storage via HOST_DATASET_DIR.

Tests

_pf_storage_type NFS now prints the followable remedy and not the old ~/.tracebloc advice; a consistency test asserts both callers emit the same remedy. shellcheck --severity=error + check-style + check-drift clean; full preflight.bats green (81); scripts/manifest.sha256 regenerated (R8).

Closes#479


Note

Low Risk
Operator-facing hint text only in install preflight; behavior unchanged aside from clearer remediation, with bats coverage.

Overview
Fixes misleading preflight guidance when HOST_DATA_DIR sits on NFS/CIFS: _pf_storage_type used to suggest HOST_DATA_DIR="$HOME/.tracebloc", which is still network-backed on a network home and cannot be fixed with a path outside $HOME per validate_config.

Introduces _pf_network_fs_remedy with actionable options (local-home user, or TRACEBLOC_ALLOW_NETWORK_FS=1) and a note that HOST_DATASET_DIR may stay on network storage. early_data_dir_guard and _pf_storage_type both call it so operator text cannot drift.

Tests assert the NFS failure path shows the new remedy and not the old ~/.tracebloc line; scripts/manifest.sha256 is updated for preflight.sh.

Reviewed by Cursor Bugbot for commit bdb9eab. Bugbot is set up for automated code reviews on this repo. Configure here.

…hare the good one
_pf_storage_type told operators to set HOST_DATA_DIR="$HOME/.tracebloc", but on a
network HOME that path is still NFS (the very problem), and validate_config rejects
paths OUTSIDE $HOME — so the printed fix could never work. early_data_dir_guard (#441)
already had a followable remedy for exactly this.
Extract that remedy into a shared _pf_network_fs_remedy and use it in BOTH
_pf_storage_type and early_data_dir_guard, so they can't drift: name the options that
actually work (install as a user whose home is on a local disk, or
TRACEBLOC_ALLOW_NETWORK_FS=1), and note datasets may stay on network storage via
HOST_DATASET_DIR.
Tests: _pf_storage_type NFS now prints the followable remedy and NOT the old
~/.tracebloc advice; a consistency test asserts both callers emit the same remedy.
Closes#479
@shujaatTraceblocshujaatTracebloc self-assigned this Jul 31, 2026
@shujaatTracebloc
shujaatTracebloc marked this pull request as ready for review July 31, 2026 13:12
@shujaatTracebloc
shujaatTracebloc merged commit 7e39b6d into developJul 31, 2026
37 checks passed
@shujaatTracebloc
shujaatTracebloc deleted the fix/479-nfs-hint-consistency branch July 31, 2026 13:45
LukasWodka added a commit that referenced this pull request Jul 31, 2026
develop moved a long way while this sat open (#513 macOS memory floor, #518
storage remedy, #516/#444/#517/#520 on the Windows side, #434 RFC docs). Only
scripts/manifest.sha256 conflicted textually — the same single install-k8s.ps1
hash line that has now collided four times today. preflight.sh and
preflight.bats auto-merged.
Resolution: regenerate the manifest (it is a DERIVED artifact — 18 digests, no
secrets; authenticity comes from the release workflow's cosign signature, not
from git), so regenerating is the only correct resolution. Taking either side
would leave a wrong digest, which the R8 gate then rejects.
Verified the auto-merge rather than trusting it. The real hazard here was not the
conflict but the clean-looking merge: this branch DELETES _pf_total_mem_kb (the
"prefer the runtime" memory selector whose conflation of host RAM and VM budget
is the bug it fixes), so any caller that landed on develop meanwhile would have
merged into a call to a function that no longer exists — a silent break git
reports as success.
- _pf_total_mem_kb: undefined and unreferenced after the merge; the only mentions
are this branch's own guard test asserting its absence, and a comment.
- #518's _pf_storage_type network-FS remedy survived intact.
- This branch's _pf_runtime_mem_status is present and still wired into both
_pf_memory and _pf_recheck_runtime_mem.
Gates: bats scripts/tests/*.bats -> 683 ok / 0 not ok (full TAP plan reported,
not a truncated read); shellcheck --severity=error over the CI file set -> rc=0;
bash -n clean; Pester -> 403 passed / 0 failed (install-k8s.ps1 arrived via this
merge); check-style clean; check-drift no drift; gen-manifest.sh --check current.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@LukasWodka

Copy link
Copy Markdown
Contributor

/fr-pass

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@shujaatTracebloc@LukasWodka@saadqbal