Skip to content

fix: drop the committed core dist symlink and close the ignore gap - #1283

Merged
vivek7405 merged 1 commit into
mainfrom
fix/remove-committed-core-dist-symlink
Aug 5, 2026
Merged

fix: drop the committed core dist symlink and close the ignore gap#1283
vivek7405 merged 1 commit into
mainfrom
fix/remove-committed-core-dist-symlink

Conversation

@vivek7405

Copy link
Copy Markdown
Collaborator

Summary

A packages/core/dist symlink reached main in #1272. It holds an absolute path into one machine's home directory, so it dangles in every other clone and shadows the directory the core build writes to.

It got in because .gitignore listed dist/ with a trailing slash, which matches a directory only. Git does not treat a symlink as a directory, so the pattern never applied and a git add -A swept it up. The entry is now slash-free for dist, build, and out, which matches the name either way.

A fresh worktree has no built dist (#954), so borrowing one from the primary checkout with a symlink stays the right local workaround. It just must never be committed.

The second one this turned up

Writing the regression test surfaced a pre-existing instance of the same defect: .agents/skills/omarchy was tracked as a symlink to /home/vivek/.local/share/omarchy/default/omarchy-skill, so it has been dangling in every clone and in CI. Untracked here with git rm --cached, which leaves the file on disk so the local setup keeps resolving it, plus a .gitignore entry explaining why. Nothing in the repo references that path, and test/hooks/route-skills.test.mjs (16/16) still passes, so no skill routing depended on it.

The test

test/repo-health/no-committed-symlinks.test.mjs, two assertions:

  1. No tracked symlink resolves outside the repo root. This is the general shape rather than a dist special case, because the next borrowed path will not necessarily be called dist. In-repo symlinks are untouched, since several are load-bearing (the vendored nvim intellisense copy, the ui registry), so the rule is about ESCAPING the repo, not about symlinks as such.
  2. The build-output ignore patterns are slash-free, pinning the exact gap that let this through.

Both read the committed state via git ls-files -s / git show HEAD:, so they assert what is actually in the repo rather than what happens to be in a working tree.

Counterfactual: both assertions were run against afc1170e (main with the symlink and the old .gitignore) before the fix commit and both failed there, assertion 1 naming both symlinks and assertion 2 naming dist/. They pass on this branch.

Test plan

  • test/repo-health/no-committed-symlinks.test.mjs 2/2, and the whole test/repo-health suite 63/63.
  • test/hooks/route-skills.test.mjs 16/16, confirming the untracked skill symlink broke no routing.
  • git status clean after the change, so the new ignore rules actually cover the local workaround files.
  • Browser / e2e / Bun parity: N/A. No runtime source touched; this is repo hygiene plus a repo-health test.

Doc surfaces

N/A across the board. No public API, CLI flag, config key, or runtime behaviour changed. The reasoning lives in the .gitignore comments and the test's module docblock, which is where someone hitting this next will look.

A `packages/core/dist` symlink reached main. It held an absolute path
into one machine's home directory, so it dangles in every other clone and
shadows the directory the core build writes to.

It got in because `.gitignore` listed `dist/` with a trailing slash, which
matches a directory only. Git does not treat a symlink as a directory, so
the pattern never applied and a `git add -A` swept it up. The entry is now
slash-free for dist, build, and out, which matches the name either way.

A fresh worktree has no built dist (#954), so borrowing one from the
primary checkout with a symlink stays the right local workaround. It just
must never be committed, and the next borrowed path will not necessarily
be called dist, so the regression test asserts the general shape: no
tracked symlink may resolve outside the repo root. In-repo symlinks are
untouched, since several are load-bearing.
@vivek7405 vivek7405 self-assigned this Aug 5, 2026
@vivek7405
vivek7405 merged commit 05c417f into main Aug 5, 2026
10 checks passed
@vivek7405
vivek7405 deleted the fix/remove-committed-core-dist-symlink branch August 5, 2026 12:02
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