feat: [ENG-2154] Add OS system/temp files to CONTEXT_TREE_GITIGNORE_P…#463
feat: [ENG-2154] Add OS system/temp files to CONTEXT_TREE_GITIGNORE_P…#463bao-byterover merged 1 commit intomainfrom
Conversation
|
Claude finished @bao-byterover's task in 2m 3s —— View job PR Review: feat/ENG-2154 — Add OS system/temp files to CONTEXT_TREE_GITIGNORE_PATTERNSTodo List
SummaryOverall Score: 4.5 / 5 This is a clean, well-scoped PR with excellent discipline: the scope boundary is clearly stated in the PR description and enforced by a negative test assertion. The TDD approach is solid — failing tests before the constant update, passing after. The fixture refactoring in What's Good
Issues Found1.
|
Summary
.brv/context-tree/accumulates OS- and editor-generated junk (.DS_Store,Thumbs.db,*.swp, AppleDouble._*, etc.) when users sync the tree across machines or open editors directly inside it. These leak into commits and pollute the BM25 index.brv vc.CONTEXT_TREE_GITIGNORE_PATTERNSin src/server/constants.ts with grouped, commented sections for macOS / Windows / Linux / editor swap-backup-temp. Refactored the two variance tests intest/unit/utils/gitignore.test.tsto derive their fixtures from the sharedFULL_GITIGNOREconstant so they stay in sync with the array.ensureContextTreeGitignoreis untouched — its idempotent / negation-respecting / comment-respecting behavior already handles in-place upgrades for existing users. No trash folder patterns (.Trashes,.Trash-*,$RECYCLE.BIN/), no language caches (__pycache__,.cache/), no_archived/.Type of change
Scope (select all touched areas)
Linked issues
Root cause (bug fixes only, otherwise write
N/A)Test plan
test/unit/server/constants.test.ts— newdescribe('OS-generated junk files')block with 5 assertionstest/unit/utils/gitignore.test.ts— refactored two fixtures to derive fromFULL_GITIGNOREso future additions to the constant do not silently drop test coverage.DS_Store,._*)Thumbs.db,ehthumbs.db,Desktop.ini).directory,.fuse_hidden*,.nfs*)*.swp,*.swo,*~,.#*,*.bak,*.tmp).Trashes,.Trash-*,$RECYCLE.BIN/) are deliberately NOT included (out of scope per ENG-2154)ensureContextTreeGitignorebehavior tests (idempotency, negation!pattern, comment# pattern, whitespace handling,/patternvariant suppression) remain green against the enlarged pattern setUser-visible changes
.brv/context-tree/.gitignorefiles include 14 additional ignore patterns covering common OS- and editor-generated junk..brv/context-tree/.gitignorefiles will be upgraded in place on next daemon write — the writer appends only missing patterns, preserves user edits (including!negationsand# comments), and never rewrites the file when all patterns are already covered.Evidence