Repository navigation
fix(sync): let --force take over an agent file that already matches - #944
Merged
Merged
Conversation
Without file-link privilege (Windows without Developer Mode) merge mode copies agents and tracks the copies it wrote. A file a tool already had with the same bytes as the source was not tracked, so it was kept, and --force kept it too: the identical-content check ran before the force check. init's "kept local agents: X (sync agents --force replaces them)" then named a file --force could never take over, on every run. With --force the file is now recorded as skillshare's, so later syncs update it. Without --force nothing changes. Also: the five-name cap written twice is one helper, sync.ListNames, and doctor.md says when a recorded broken link is reported as a broken symlink (the behavior from #942).
Codex Review Summary: ✅ CompletedThis 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. |
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.
Type
proposals/only — see CONTRIBUTING.md)approvedlabel)Linked Issue
Follow-up to #942 and #943. No issue.
Summary
Three leftovers from the review of #942 and #943.
sync agents --forcecould not take over an identical agent file. Without file-link privilege (Windows without Developer Mode), merge mode copies agents and tracks the copies it wrote. A file the tool already had with the same bytes as the source was kept, and--forcekept it too, because the identical-content check ran first.initthen printedkept local agents: X (sync agents --force replaces them)for a file--forcenever replaced. With--forcethe file is now recorded as skillshare's, so later syncs update it. Without--forcenothing changes.sync.ListNamesreplaces the five-name cap that fix(init): name the agent files the first sync kept #943 wrote a second time incmd/. Output is unchanged.doctor.mdand its four translations say when a broken link under a recorded name is reported as a broken symlink (the behavior from fix(diff): list only what sync prunes, and have doctor follow it #942).Checks
make checkin a devcontainer: exit 0.TestSyncAgents_MergeWithoutFileLinksForceTakesOverIdenticalFilefails onmain(the file staysv1and is reported as skipped) and passes here.npm ci && npm run build) in the devcontainer: all five locales built.Not run: UI tests, and the Windows UTM runbook. The fix is for the no-file-link fallback, which the unit test simulates with
SetFileLinksForTest(false); it has not been run on a real Windows guest.Not covered:
--forceis pruned like any tracked copy once its agent leaves the source. That is what--forcealready means for a file it overwrites.Checklist
make check) — for code changes