Skip to content

Streamline the test suite: fewer, behavior-focused tests #497

Open

Description

@renmengye

The suite has about 3,200 tests and takes about 5 minutes on a laptop with xdist. A small behavior change in the orchestrator (resuming a session that stops with nothing staged, #496) first broke 53 tests. Most of them did not test that behavior. They pinned an exact sequence of harness calls along their way to testing something else.

Goal: fewer tests, each testing one behavior, so a change breaks only the tests about it.

Suggested pass:

  • Find tests that assert full harness call sequences or exact prompt text when their subject is something else. Replace those assertions with the one property under test.
  • Merge parametrized cases that exercise the same code path (for example the many test_scope_refusal_* variants and test_review_submit_parks_and_delivers_verdict with 12 parameter combinations).
  • Move shared scenario setup into a few fixtures, so a behavior change is fixed in one place.
  • Delete tests that duplicate a covered path with a different fixture.
  • Track the count and the runtime before and after. Coverage of src/ should not drop.

This should run as its own PR series, with no behavior changes mixed in.

Activity

  1. added 7 commits that reference this issue on Oct 11, 2026
  2. added 8 commits that reference this issue on Oct 23, 2026
  3. renmengye commented on Oct 24, 2026

    @renmengye
    MemberAuthor

    Slices merged 2026-10-24, all tests-only:

    About 140 tests removed. Each slice was checked with missed-line sets before and after, and no line that was covered before is uncovered now.

    Lesson: line coverage alone let boundary cases slip. Reviewers caught dropped permission-bit, cadence, ending-kind and per-kind fencing cases, and all were restored. Future slices should diff the removed parametrize entries against the branches the test body takes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions