fix(generate): catalog_snapshot Windows cross-compile#95
Merged
Conversation
Windows lacks syscall.O_NOFOLLOW. Cross-compile to GOOS=windows fails since Plan 32 (#80). Split openSnapshotFile into platform files: unix variant keeps O_NOFOLLOW symlink defense; windows variant uses plain OpenFile. Unblocks v0.4.0 GoReleaser cross-compile (release run 25313754104 failed at undefined: syscall.O_NOFOLLOW).
LastStep
added a commit
that referenced
this pull request
May 4, 2026
- Memory work-state: v0.4.0 shipped + hotfix, dispatch-retry dogfooded. - Memory notes: durable gotcha for syscall.O_NOFOLLOW Windows breakage (CI Linux-only doesn't catch; Plan 32 → v0.4.0 first affected release). - Status.md: PR #95 hotfix linked alongside PR #94. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
LastStep
added a commit
that referenced
this pull request
May 4, 2026
…g + ci backlog - CHANGELOG: add #95 Windows cross-compile fix line under v0.4.0 Fixed. - RoutineLog: append v0.4.0 release-ship narrative (failure + dogfooded retry). - Backlog P2: file Windows cross-compile CI gate (prevents this class of bug). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
LastStep
added a commit
that referenced
this pull request
May 7, 2026
CI: add `GOOS=windows GOARCH=amd64 go build ./...` step to test job to catch POSIX-only `syscall.*` use before release. Closes class that broke v0.4.0 first cross-compile (hotfix #95). Doc: root CLAUDE.md `Go 1.24+ → 1.25+` sync to match go.mod (1.25.0). Followup to Plan 37 INDEX.md drift fix. Housekeeping: 5 Status rows aged into StatusArchive (≥14d), 16 resolved tombstones cleaned from Backlog, 3 verbose entries trimmed to NoteStandards 3-line cap, memory work-state refreshed. Co-Authored-By: Claude Opus 4.7 (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.
Summary
v0.4.0 GoReleaser cross-compile failed:
internal/generate/catalog_snapshot.go:204usessyscall.O_NOFOLLOWwhich doesn't exist on Windows. v0.3.0 predated this code (Plan 32, PR #80, merged 2026-04-25 vs v0.3.0 tag 2026-04-24); v0.4.0 first release affected.Split
openSnapshotFileinto platform files via build tags. Unix variant keeps the symlink defense; Windows variant degrades gracefully (catalog.json is regenerable + non-secret).Changes
internal/generate/catalog_snapshot.go— dropsyscallimport; call new helperinternal/generate/catalog_snapshot_unix.go(new,//go:build !windows) — helper withO_NOFOLLOWinternal/generate/catalog_snapshot_windows.go(new,//go:build windows) — helper withoutO_NOFOLLOWinternal/generate/catalog_snapshot_unix_test.go— symlink test moved with//go:build !windowsVerification
go vet ./...— cleango build ./...— cleanGOOS=windows GOARCH=amd64 go build ./...— clean (primary gate)GOOS=darwin GOARCH=arm64 go build ./...— cleango test ./...— all passgovulncheck ./...— zero findingsFollowup
v0.4.0tag to merge commitgh workflow run release.yml --ref v0.4.0 -f tag=v0.4.0(uses Plan 36's new dispatch hook)🤖 Generated with Claude Code