Skip to content

fix(generate): catalog_snapshot Windows cross-compile#95

Merged
LastStep merged 1 commit into
mainfrom
hotfix/catalog-snapshot-windows-build
May 4, 2026
Merged

fix(generate): catalog_snapshot Windows cross-compile#95
LastStep merged 1 commit into
mainfrom
hotfix/catalog-snapshot-windows-build

Conversation

@LastStep

@LastStep LastStep commented May 4, 2026

Copy link
Copy Markdown
Owner

Summary

v0.4.0 GoReleaser cross-compile failed: internal/generate/catalog_snapshot.go:204 uses syscall.O_NOFOLLOW which 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 openSnapshotFile into 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 — drop syscall import; call new helper
  • internal/generate/catalog_snapshot_unix.go (new, //go:build !windows) — helper with O_NOFOLLOW
  • internal/generate/catalog_snapshot_windows.go (new, //go:build windows) — helper without O_NOFOLLOW
  • (if test file references symlink-only behavior) internal/generate/catalog_snapshot_unix_test.go — symlink test moved with //go:build !windows

Verification

  • go vet ./... — clean
  • go build ./... — clean
  • GOOS=windows GOARCH=amd64 go build ./... — clean (primary gate)
  • GOOS=darwin GOARCH=arm64 go build ./... — clean
  • go test ./... — all pass
  • govulncheck ./... — zero findings

Followup

  • Force-move v0.4.0 tag to merge commit
  • gh workflow run release.yml --ref v0.4.0 -f tag=v0.4.0 (uses Plan 36's new dispatch hook)

🤖 Generated with Claude Code

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 LastStep merged commit c5f6dc1 into main May 4, 2026
6 checks passed
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>
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