Cover the Brain bulk-delete path and harden two test harnesses - #942
Merged
Merged
Conversation
BrainCollectionView's bulk delete (#929) had no unit coverage and no E2E: brains-page.spec.ts only exercises the single-entry and clear-collection paths. The new tests mount the real card tree with the real use-brain queries and mutations (only the HTTP seam and the toaster are mocked) and pin the parts that are decided from unfiltered scope totals rather than the rows on screen — the scoped vs all-collections delete URLs, the count the confirmation may quote, singular/plural nouns, the collection-cleared redirect and its two guards, invalidation, the failure path, the filter match fields, and the 100-item cap note. Also fixes two harness defects that only showed up locally: - scripts/e2e-isolated.sh now installs the pinned Playwright chromium before provisioning anything. pnpm install does not fetch browser binaries, so a Playwright bump in the lockfile made every browser test fail at launch; CI has always installed it as its own step. - .prettierignore now covers apps/site/.astro. `pnpm run check` generates it, after which `pnpm run format` — and so `pnpm run ci` — failed on any machine that had run check. CI passes it only because its checkout is still fresh. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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 freeto 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.
Recurring Test Enforcer run. The local suite was green on the first pass (24th consecutive), so the run went to the queued
next_focuscoverage gap plus two harness defects.Coverage:
BrainCollectionViewbulk deleteThe bulk-delete-by-entry-type surface added in #929 had no unit coverage, and
e2e/brains-page.spec.tsonly exercises the single-entry and clear-collection paths.brains-collection-view.test.tsx(20 tests) mounts the real card tree with the realuse-brainqueries and mutations — only the HTTP seam and the toaster are mocked — because everything under test is decided from unfiltered scope totals rather than the rows on screen, and a stubbed card tree cannot tell those apart.Pinned:
allCollections=trueproject-wide onedeletedcount rather than the total22/22 mutants killed across
brains-collection-view.tsxanduse-brain.ts.Harness fixes
scripts/e2e-isolated.shinstalls the pinned Playwright chromium before provisioning the database or building the bundle.pnpm installdoes not fetch browser binaries, so a Playwright bump in the lockfile left the pinned revision missing and every browser test failed at launch withExecutable doesn't exist at ~/Library/Caches/ms-playwright/.... CI already installs it as its own step; this makes the local lane match. Sub-second no-op once present..prettierignorenow coversapps/site/.astro.astro check(run bypnpm run check) generates it, after whichpnpm run format— and thereforepnpm run ci— fails on any machine that has run check. CI passes it only because its checkout is still fresh.Validation
pnpm run check,pnpm run format,pnpm run test(server 2650, web 798, extension 60, scripts 4),pnpm run test:e2e(179 passed / 12 skipped),pnpm run test:e2e:live(11 passed, no leakede2e-*tmux sessions),pnpm run finalize:web.CI scan of the last 50 GitHub Actions runs: 50/50 success, no CI-only flakes.
🤖 Generated with Claude Code