You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unix-literal "/" roots panic on Windows: four test fixtures, and writ's System layer TargetRoot #392
On Windows, a Path built against a Unix-literal root "/" panics: filepath.Rel("/", "C:\...") cannot cross volumes, so fsroot.makePath's assert.Must fires. Found by the platform test matrix (#373) in the post-#377 remainder (57 failures, PR #389 leg).
Evidence
panic: fsroot.makePath: must: Rel: can't make C:\Users\RUNNER~1\...\decrypted.yaml relative to / (pkg/fsroot/root.go:699)
--- FAIL: TestReceipt_RestoreEncoded_JSONandYAML
Sites
Test fixtures (bucket 2) — fsroot.OpenWritableUnconfined("/") as a whole-filesystem root:
These want a root that can address absolute temp paths; on Windows "/" is not that. Fix shape: anchor the fixture root at t.TempDir() (confining the test properly as a bonus), or define what unconfined means cross-platform and use that.
Production default (bucket 1, larger) — cmd/writ/writ/layer.go:28 sets the System layer's TargetRoot: "/". writ's System-layer deployment has no Windows semantics; this is a design question (what is "System" on Windows?), not a literal to patch. The layer tests (layer_test.go, snapshot_test.go:267) inherit the same literal.
Suggested split
Fix the four test fixtures mechanically; charter the writ System-layer Windows question separately — it is product design, and it gates writ-on-Windows rather than CI greenness (the scenario suite already passes on windows-latest because deployment targets Home, not System).
Enumeration correction before the fix lands: the issue said four fixture sites; the uncapped sweep found ten — the original grep was head -8-capped. Full set, all now fixed on fix/unix-literal-roots: encryption/receipt_test.go (1), git/provider_test.go (3, via parameterized testActivation/newTestProvider), git/resource_input_test.go (2 — the Windows-shaped-path test now borrows the fixture root's own volume on Windows so the drive-colon shape survives without crossing volumes), git/resource_test.go (1, newRes anchors at the path's own directory), git/receipt_test.go (1), git/checkout_pull_observe_test.go (2, plus the two /tmp/* literal inputs). The writ System-layer TargetRoot: "/" design question remains this issue's open half, untouched.
Activity
David-Noble-at-work commentedon Aug 13, 2026
Enumeration correction before the fix lands: the issue said four fixture sites; the uncapped sweep found ten — the original grep was
head -8-capped. Full set, all now fixed onfix/unix-literal-roots:encryption/receipt_test.go(1),git/provider_test.go(3, via parameterizedtestActivation/newTestProvider),git/resource_input_test.go(2 — the Windows-shaped-path test now borrows the fixture root's own volume on Windows so the drive-colon shape survives without crossing volumes),git/resource_test.go(1,newResanchors at the path's own directory),git/receipt_test.go(1),git/checkout_pull_observe_test.go(2, plus the two/tmp/*literal inputs). The writ System-layerTargetRoot: "/"design question remains this issue's open half, untouched.test(git,encryption): anchor fixture roots at temp directories, not "…
fix(file): treat rooted patterns as absolute in Find's scope check; f…
docs(plans): bring the windows campaign plan current (#519)
refactor(cli): open CLI trees confined, creating them when absent (#570)
feat(result): the format value carries its argument; value renders raw (
One output convention for every app: result to stdout, documents to t…
feat(writ): scopes are a model, and --scope selects them on the four …