fix: portable author-machine paths + portable-path CI gate#152
Merged
Conversation
Replace hardcoded author-machine absolute paths (/home/summer/runs,
/Users/ghost/..., /Users/mini/...) with portable resolution so the repo
runs on any checkout.
RUNTIME (env -> portable default; never a foreign literal):
- lm_foundry/tool/build_sft_dataset_v{4..14}.py, synth_apple_sft.py:
runs root now $HEXA_RUNS_DIR, default ~/runs (was /home/summer/runs).
- lm_foundry/tool/hexa_s0_scorer.py: hexa-cc binary resolved via
$HEXA_CC_BIN -> on-PATH hexa-cc -> ~/.hx/build default; fail-fast kept.
- lm_foundry/tool/runpod_launch_7b_sft.sh, recover_hf_uploads.sh:
HF-token fetch via $HF_TOKEN_CMD / $HF_TOKEN_HOST (secret CLI from PATH);
GGUF/bench paths via $HEXA_RUNS_DIR (default ~/runs).
TEST FIXTURE:
- tests/test_install_hexa.py: fallback hexa VM path -> $HEXA_BIN /
~/.hx/bin/hexa (still prefers `hexa` on PATH).
COMMENT/DOC:
- install.hexa, verify/numerics_bitnet_bt77_n6_lattice.hexa,
LAB-09 phi_llm_stress_harness.hexa, tests/conftest.py,
bench_humaneval.py / score_with_adapter.py docstrings: genericize
provenance comments / usage examples.
PREVENTION:
- .github/workflows/portable-path-gate.yml: pure-bash PR gate failing any
ADDED non-comment source line introducing /Users/<name>/ or /home/<name>/.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Remove machine-absolute author paths so
hexa-codexruns on any checkout, and add a CI gate to keep it that way.Triaged ~50 path hits across
lm_foundry/tool/*,tests/*, and a few.hexafiles.(A) Runtime breakage → portable (env → portable default, never a foreign literal)
lm_foundry/tool/build_sft_dataset_v{4..14}.py,synth_apple_sft.py— runs root is now$HEXA_RUNS_DIR(default~/runs), was/home/summer/runs.lm_foundry/tool/hexa_s0_scorer.py— hexa-cc binary via$HEXA_CC_BIN→ on-PATHhexa-cc/hexa_v2_linux_x86_64→~/.hx/builddefault; existing fail-fast (bin_path.exists()) preserved.lm_foundry/tool/runpod_launch_7b_sft.sh,recover_hf_uploads.sh— HF-token fetch via$HF_TOKEN_CMD/$HF_TOKEN_HOST(thesecretCLI resolved from PATH on the remote, no/Users/ghost/...literal); GGUF/bench paths via$HEXA_RUNS_DIR.(B) Test fixture → portable placeholder
tests/test_install_hexa.py— fallback VM path via$HEXA_BIN/~/.hx/bin/hexa(still prefershexaon PATH).(C) Comment/doc/example → genericized (no foreign literal left)
install.hexa,verify/numerics_bitnet_bt77_n6_lattice.hexa,LAB-09/phi_llm_stress_harness.hexa,tests/conftest.py,bench_humaneval.py/score_with_adapter.pydocstrings.Prevention
.github/workflows/portable-path-gate.yml— pure-bash PR gate that fails any added non-comment source line introducing/Users/<name>/or/home/<name>/.Verification
py_compileall touched Python: OK.bash -nboth shell scripts: OK.1 failed, 83 passed. The 1 failure (test_install_hexa_runs_clean) is pre-existing onorigin/main(verified by running the identical assertion against a pristine checkout) — it's aninstall.hexaselftest content mismatch ("selftest non-PASS — missing verb spec"), unrelated to path portability. The portability change in that test is exercised and works (the fallback resolves and runs the local VM).🤖 Generated with Claude Code