fix(portable): drop author-machine path + add portable-path CI gate#40
Merged
Conversation
The disabled benchmark test hard-coded the upstream author's machine path (/Users/mitchellh/Documents/void/bug.osc.txt). Derive it from NSHomeDirectory() so the fixture path is portable across machines. Add .github/workflows/portable-path-gate.yml: a pure-bash PR gate that fails when an ADDED source line (*.zig/*.c/*.h/*.swift/*.sh/*.py, excluding vendor/deps/pkg and comment lines) introduces a /Users/<name>/ or /home/<name>/ machine-absolute path. 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
Make the repo portable β remove machine-absolute author paths and prevent regressions.
Triage
A repo-wide scan (
*.zig/*.c/*.h/*.sh/*.py/*.swift, excluding.git/vendor/deps) found exactly one genuine author-machine path; the rest are generic placeholders or comments.macos/Tests/BenchmarkTests.swift:30/Users/mitchellh/Documents/void/bug.osc.txtNSHomeDirectory()-derivedsrc/benchmark/Benchmark.zig:136/home/runner/work/...//comment (CI stack trace)src/config/url.zig/Users/void.user/...,/home/user/...src/config/Config.zig/home/void/.config/...src/os/homedir.zig:159/home/user///commentThe single fix is upstream-Ghostty code (Mitchell Hashimoto's path) in a disabled (
.enabled(if: false)) benchmark test; replaced with aNSHomeDirectory()-derived path (addedimport Foundation).CI prevention gate
.github/workflows/portable-path-gate.ymlβ pure-bash PR gate (basevoid/main). Fails any PR whose added source lines introduce/Users/<name>/or/home/<name>/, excluding comment lines andvendor//deps//pkg/dirs.Counts
Honest note: the only edited hit was an upstream-Ghostty author path; all other matches are generic placeholders or comments and were intentionally left.
π€ Generated with Claude Code