Skip to content

test: converge suite on semantic boundaries - #3663

Merged
max-sixty merged 2 commits into
mainfrom
tests
Jul 30, 2026
Merged

max-sixty merged 2 commits into
mainfrom
tests

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

This follows the first test-simplification tranche by converging the remaining suite around distinct semantic and pragmatic contracts rather than raw case count. The branch removes false-confidence tests, invalid setup variants, repetitive snapshots, and expensive PTY overlap while strengthening the retained route, precondition, and interaction proofs.

What changed

  • Replace obsolete CI-status integration mocks and blank snapshots with direct provider semantics, mixed-priority cases, and strict GitHub/GitLab route assertions.
  • Remove free-riding merge, push, remove, list, security, config, and switch cases whose setup never reached the named behavior; consolidate repetitive direct cases into labeled tables.
  • Reduce the switch picker from 42 PTYs to 19 distinct terminal contracts, using causal release gates for asynchronous loading and repaint behavior.
  • Add a cached main-only picker fixture, eliminating 138 unnecessary Git subprocesses across the retained PTYs, and integrate it with main's generated hermetic standard fixture.
  • Tighten test guidance around proving setup preconditions and mock invocation routes, and correct the comments-tab help text and generated mirrors.

Reviewer map

  • tests/integration_tests/ci_status.rs and src/commands/list/ci_status/: provider semantics and route coverage.
  • tests/integration_tests/switch_picker.rs, src/commands/picker/, and src/testing/: retained PTY contracts, causal mocks, and fixture design.
  • tests/integration_tests/config_show.rs, src/config/deprecation.rs, src/config/expansion.rs, and worktree type/resolve tests: direct-boundary consolidation.
  • tests/CLAUDE.md: the testing rules extracted from the false-confidence cases found during the survey.

The measured loop removed 98 tests, 65 snapshots, and 23 picker PTYs. Controlled warm Nextest execution improved from a 79.593-second mean to 72.574 seconds (8.8%), while comparable production-line coverage moved from 97.32% to 97.23%. The tracked PR diff is a net deletion of more than 5,700 lines.

Validation

  • cargo run -- hook pre-merge --yes after syncing current main: 4,468 passed, one configured skip; docs, doctests, clippy, formatting, policy checks, and snapshots green.
  • task coverage on the completed change before the base sync: 4,465 passed, one configured skip; 97.23% comparable production-line coverage.
  • Three independent final audits found no remaining lost beliefs, fixture hazards, or safe PTY consolidations.

This was written by Claude Code on behalf of max.

@max-sixty
max-sixty merged commit 6d09125 into main Jul 30, 2026
39 checks passed
@max-sixty
max-sixty deleted the tests branch July 30, 2026 07:01
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.

2 participants