Skip to content

fix(output): preserve permissions when clobbering - #1168

Merged
ryanfowler merged 1 commit into
mainfrom
fix/output-clobber-permissions
Aug 30, 2026
Merged

fix(output): preserve permissions when clobbering#1168
ryanfowler merged 1 commit into
mainfrom
fix/output-clobber-permissions

Conversation

@ryanfowler

Copy link
Copy Markdown
Owner

Summary

  • preserve an existing output file's permission bits when --clobber atomically replaces it
  • sample and apply permissions inside the serialized commit path so destinations that change or appear during a download are handled correctly
  • add direct, integration-level race regression tests and document the behavior

Validation

  • gofmt -s -w .
  • go test -parallel 8 ./...
  • go build ./...
  • go mod tidy && go mod verify
  • staticcheck ./...
  • go test -race ./internal/fetch ./internal/fileutil
  • Windows, Darwin, and FreeBSD test-binary cross-compilation

Review

An independent subagent review identified stale pre-download permission sampling in the first implementation. The sampling was moved into the serialized atomic commit and deterministic race tests were added. A second review pass found no actionable feedback.

@ryanfowler
ryanfowler merged commit 81a4202 into main Aug 30, 2026
12 checks passed
@ryanfowler
ryanfowler deleted the fix/output-clobber-permissions branch August 30, 2026 21:12
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