fix(sync): recognize legacy config path on the cella/ move + warn on masking pins - #17
Merged
Merged
Conversation
…masking pins Two fork-sync papercuts surfaced by raak's 0.7.0 sync (cellajs/raak#95). 1. Config move spuriously conflicts. isManagedFile matched the sync config by an exact compare against the new cella/cella.config.ts path only. On the one sync that moves the file from the repo root into cella/, git can present it under the old path (or as delete+add that skips rename detection), so it fell through to a normal, conflicting merge. Add LEGACY_CONFIG_FILE + isConfigFile so the config is always-ignored at both paths. Harmless to match forever — only the move sync of a not-yet-migrated fork can hit the old path. 2. Pins can silently drop upstream changes. A pinned file whose fork content is byte-identical to the previous upstream is classified `behind`, but the pin still restores the stale fork copy — no conflict, no type error (this cost raak its nav iconSlot/badgeSlot entries). Add findMaskingPins + printMaskingPinWarning and call it from both sync and analyze so these pins are flagged for review before they bite. Tests: managed-files (both config paths managed) and masking-pins (only pinned + behind + present-both-sides is flagged). Full suite green (156), lint + ts clean. Co-Authored-By: Claude Opus 4.8 (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.
Two fork-sync papercuts surfaced by raak's 0.7.0 sync (cellajs/raak#95).
1. The
cella/config move spuriously conflictsisManagedFilematched the sync config by an exact compare against the newcella/cella.config.tspath only. On the one sync that moves the file from the repo root intocella/, git can present it under the old path (or as a delete+add that skips rename detection), so it fell through to a normal — conflicting — merge.Add
LEGACY_CONFIG_FILE+isConfigFile(), andisManagedFilenow always-ignores the config at both the current and legacy root path. Harmless to match forever — only the move sync of a not-yet-migrated fork can hit the old path, and it can only bite once per app.2. Pins can silently drop upstream changes
A pinned file whose fork content is byte-identical to the previous upstream is classified
behind, but the pin still restores the stale fork copy — no conflict, no type error. This cost raak its naviconSlot/badgeSlotentries (account avatar, home loader, unseen badge would have silently disappeared).Add
findMaskingPins()+printMaskingPinWarning(), wired into bothsyncandanalyzeso these pins are flagged for review —analyzecatches them before a sync. Flagged condition:isPinned && status === 'behind' && existsInFork && existsInUpstream. Conservative by design: it warns rather than auto-taking upstream, since a pin can be a deliberate freeze.Verification
pnpm tsclean,pnpm lintcleantests/managed-files.test.ts(both config paths managed) andtests/masking-pins.test.ts(only genuine masking pins flagged; diverged / plain-behind / deleted excluded)🤖 Generated with Claude Code