Skip to content

fix(portable): drop author-machine path + add portable-path CI gate#40

Merged
dancinlife merged 1 commit into
void/mainfrom
fix/portable-path
Jun 1, 2026
Merged

fix(portable): drop author-machine path + add portable-path CI gate#40
dancinlife merged 1 commit into
void/mainfrom
fix/portable-path

Conversation

@dancinlife
Copy link
Copy Markdown
Contributor

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.

File Hit Class Action
macos/Tests/BenchmarkTests.swift:30 /Users/mitchellh/Documents/void/bug.osc.txt (B) test fixture w/ upstream author literal fixed β†’ NSHomeDirectory()-derived
src/benchmark/Benchmark.zig:136 /home/runner/work/... (C) // comment (CI stack trace) left
src/config/url.zig /Users/void.user/..., /home/user/... (C) generic placeholder test fixtures left (already portable)
src/config/Config.zig /home/void/.config/... (C) generic placeholder test data left (already portable)
src/os/homedir.zig:159 /home/user/ (C) // comment left

The single fix is upstream-Ghostty code (Mitchell Hashimoto's path) in a disabled (.enabled(if: false)) benchmark test; replaced with a NSHomeDirectory()-derived path (added import Foundation).

CI prevention gate

.github/workflows/portable-path-gate.yml β€” pure-bash PR gate (base void/main). Fails any PR whose added source lines introduce /Users/<name>/ or /home/<name>/, excluding comment lines and vendor//deps//pkg/ dirs.

Counts

  • (A) runtime breakage: 0
  • (B) test fixture fixed: 1
  • (C) comment/placeholder left: 4 files

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

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>
@dancinlife dancinlife merged commit f2371cc into void/main Jun 1, 2026
47 of 48 checks passed
Sign up for free to 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.

1 participant