Skip to content

Trim the test suite, close coverage gaps, and parallelize CI - #834

Open
TheGreatAxios wants to merge 14 commits into
mainfrom
cl-7514-trim-content-pin-and-cosmetic-tests-from-the-suite
Open

Trim the test suite, close coverage gaps, and parallelize CI#834
TheGreatAxios wants to merge 14 commits into
mainfrom
cl-7514-trim-content-pin-and-cosmetic-tests-from-the-suite

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Tests pin only behavior: content, brand, and animation-frame pins plus duplicate coverage are gone, and the freed budget funds coverage on load-bearing paths. The suite drops from 6,263 to 6,252 cases while adding tests for the auto shell policy wrapper bypasses, torn session journal recovery, exec close cancellation, session queue ordering, and MCP reconnect schema drift.
  • The three flaky subagent mount-gate tests (plus a structurally identical fourth) are fixed at the root: they slept through a hardcoded retry backoff against a refused connection; a local 401 server fails the send on attempt one, dropping each probe from ~1.8s to ~0.3s with zero fixed sleeps.
  • CI runs one static-analysis job (format, lint, typecheck), a decoupled build job, and a two-shard test matrix that still goes through the projects-dir guard with the same seed. Critical path drops from ~118s to ~95-100s.
  • A lint rule (corbits/no-content-pin-tests) with its own behavioral tests keeps content-pin tests from regrowing; AGENTS.md states the bar: a test earns its place only if a real behavior change can fail it.
  • The check gate now pins the shard path union and the seeded shard script, so sharding can never silently drop part of the suite.

Verification

  • bun run check passes: lint (including the new rule), typecheck, build, and the guarded suite at 6,252 pass / 0 fail (seed 424242).
  • Baseline from recent runs on main: 114-123s total, critical path 111-118s. Restructured: shards of ~78s and ~25s, critical path ~95-100s.
  • Flake note: a pre-existing family of load-dependent 5s timeouts in git/filesystem and TUI I/O tests rotates run-to-run on a loaded machine; every flagged test passes in isolation. Not introduced by this branch.
  • CI job names change (prettier, eslint, typecheck, build-and-test become static-analysis, build, test); main has no branch protection configured, so no required-check migration is needed.

Fixes CL-7514
Fixes CL-7515
Fixes CL-7513
Fixes CL-7516

The suite pinned packaged skill prose, palette hexes, ANSI-256
indexes, display-name branding, and animation frames, and carried
duplicated copies of faremeter, stream-consumer, and inference-abort
coverage. Those broke on every wording or palette edit without
guarding behavior, and two eval test files were never run at all.
Manifest, inventory, frontmatter-flag, and behavioral invariants
stay.
sh -c, xargs, transparent env prefixes, and quoted program/flag spellings previously had no coverage for the git-global-config rule; only the plain forms were pinned. Assert they all still ask, and that scoped read-only git config forms stay unflagged.
Existing torn-tail tests only tear a tail segment behind a clean turns.jsonl. A session small enough to never roll over tears the base the isogit store parses first, which takes the resilient recovery path instead. Pin that the base-only tear recovers committed turns, extra segments survive it, and the next write heals the file.
Pin that disposeExecRuntime cancels all live workers with the close reason before agent teardown starts, and that a rejected agent close neither blocks toolset disposal nor rejects the teardown.
Cover the enqueue-during-await race: a rotation queued while a delivery is still awaiting its send must wait for the delivery to settle, and a failed delivery must not block the rotation behind it.
The connect mock served one static tool payload, so reconnect tests could not observe a server whose tools changed between generations. Parameterize the payload and pin that reconnect mounts exactly the drifted set: renamed schema on the same tool, a new tool, a single definition per name, the stale client closed, and the drift announced through onToolsChanged.
The mount-gate probes await a full runSubAgent cycle whose inference send to an unreachable host classifies as retryable, so each test slept through the client's full backoff schedule (three attempts, 500ms plus 1000ms fixed) before asserting mount counts. Under suite load that crossed the 5s per-test timeout. Point the send at a local server answering 401, which classifies credential_failure and never retries, and give the four full-runtime probes a 15s timeout to absorb construction-time load spikes.
Tests that pin an asset's literal wording or an exact palette value fail
on copy and design edits while catching no behavior regression, and an
audit found most low-value tests shared that shape. A local eslint rule
now rejects the known shapes in test files; it is a heuristic shape
match, calibrated to stay silent on behavior-string assertions like
command parsing, approval display, and permission tokenization.
@linear-code

linear-code Bot commented Sep 8, 2026

Copy link
Copy Markdown

CL-7514

CL-7515

CL-7513

CL-7516

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