Skip to content

fix: skip untracked files in update safety check + add 26 missing SYSTEM_PATHS#195

Closed
SAY-5 wants to merge 1 commit intosantifer:mainfrom
SAY-5:fix/update-system-false-positive-and-stale-paths
Closed

fix: skip untracked files in update safety check + add 26 missing SYSTEM_PATHS#195
SAY-5 wants to merge 1 commit intosantifer:mainfrom
SAY-5:fix/update-system-false-positive-and-stale-paths

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented Apr 11, 2026

The update safety check was flagging untracked files as uncommitted changes, blocking legitimate updates. Skips untracked files in the check and adds 26 missing entries to SYSTEM_PATHS.

…TEM_PATHS

Two bugs in update-system.mjs:

1. Safety check false positive (fixes santifer#169): `git status` entries with
   `??` (untracked) status code now skip the user-file check. Untracked
   files cannot be created by `git checkout FETCH_HEAD`, so they are
   always user-created local files. This unblocks updates for users who
   have cv.md or other untracked user-layer files.

2. SYSTEM_PATHS was stale: 26 paths added since v1.2.0 were missing
   from the updater, meaning `node update-system.mjs apply` silently
   skipped them. Added: 3 mode files (followup, patterns, interview-prep),
   2 i18n mode dirs (fr/, ja/), 7 scripts (doctor, test-all, scan,
   analyze-patterns, check-liveness, liveness-core, followup-cadence),
   2 config dirs (.opencode/, examples/), 5 community docs, 5 i18n
   READMEs, and 2 Nix files.
@wolram
Copy link
Copy Markdown
Contributor

wolram commented Apr 12, 2026

Confirmed reproducer here — hit both bugs today while updating from v1.1.0 → v1.3.0 on macOS Darwin 25.4.0 / Node v22.

Bug 1 (cv.md false positive): cv.md was untracked (?? cv.md) throughout — never touched by the update — yet the safety check aborted every attempt, including after git stash (which doesn't stash untracked files, so the state was identical on retry). The update ended up partially applied: staged changes present but new scripts missing.

Bug 2 (missing SYSTEM_PATHS): After the abort, the following v1.3.0 files were absent and had to be manually checked out from FETCH_HEAD: analyze-patterns.mjs, followup-cadence.mjs, scan.mjs, check-liveness.mjs, liveness-core.mjs, doctor.mjs, plus modes/pt/ (ironic, since I authored the PT-BR modes — had to manually recover my own contribution 😅).

Your fix covers both exactly. The one-liner for Bug 1 is the right call — git checkout FETCH_HEAD genuinely cannot create untracked files, so filtering ?? entries is safe and correct.

Would be great to see this merged before more users hit it on fresh v1.1.0 → v1.3.0 upgrades.

@SAY-5 SAY-5 closed this Apr 12, 2026
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.

2 participants