fix: eliminate all 34 integration test failures (phantom suites + real bugs)#56
Merged
jnahian merged 5 commits intoJul 16, 2026
Merged
Conversation
tsc never deletes outputs for removed sources, so out/test/suite kept stale compiled suites from old branches (searchManager, sidebarProvider, tagManager) — ~100 phantom tests failing against code that doesn't exist in this tree. pretest now cleans out/ first. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- getNotesForFile cached a pre-filtered list from storage.loadNotes, hiding deleted notes from getAllNotesForFile cache hits; the cache now always holds all notes and filters at return - deleteNote removed the soft-deleted note from the cache instead of updating it, turning 'already deleted' errors into 'not found' - getNoteById no longer returns soft-deleted notes to consumers Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- getCurrentlyEditingComment looked up commentThreads (keyed by file:line thread key) with a note id, so it always returned null; the thread key is now tracked alongside the editing note id - Comment labels always said 'Last updated' because the creation history entry counted as an update; fresh notes now show 'Created' Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- CodeLens: take the first line before stripping markdown (the strip collapses newlines, merging every line into the preview) and strip heading markers that appear mid-text - noteTreeItem: strip image markdown before link markdown so  doesn't leave a stray '!'; truncateText returns the ellipsis itself when maxLength <= 3 instead of a clipped fragment - Sidebar: sort note children by line number — callers may construct FileTreeItem with notes in any order Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Mock document paths used Date.now() alone — two docs created in the same millisecond collided on the same fsPath; added a sequence counter - CommentController flows that reopen the document from disk now write the file first (openTextDocument was failing on nonexistent paths) - await the now-async updateCommentThread; assert falsy instead of null for deleted-note lookup (API returns undefined) - Changelog: record the fixes under v0.3.0 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
The integration suite (
npm run test) had 34 long-standing failures. Root-causing them found they were three different problems stacked together — roughly half weren't real test failures at all:1. Phantom suites from stale build artifacts (17 failures).
tscnever deletes outputs for removed sources, soout/test/suite/still contained compiled suites from old feature branches (searchManager.test.js,sidebarProvider.test.js,tagManager.test.js) whose.tssources don't exist in this tree — including everyfilterByTags/stop-words failure.pretestnow cleansout/before compiling.2. Real product bugs (11 failures):
getNotesForFilecached a pre-filtered (deleted-excluded) list into the cache shared withgetAllNotesForFile, anddeleteNoteremoved soft-deleted notes from the cache entirely. Result: "already deleted" errors reported "not found", and deleted notes vanished from history-preserving lookups. The cache now always holds all notes, filtered at return;getNoteByIdno longer returns soft-deleted notes.getCurrentlyEditingCommentnever worked — it looked upcommentThreads(keyed byfile:line) with a note id. The thread key is now tracked alongside the editing note id.##markers.stripMarkdownimage bug — the link regex consumed[alt](url)before the image regex saw, leaving a stray!.truncateText(_, 3)returned a clipped fragment instead of the ellipsis.FileTreeItemis constructed directly (sort was dropped in the v0.3 sidebar refactor).3. Test-infra bugs (6 failures): mock document paths collided on
Date.now()within the same millisecond; comment-controller flows that reopen documents from disk pointed at files that were never written; one test didn't await the now-asyncupdateCommentThread; one assertednullwhere the API returnsundefined.Test plan
npm run test— 265 passing, 0 failing (was 364 passing / 34 failing; the count shrank because ~100 phantom tests are gone)npm run test:unit— 60/60npm run compile:tsc+npm run compile— cleanNotes
feat/v0.3-agent-integrationand targets it, so PR feat: v0.3.0 — agent integration foundation (schema + exports) #39 merges with a green suite.🤖 Generated with Claude Code