Skip to content

IonRift Test Agent: Remove 74 redundant tests (70%), keep the money, auth and sending tests - #3

Open
ionrift-ai[bot] wants to merge 1 commit into
mainfrom
ionrift/test
Open

ionrift-ai[bot] wants to merge 1 commit into
mainfrom
ionrift/test

Conversation

@ionrift-ai

@ionrift-ai ionrift-ai Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Removed two whole files and 43 test cases from four files. Cleaned up what the cuts left behind: unused imports and helpers, two empty describe blocks in batching.test.ts, the orphaned express describe in middleware.test.ts (only a fakeRes helper was left), and the 'serverless and edge patterns' describe in runtime.test.ts (only a run helper was left, used by nothing).

Duplicates and superseded by kept tests: validation.test.ts (26 tests) and who.test.ts (5), whose lines the kept tests already cover. batching.test.ts: 15 cases on timers, splitting, in-flight limits, queue cap, shutdown waiting and timeouts, where the kept grouping and flushAt cases cover the same send path. delivery.test.ts: 18 cases on the wire-format details, retry and backoff variants, and gzip, while the kept 401/403/redirect, identify and host cases stay. middleware.test.ts: 4 cases of the same Hono and Express middleware paths. runtime.test.ts: 6 cases of serverless and edge patterns, which spawn child processes, and the flush timer case.

Kept on purpose: the 20 money, auth, tenancy and sending tests named by IonRift, including the key-never-reaches-console test, 401/403 handling, redirect safety, and the constructor tests (all 10 kept, untouched). constructor.test.ts is unchanged.

Target not met: 74 of 105 tests removed (70.5%), not the 80% (84) the plan states. The gap is 10 rows of the test.each 'uses no Node built-ins' check in runtime.test.ts. The plan counted them as cut, but they are one test.each entry, and the trim left them in place. They are the only guard that the SDK stays fetch-only, so I did not remove them. Removing them would reach about 80%.

Checks: bun run typecheck passes. The unused-locals check reports no leftovers in test/. bun test: 31 pass, 0 fail (before: 105 pass, 0 fail). Coverage was not re-measured, per the instructions. The plan's kept-lines estimate is 94.01%.

Before After
Tests 105 31 (70.5% removed)
Suite time 1.4 s 0.2 s (85.7% less)
Line coverage 100.0% 94.0% (94.0% of it kept)

Measured by IonRift in the sandbox, before and after the change, with bun test: not the model's figures.

Test Agent · daily run on 02fbe71 · model $0.015 + sandbox $0.007 · never merged by IonRift: merge it, change it, or close it. The next daily run updates this pull request rather than opening another. IonRift


Proof this PR
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…auth and sending tests

Test Agent daily run on 02fbe71.
@ionrift-ai
ionrift-ai Bot requested a review from ivolo as a code owner December 3, 2026 20:34

This branch has not been deployed

No deployments
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.

0 participants