Skip to content

fix(sync): recognize legacy config path on the cella/ move + warn on masking pins - #17

Merged
flipvh merged 1 commit into
mainfrom
fix/sync-config-move-and-masking-pins
Aug 3, 2026
Merged

fix(sync): recognize legacy config path on the cella/ move + warn on masking pins#17
flipvh merged 1 commit into
mainfrom
fix/sync-config-move-and-masking-pins

Conversation

@flipvh

@flipvh flipvh commented Aug 3, 2026

Copy link
Copy Markdown
Member

Two fork-sync papercuts surfaced by raak's 0.7.0 sync (cellajs/raak#95).

1. The cella/ 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 a delete+add that skips rename detection), so it fell through to a normal — conflicting — merge.

Add LEGACY_CONFIG_FILE + isConfigFile(), and isManagedFile now 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 nav iconSlot/badgeSlot entries (account avatar, home loader, unseen badge would have silently disappeared).

Add findMaskingPins() + printMaskingPinWarning(), wired into both sync and analyze so these pins are flagged for review — analyze catches 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 ts clean, pnpm lint clean
  • 156 tests pass (17 files), incl. two new suites: tests/managed-files.test.ts (both config paths managed) and tests/masking-pins.test.ts (only genuine masking pins flagged; diverged / plain-behind / deleted excluded)

🤖 Generated with Claude Code

…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>
@flipvh
flipvh merged commit 7818c13 into main Aug 3, 2026
7 checks passed
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