Skip to content

chore!: purge unit tests, comments, stale docs and dead tooling - #424

Merged
codecaaron merged 13 commits into
mainfrom
chore/cruft-purge
Nov 28, 2026
Merged

codecaaron merged 13 commits into
mainfrom
chore/cruft-purge

Conversation

@codecaaron

Copy link
Copy Markdown
Owner

Removes what the repository no longer needs: unit tests, comments, stale documentation, an archived directory, and tooling nothing runs. 1,052 files change; 115,962 lines go and 1,696 are added.

What changes

  • Tests. Unit tests are deleted; tests that drive the real extractor, a real bundler or dev server, and the whole in-process pipeline stay. TypeScript test files go from 214 to 52 and Rust tests from 983 to 411. Type-contract tests are kept and move to packages/<name>/types/published (built declarations, TypeScript 7.0.2 and 5.9.3) and types/source, with their own fixtures.
  • Comments. Stripped by parsed comment ranges from Rust, shell, config, TypeScript and JavaScript. Each file's token stream is identical before and after, and each TypeScript file's syntax tree is identical after formatting. Kept: @ts-expect-error, lint directives lint still needs, @vitest-environment, @deprecated, triple-slash references, pure annotations, shebangs, the SAFETY runs Clippy requires, and four notes that record a decision.
  • Docs. AGENTS.md is rebuilt from the current task list and verify scripts. Package READMEs are cut to one sentence, the install command and one example checked against the built declarations. legacy/, CHANGELOG.md and its fragments, and the checkout's OpenSpec pointer are removed. The showcase loses its marketing copy.
  • Dead tooling. packages/oracle, the scripts/hygiene cascade, dts-parity.sh, lane receipts and their CI uploads, a CI grep for a fixed Bun bug, the verify:workers:contracts tier, and the anti-slop rules no-runtime-typeof, require-safety-comment-for-type-assertion and no-module-mocking.
  • Code those rules and tests had shaped. typeof replaces Object.prototype.toString.call tag checks and try/catch type probes. Hooks that let tests replace the engine, the loader's file system and the watcher's clock are gone from shipped modules; the kept tests mock at the module boundary.

Release notes

  • The engine option and the ANIMUS_ENGINE environment variable are gone. The CLI and the unplugin adapters reject engine as an unknown option; the Vite and Next.js plugins warn and carry on; ANIMUS_ENGINE is ignored. Remove engine from your config and unset the variable.
  • The Next.js plugin's internal loaderPath option is gone and is treated as an unknown option.
  • The development-only globalThis.__ANIMUS_WITNESS__ buffer is gone. The development warnings are unchanged.
  • Function checks in @animus-ui/effect-ui and the Next.js watch options now accept async and generator functions. String checks in @animus-ui/core declarations, @animus-ui/effect-ui and layergate's webpack adapter no longer accept a boxed new String(...).
  • Published declarations no longer carry JSDoc, except @deprecated tags.
  • @animus-ui/extract drops optional parameters no caller passed: pathApi on isPathWithinRoot, withinAnyRoot and sharesVolumeRoot; the options argument of startTurbopackWatcher; windowMs on CoalescingWindow. ExtractionSession.debounceCeilingMs is removed.

Verification

  • vp run verify:full passes at 34da7bb2: 53 of 53 tasks, including Clippy, the type tests on both compilers, every end-to-end app, the three parity gates, integration and the packed proof.
  • verify:bench against release 0.2.0: all four rows passed at 98fc4adb, one commit before the tip. At the tip two runs showed no regression (ratios 0.974 to 1.000) but rows came back unqualified from measurement noise on a loaded machine. It needs a run on a quiet machine or in CI.
  • Only the tip of each phase was verified; the commits inside a phase are slices of one change.

Coverage given up

Deleted with no other test covering them: tsconfig paths reading, Turbopack watcher registration and events, Next.js dev-mode paths other than webpack watch, session artifact write order and lock hygiene, git-ignored file skipping, win32 path containment, per-code diagnostic level precedence, and ten Rust unit modules including hash-collision widening and export-resolution edge forms.

Left for later

  • scripts/verify/attw-def5.ts stays: a direct attw --profile esm-only is slightly stricter.
  • 26 files remain in the anti-slop override list.
  • Exported names with no caller in the repository, such as SHORTHAND_PROPERTIES and observeColorMode, are untouched.
  • packages/extract/scripts/built-in-asset-types.ts --check fails here as it does on main: the committed file records Vite 8.3.4 and 8.3.5 is installed.

🤖 Generated with Claude Code

codecaaron and others added 13 commits November 27, 2026 23:30
Keeps the 411 tests that drive the whole extraction or system-loading pipeline in process. Removes 36 unit test modules, the named unit subsets in analyze_css, engine and system-loader, the test-only helpers they used, six public functions with no production caller, and the PROBED, OPENINGS and DIRECTORY_READS instrumentation.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Keeps the real-engine canary files, the table drift guards, bundle-removal, and the two session tests that run the real engine. Removes 52 unit tests, three _integration tests of pure functions, four unreferenced fixtures, and helper exports with no importer.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Keeps the dev-server, webpack-watch and real-engine tests, no-pass-through, the Turbopack catch-up table, lightning-settings, css-audit, and one test each for exclude lists and unreadable source files. Folds the loader fail-closed cases into the catch-up file and trims cli-unit to the artifact writer, lock, swap and signal groups.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Type tests move to types/published (built declarations, TypeScript 7.0.2 and 5.9.3) and types/source per package, with their own fixtures and no runtime test in any type project. Nine type assertions leave three core runtime tests for a new core published fixture. Runtime unit tests with other coverage are removed; the kept ones are type-checked by verify:compile.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Removes the scripts/verify policy tests, the parity-harness and assertion-library self-tests, the e2e script tests, and the verify:workers:contracts tier they left empty. The Vitest target list names only surviving paths.

Verified at this commit: vp run verify, verify:parity and verify:integration. The four commits before it are slices of the same change and were not verified one by one.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…s buffer

The engine option and ANIMUS_ENGINE are gone: the CLI and unplugin adapters reject engine as an unknown option, the Vite and Next plugins warn, and ANIMUS_ENGINE is ignored. The Next plugin's internal loaderPath option is gone the same way.

Shipped modules no longer export hooks for tests to replace the engine, the loader's file system, the coalescing clock or the Svelte adapter; the kept tests mock at the module boundary or pass SessionHost.engine. The development-only __ANIMUS_WITNESS__ buffer, which nothing read, is removed; the development warnings stay.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Removes packages/oracle, the scripts/hygiene cascade, dts-parity.sh, lane receipts with their CI uploads, the CI grep for a fixed Bun bug, the showcase's unused MDX tooling, the packed-app engine gate check, and the anti-slop rules no-runtime-typeof, require-safety-comment-for-type-assertion and no-module-mocking. knip.config.ts becomes a static file.

Verified at this commit: vp run verify:full (53 of 53 tasks).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Removes 12,655 comment lines by parsed comment ranges. Each Rust file's token stream, each shell script's parsed form and each config file's parsed value is identical before and after. Kept: the SAFETY runs Clippy requires, shebangs, and four notes that record a decision (the nodelete linker flag, the toolchain pin, trusted publishing, and the css.rs cross-file invariant).

The generated index.d.ts loses the 49 JSDoc blocks that came from doc comments on napi items. Two nested ifs in usage_facts/forwarding.rs are merged, since only a comment between them kept Clippy's collapsible_if quiet. Also removes the unreferenced scripts/verify/lint.sh.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…nSpec pointers

AGENTS.md is rebuilt from the current task list and verify scripts. Per-package CLAUDE.md files keep only statements confirmed against the code. Removes the archived legacy directory, CHANGELOG.md and its unreleased fragments, the checkout's OpenSpec pointer, and the committed parity last-failure output. baseline-intents.md keeps the header and the current intent, which is all the refresh tooling reads.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…copy

Each package README is one sentence, the install command, one example checked against the built declarations, and a source link. Corrects or removes wrong package.json descriptions, keywords and a dead homepage. The showcase home page keeps the logo and working links; the taglines, pillars and the components only they used are gone.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Replaces Object.prototype.toString.call tag comparisons and try/catch callable probes with typeof at 39 sites. Function checks now accept async and generator functions, and three string checks no longer accept boxed strings. Plain-object tag checks stay. The anti-slop override list drops the 8 files that pass the remaining rules and the legacy ignore patterns go.

Verified at this commit: vp run verify:full (53 of 53 tasks). The three commits before it are slices of the same change and were not verified one by one.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Removes 7,219 comments (12,807 lines) by parsed comment ranges, including JSDoc on the published API. Kept: bare @ts-expect-error directives, the lint directives lint still needs, @vitest-environment pragmas, @deprecated tags with their first sentence, triple-slash references, pure annotations and shebangs. 51 lint directives for rules that are not enabled are gone. The parity-pinned fixtures and generated declaration files are untouched; the asset-types generator no longer emits comments.

Each of the 482 changed files has an identical token stream before formatting and an identical syntax tree after it. Verified at this commit: vp run verify:full (53 of 53 tasks).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Deletes code only removed tests exercised: the Rust jsx_scan system-prop scanner, flushSystemReload, and optional parameters that existed for tests (the Turbopack watcher options, pathApi on the path-containment helpers, cwd, env and removeDir in the plugins, the Vite plugin's kitEngine field). Replaces the remaining valueOf try/catch type probes with typeof and inlines one-caller predicates. Removes the legacy-directory handling from the topology check, dead assertion helpers, dead test-fixture exports and @types/lodash. The webpack-watch tests share one engine double, and the Turbopack catch-up test imports its loader once per file.

Exported signatures that lose an optional parameter: isPathWithinRoot, withinAnyRoot and sharesVolumeRoot (pathApi); startTurbopackWatcher (options); CoalescingWindow (windowMs). ExtractionSession.debounceCeilingMs is removed.

Verified at this commit: vp run verify:full (53 of 53 tasks).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@codecaaron
codecaaron merged commit f1c9e5c into main Nov 28, 2026
16 checks passed
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