Repository navigation
chore(gitignore): ignore public/sources/ and tie the rule to the build (#6498) - #6506
Merged
Merged
Conversation
#6498) `build:crawlable-corpus` deletes and rewrites every directory in GENERATED_DIRS on each run. Six of the seven have a matching .gitignore rule; `sources` — added by #6491 (PR #6492) — did not, so any worktree that had built carried a permanent `?? public/sources/`. That is noise on every unrelated PR and one `git add -A` away from committing a build artifact the next build destroys. Nothing connected the two lists, so the next directory added to GENERATED_DIRS would repeat it. Export the list and assert .gitignore covers it, which is the part that stops this recurring rather than fixing one instance of it. Removing the new rule turns the test red. The page itself is unaffected: `public/countries/` has been gitignored and live at 200 all along. These directories are rebuilt from committed data at deploy time (`npm run build` runs build:crawlable-corpus before vite copies public/ into the output), so git never needed to carry them. Verified: `npm run build:crawlable-corpus` now leaves `git status` clean. Claude-Session: https://claude.ai/code/session_01Wm1w4JR4u6NU5yRui56jL6
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Closes #6498. Follow-up to #6491 / PR #6492.
The gap
scripts/build-crawlable-corpus.mjsdeclares its own output directories and deletes each one before rewriting it:Six of the seven have a matching
.gitignorerule.sources— added by #6492 — did not, so any worktree that had run a build carried a permanent?? public/sources/: noise on every unrelated PR, and onegit add -Afrom committing a build artifact that the next build deletes and rewrites.The fix
One ignore rule, plus the part that keeps it from happening again.
Nothing tied
.gitignoretoGENERATED_DIRS, so the next directory added would repeat the omission.GENERATED_DIRSis now exported and a test asserts.gitignorecovers every entry.'reference/changelog'is matched by the broaderpublic/reference/, so the assertion checks the top-level segment.Removing the new rule turns the test red:
This does not affect the live page
worldmonitor.app/sources/returns 200 and will continue to. These directories are rebuilt from committed data at deploy time —npm run buildrunsbuild:crawlable-corpusbeforevite buildcopiespublic/into the output — so git never needed to carry them.public/countries/is the precedent already in production: gitignored, andworldmonitor.app/countries/norway/serves 200. This change putssourceson the same footing as its six siblings.Not to be confused with
public/sitemap.xml, which is generated and committed on purpose — it is not inGENERATED_DIRS, comes from the separatebuild:sitemapstep, and hasbuild:sitemap:checkgating the committed copy. No equivalent exists forsources.Verification
tests/crawlable-corpus.test.mjstests/deploy-config.test.mjsdocs:check,sources:check, biomehttps://claude.ai/code/session_01Wm1w4JR4u6NU5yRui56jL6