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
Windows build fails: internal/filetxn uses syscall.Stat_t without a Windows fallback #370
Found during the manual verification of the directory-target mode (#363, check 9), from a clean checkout of tag v0.1.0-alpha.17 on Windows with go1.26.5 windows/amd64.
Problem
go build -o cortex.exe ./cmd/cortex fails on Windows:
internal/filetxn reads directory identity through info.Sys().(*syscall.Stat_t) (inode and device ID). That type does not exist on Windows, and the package has no build-constrained per-OS variant. Cross-compiling the same tag with GOOS=linux from Windows succeeds, so the failure is Windows-specific. Both call sites are still present on origin/main, plus two in restart_test.go.
Impact
Cortex cannot build natively on Windows. This pins the exact blocker for the Windows platform readiness gate (#332): the follow-up PowerShell smoke (install --target-dir + doctor) could not run either.
Expected direction
Extract the directory-identity read behind a build-tagged interface (a unix variant using syscall.Stat_t and a Windows variant using GetFileInformationByHandle or equivalent), or fall back to a portable identity source on Windows, so ./cmd/cortex builds on windows/amd64.
Precise build-breaker report: internal/filetxn uses syscall.Stat_t (unix-only) with no Windows build-constrained variant, so cmd/cortex does not build on windows/amd64. The compiler errors, call sites, and cross-compile control (GOOS=linux succeeds) are all stated. Acceptance is directly testable (go build succeeds on windows/amd64), scope is one identity-read abstraction, and every named path exists on the default branch.
Item
Pass
Evidence
clear problem
yes
go build -o cortex.exe ./cmd/cortex fails on windows/amd64 at internal/filetxn/directories.go:258 and restart.go:406 with undefined: syscall.Stat_t; package reads directory identity via info.Sys().(*syscall.Stat_t) with no per-OS variant.
acceptance criteria present and testable
yes
Expected direction is testable: after extracting the identity read behind build-tagged variants (unix Stat_t vs Windows GetFileInformationByHandle or portable fallback), go build ./cmd/cortex succeeds under GOOS=windows/amd64; restart_test.go call sites also covered.
scope bounded
yes
Single deliverable: one directory-identity read in internal/filetxn behind a build-tagged interface or portable fallback.
no open questions
yes
Body gives problem, exact error output, impact (blocks #332 Windows readiness), and a concrete expected direction; comments empty.
grounded in upstream
yes
All named paths exist on the default branch (verified with exists): internal/filetxn/directories.go, internal/filetxn/restart.go, internal/filetxn/restart_test.go, cmd/cortex.
Juan merges; the fleet applies the status:approved label when a review recommends approve.
I'd like to take this one. I found it during the #363 verification and I'm on Windows 11 with go1.26.5 windows/amd64, so I can reproduce and test the fix natively.
Plan: move the directory-identity read behind build-tagged variants (syscall.Stat_t on unix, GetFileInformationByHandle volume serial + file index on Windows), cover the restart_test.go call sites, and confirm go build ./cmd/cortex plus go test ./internal/filetxn/... pass on both windows/amd64 and linux.
Could you assign it to me? If it's already in progress on your side, no problem, I'll pick another one.
Assigned to you, and the issue is approved. Go ahead with the plan: build-tagged directory identity (unix Stat_t vs GetFileInformationByHandle), coverage for the restart_test.go call sites, and green build/tests on both windows/amd64 and linux. Open a PR off main referencing this issue (issue-first; Fixes #370 on its own line in the PR body, the CI validates that format) and we review from there.
Activity
barbatdev commentedon Oct 23, 2026
Fleet issue review (glm)
Recommendation: approve
Precise build-breaker report: internal/filetxn uses syscall.Stat_t (unix-only) with no Windows build-constrained variant, so cmd/cortex does not build on windows/amd64. The compiler errors, call sites, and cross-compile control (GOOS=linux succeeds) are all stated. Acceptance is directly testable (go build succeeds on windows/amd64), scope is one identity-read abstraction, and every named path exists on the default branch.
go build ./cmd/cortexsucceeds under GOOS=windows/amd64; restart_test.go call sites also covered.Juan merges; the fleet applies the
status:approvedlabel when a review recommendsapprove.barbatjuan commentedon Oct 23, 2026
I'd like to take this one. I found it during the #363 verification and I'm on Windows 11 with go1.26.5 windows/amd64, so I can reproduce and test the fix natively.
Plan: move the directory-identity read behind build-tagged variants (
syscall.Stat_ton unix,GetFileInformationByHandlevolume serial + file index on Windows), cover therestart_test.gocall sites, and confirmgo build ./cmd/cortexplusgo test ./internal/filetxn/...pass on both windows/amd64 and linux.Could you assign it to me? If it's already in progress on your side, no problem, I'll pick another one.
barbatdev commentedon Oct 23, 2026
Assigned to you, and the issue is approved. Go ahead with the plan: build-tagged directory identity (unix Stat_t vs GetFileInformationByHandle), coverage for the restart_test.go call sites, and green build/tests on both windows/amd64 and linux. Open a PR off main referencing this issue (issue-first; Fixes #370 on its own line in the PR body, the CI validates that format) and we review from there.
test(community): register directory identity files in publication inv…
test(filetxn): cover the Windows directory identity refusals
docs(filetxn): record the ReFS identity limit and the long-path basis
fix(filetxn): open long Windows paths with the extended-length prefix
fix(filetxn): leave device paths unprefixed and pin the prefix wiring