fix(updater): split compose owner handling by platform - #1088
Merged
Merged
Conversation
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
6 tasks
frahlg
marked this pull request as ready for review
September 7, 2026 11:19
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
There was a problem hiding this comment.
Left a non-blocking comment; no reviewers were assigned. Cursor Bugbot completed with no findings, but APPROVAL_POLICY.md does not authorize auto-approval, and no CODEOWNERS path matches these updater files. Human review is still needed before merge.
Sent by Cursor Approval Agent: Pull Request Router and Approver
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.


Accepted text proposal
Build fix found while completing the maintainer-approved forecasting work in Codex.
What changed
The Windows updater build fails after #1086 because the Compose replacement code refers to Unix's
syscall.Stat_t. Move owner copying into platform files: Unix keeps the same UID/GID check andChowncall; other platforms keep the owner assigned to the staged file.Why
make verify-allreaches the Windows build and fails atretire_python.go:330withundefined: syscall.Stat_t. Linux builds pass. This small dependency lets forecasting PR #1089 complete all release-target build checks.Boundaries and safety
Compose validation, backups, file modes, sync, replacement and command behavior stay the same. This does not run retirement or change a site. No open PR touched the updater files when this fix started.
Verification
5450c861, including Go and full-stack tests.go test ./cmd/ftw-updater -count=1: passed, including replacement/ownership and rollback tests.go vet ./cmd/ftw-updater: passed.CGO_ENABLED=0 go build ./...withGOOS=linux GOARCH=arm64,GOOS=linux GOARCH=amd64andGOOS=windows GOARCH=amd64: passed on this commit.make verify-allalso passed with this commit as the forecasting branch's base.Checklist
Note
Low Risk
Platform-specific refactor with identical Unix behavior; no change to retirement or Compose semantics beyond fixing the Windows compile error.
Overview
Fixes the Windows
ftw-updaterbuild, which broke when Compose replacement code referenced Unix-onlysyscall.Stat_t.Compose file replacement in
replaceRetiredComposenow calls a sharedpreserveFileOwnerhelper instead of inliningChown. Unix builds keep the prior behavior (copy UID/GID from the original file onto the staged temp file). Non-Unix builds use a no-op implementation so the platform’s default ownership applies.Compose validation, modes, sync, and retirement logic are unchanged aside from this indirection. A patch changeset documents the fix.
Reviewed by Cursor Bugbot for commit 5450c86. Bugbot is set up for automated code reviews on this repo. Configure here.