Skip to content

test: cut the suite to the tests that guard real invariants - #46786

Merged
nwparker merged 1 commit into
mainfrom
nwparker/FUCK-TESTS
Nov 22, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/FUCK-TESTS

Conversation

@nwparker

@nwparker nwparker commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Cuts the test suite to the tests that guard real invariants, and makes "tests are the exception" the rule in AGENTS.md.

  • 6,023 → ~400 test files (~889k → ~66k LOC). Kept: security boundaries, crypto/wire formats, data integrity, concurrency invariants, parsers, and the 10 golden E2E journeys.
  • How the cut was made: UI-render and mock-heavy tests were removed automatically. 22 parallel reviewers then triaged the rest against the new rule, and a rescue pass brought back tests that guard security or data loss.
  • Removed ~830 orphaned helpers/fixtures, test-only *ForTests exports in production code, and 12 workflows plus several jobs that only ran deleted tests. Nightly E2E is now a single ~4 min job.
  • Local vitest workers are capped at min(6, cores/2), so running the full suite no longer OOMs a laptop. CI is unchanged.
  • Rewrote the AGENTS.md testing rule and updated CONTRIBUTING.md and test-antipatterns.md to match.

Verification

  • pnpm typecheck: passes.
  • pnpm check:changed: all 53 checks pass.
  • Full remaining unit suite: 332 passed, 1 failed (reclaim-worktree-generated-files.test.mjs, macOS-only; the test and its code are unchanged by this PR).
  • actionlint: no new errors vs main.

Follow-up

An AI review of what was deleted will restore any tests of substantial value in a follow-up PR.

Files Added Deleted Net
Test 2537 0 $\color{#cf222e}{\Huge{\mathbf{−}}}$​376924 $\color{#cf222e}{\Huge{\mathbf{−}}}$​376924
Prod 463 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​267 $\color{#cf222e}{\Huge{\mathbf{−}}}$​42685 $\color{#cf222e}{\Huge{\mathbf{−}}}$​42418

@nwparker
nwparker requested a review from Jinwoo-H as a code owner November 22, 2026 06:14
@nwparker
nwparker enabled auto-merge (squash) November 22, 2026 06:14
@nwparker
nwparker force-pushed the nwparker/FUCK-TESTS branch from e2d3b5d to 18fd2b9 Compare November 22, 2026 06:23
Delete 5,6xx of 6,023 test files (~93%) plus orphaned helpers, fixtures,
test-only production exports, and CI jobs/workflows that only ran deleted
tests. Survivors: security boundaries, crypto/wire formats, data integrity,
concurrency invariants, parsers, and the golden E2E journeys.

Also cap local vitest workers so a full run no longer exhausts memory, and
rewrite the AGENTS.md testing rule: tests are the exception.
@nwparker
nwparker force-pushed the nwparker/FUCK-TESTS branch from 18fd2b9 to 6a44979 Compare November 22, 2026 06:24
@nwparker
nwparker merged commit 2cffded into main Nov 22, 2026
41 of 42 checks passed
bbingz added a commit to bbingz/orca that referenced this pull request Nov 22, 2026
stablyai#46786 deleted skills-install.test.ts. Keep that deletion so this PR
does not restore the removed suite. The remote-selector refusal stays
in the three production files.
bbingz added a commit to bbingz/orca that referenced this pull request Nov 22, 2026
stablyai#46786 deleted skills-install.test.ts. Call the real install and update
handlers so a saved server or pairing code still fails before any plan
or write, and --environment local still gets past that guard.

Co-authored-by: Cursor <[email protected]>
bbingz added a commit to bbingz/orca that referenced this pull request Nov 22, 2026
stablyai#46786 deleted smart-workspace-source-results.test.ts. Keep that
deletion and move the stablyai#18701 branch-intent cases into
smart-workspace-branch-intent.test.ts.

Co-authored-by: Cursor <[email protected]>
nwparker added a commit that referenced this pull request Nov 22, 2026
After the suite cut (#46786), 24 shards spent ~500s on tests but ~1,220
runner-seconds in total, since each shard pays ~30s of setup. Four shards
keep the unit lane (~150s) under the package/WSL critical path (~250-270s).
Jinwoo-H added a commit that referenced this pull request Nov 22, 2026
…ver asks test imports

Main's suite cut (#46786) deleted it as orphaned; this stack's test still uses it, unchanged.
eukosh added a commit to eukosh/orca that referenced this pull request Nov 22, 2026
…asts

Main deleted this file in stablyai#46786. Keep only the two state-machine
invariants the fix relies on, and mock window.api with vi.stubGlobal so
the new no-cast lint rule passes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd added a commit to registered2nd/orca that referenced this pull request Nov 24, 2026
… on, which v1.4.272 deleted

Upstream's test cut (stablyai#46786) deleted the terminal link-handler test doubles and
environment harness along with the suites that used them. The OS-viewer route's
cases still run on them, so the branch carries both as they were just before the
cut; everything they import is still upstream's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd added a commit to registered2nd/orca that referenced this pull request Nov 24, 2026
…4.272

v1.4.272's cursor-line reader takes the terminal's column count, so the steer
terminal picks `cols` from xterm too. Its test cut (stablyai#46786) removed the tracer's
test reset; the Azure client's test clears the sink with setActiveSink(null),
which is all that reset did.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd added a commit to registered2nd/orca that referenced this pull request Nov 24, 2026
…est v1.4.272 deleted

Upstream's test cut (stablyai#46786) deleted windows-process-table.test.ts and the
module's test hooks. The case that keeps a malformed snapshot row from throwing
inside the addon's callback now has its own file, and reaches the addon by
mocking the createRequire the table loads it through.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
registered2nd added a commit to registered2nd/orca that referenced this pull request Nov 24, 2026
…time now that v1.4.272 dropped their fixtures

Upstream's test cut (stablyai#46786) deleted the prompt-submission runtime fixture and
the worktree store fixture these cases built their terminal with. They now
register the PTY on a store-less runtime, as upstream's surviving submit-withhold
test does, and let the runtime identify Claude Code from the host's foreground
process, which makes it the send's settling agent as a Claude launch did.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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