Skip to content

Consolidate test support and enforce test-suite boundaries #8345

Closed
17 of 17 issues completed
Closed

Description

@jyaunches

Objective

Reduce duplicate test setup and keep test registration visible to Vitest and repository checks. This focused Epic is a child of #8281 and adds no product behavior.

The rebuild suite crossed the repository's 1,500-line test-file budget and was split through non-test registrar modules. That reduced the visible file length, but 3,087 lines and 88 tests now execute from modules that are not ordinary *.test.ts project members. The same review found unused helpers, exact duplicate fixtures, repeated setup mechanics, and two large rebuild harnesses with overlapping responsibilities.

Scope rules

  • Prefer deletion or adoption of an existing fixture before creating another helper.
  • Keep scenario inputs, trust-boundary setup, and behavior assertions in the owning test.
  • Shared support may own setup mechanics and fresh valid baselines only.
  • Require a negative net LOC delta for consolidation work.
  • Preserve test titles, collected-test counts, and production behavior.
  • Do not introduce a generic mock DSL, compatibility wrapper, or new product surface.

Relationships and readiness

Ready independently

Issue Work Starter label
#8284 Consolidate duplicate DCode rebuild and probe fixtures good first issue
#8289 Establish root process, runtime, installer, and environment fixtures No
#8290 Consolidate plugin migration and runner fixtures No
#8346 Delete the unused runtime-recovery preload helper good first issue
#8347 Make the policy-handler suite use its existing fixture good first issue
#8348 Share stopped foreign-container cases good first issue
#8349 Make the snapshot suite use the restore fixture No
#8350 Delete the duplicate vLLM contract suite good first issue
#8351 Share vLLM install test setup No
#8352 Centralize Dockerfile RUN and logged-shell support No
#8353 Reuse canonical rebuild recovery and environment fixtures good first issue
#8354 Make six rebuild-flow case modules ordinary suites No
#8355 Centralize DCode start-script fixture construction No
#8356 Move MCP lifecycle-lock properties to the source-local suite No

Wait for prerequisites

Issue Work Native blocked by Why
#8357 Consolidate messaging-plan builders #8347 Establish every active fixture consumer before changing the shared builder contract.
#8358 Reject test registration from helper and non-suite modules #8354, #8356 Land the guard with zero legacy violations and no allowlist.
#8359 Refactor rebuild harnesses into a shared core and two profiles #8284, #8353, #8354 Remove small duplicate owners and normalize suite discovery before the broad harness migration.
flowchart LR
  I8347["#8347 Policy fixture adoption"] --> I8357["#8357 Messaging-plan builders"]
  I8354["#8354 Rebuild suites"] --> I8358["#8358 Registration guard"]
  I8356["#8356 MCP property migration"] --> I8358
  I8284["#8284 DCode fixtures"] --> I8359["#8359 Shared rebuild harness"]
  I8353["#8353 Recovery and env fixtures"] --> I8359
  I8354 --> I8359
Loading

First-time contributor work

Only small, test-only tasks with named files, clear existing behavior, and no security or lifecycle judgment receive good first issue. Broader fixture contracts, test-discovery changes, shell and image tests, and property-based lifecycle tests receive help wanted where external contribution is appropriate without the starter label.

Completion criteria

  • Every sub-issue is complete or closed with a recorded reason.
  • Duplicate and unused helpers in scope have one clear owner or are deleted.
  • Tests register from discoverable test files or explicitly named shared suite modules.
  • The repository check rejects accidental test registration from helper modules without a legacy allowlist.
  • Targeted tests, type checks, project-membership checks, and repository checks pass for each child.

Sub-issues

Sub-issues

17 of 17 Issues completed
Loading 17 sub-issues

Activity

  1. added
    area: ci
    on Aug 5, 2026
  2. added theissue type on Aug 5, 2026
  3. added
    area: architecture
    on Aug 5, 2026
  4. jyaunches commented on Aug 20, 2026

    @jyaunches
    ContributorAuthor

    Completion review

    All 17 native sub-issues are closed with reason completed.

    The epic completion criteria are satisfied:

    • The merged child PRs delete unused helpers or give repeated setup mechanics one named owner.
    • Tests register from discoverable test files or explicitly named shared suite modules.
    • PR ci(checks): reject Vitest test registration outside test files #8534 adds the repository check that rejects Vitest registration from helper modules. The check has no legacy allowlist.
    • PR refactor(sandbox): give rebuild test harnesses one shared core #8581 gives the generic and Deep Agents Code rebuild suites one shared core. Its focused tests, type checks, repository checks, and required CI checks passed.
    • Each child PR records targeted test evidence and a documentation writer review result.
    • The changes add no product behavior or supported surface.

    The later audit in #9497 found duplicate behavior coverage that the fixture work intentionally preserved. PR #9501 removed 60 duplicate declarations across 18 clusters, preserved unique assertions, and removed 1,619 net lines. Issue #9497 is also closed with reason completed.

    Project Status is Done. Closing reason is completed.

    Thank you to the contributors who completed this epic.

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

    area: architecturearea: ci

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions