Skip to content

Consolidate the duplicate DCode test helper #8284

Closed

Description

@jyaunches

Objective

Use one Deep Agents Code rebuild helper and one DCode probe fixture.

Evidence

  • test/helpers/rebuild-dcode-flow-helpers.ts and test/helpers/rebuild-dcode-flow-support.ts duplicate makeDcodeSandboxEntry, configureDcodeSession, and expectNoDcodeMutation. The first module also owns setGatewayProviderMetadata.
  • src/lib/actions/sandbox/snapshot-restore-test-fixture.ts duplicates DcodeProbeState and dcodeProbeOutput from src/lib/actions/sandbox/dcode-probe-test-fixture.ts.

Scope

  • Keep test/helpers/rebuild-dcode-flow-helpers.ts as the rebuild-helper owner.
  • Move consumers and delete test/helpers/rebuild-dcode-flow-support.ts.
  • Import and re-export the dedicated DCode probe type and function from snapshot-restore-test-fixture.ts.
  • Do not change production behavior, fixture values, test titles, or assertions.

Expected net reduction: at least 49 LOC.

Relationships

Why this is a good first issue

This is a test-only consolidation with named duplicate definitions, an existing canonical owner, and no production behavior change.

Acceptance criteria

  • Each duplicated DCode rebuild helper has one definition.
  • dcodeProbeOutput and DcodeProbeState have one implementation.
  • Existing consumers compile without compatibility wrappers.
  • Targeted suites preserve their current titles and behavior.
  • The change has a negative net LOC delta.

Validation

npx vitest run --project cli src/lib/actions/sandbox/rebuild-dcode-*.test.ts src/lib/actions/sandbox/snapshot*.test.ts
npm run test:projects:check

Activity

  1. added
    area: architecture
    integration: dcode
    good first issue
    help wanted
    on Aug 5, 2026
  2. added theissue type on Aug 5, 2026
  3. added a commit that references this issue on Aug 7, 2026
    e3a824d
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: architecturegood first issuehelp wantedintegration: dcode

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions