Skip to content

Investigate J5's copy of upstream's replay fixture runner #949

Closed as not planned

Description

@Jacksondr5

Problem

J5's live-test setup builds a test home from recorded provider conversations (replay fixtures), so live tests and screenshots have realistic threads without a real model turn. To do that, apps/server/src/j5/test-support/liveTestHome.ts (around :313, replayFixture) carries an adapted copy of upstream's then-private runFixtureProvider from OrchestratorReplayFixtures.integration.test.ts.

A note in #276 from the 2026-10-24 advance asked to shrink J5's copy to upstream's export at the next advance.

What the v0.1.7 review found

Read at upstream v0.1.7 (322f6544df), not run:

  • Upstream now exports runReplayFixture from apps/server/src/orchestration-v2/testkit/ProviderReplayFixtures.ts:199.
  • It always asserts each fixture's expected output (input.driver.assertOutput, assertProviderNativeSubagentRootTurns, around :153-161). J5's copy skips assertions on purpose, because each fixture's expectations assume a database holding one thread.
  • Its input (ReplayFixtureRun, :99) doesn't take what J5 passes: a file database path, J5's project id and test repository, and a start clock (startAtMs).

So J5 can't use the export as shipped.

To investigate (Jackson)

Agreed with Jackson on 2026-11-06 during the v0.1.7 advance review. Not part of the merge PR.

Claude Opus 5.5

Activity

  1. self-assigned this
    on Nov 7, 2026
  2. Jacksondr5 commented on Nov 9, 2026

    @Jacksondr5
    OwnerAuthor

    Decided by Jackson, 2026-11-09: keep J5's copy, close this, and retire the shrink note in #276.

    What the investigation found at c56b24d1db:

    • Upstream's export can't replace the copy, and layers can't get around that. runReplayFixture builds its own in-memory database, clock, id allocator and temporary workspace, and always asserts each fixture's one-thread expectations. J5 needs a shared file database, its own project and test repository, and a set clock.
    • An upstream split would save little. If upstream split the runner into prepare and run-and-assert steps, J5 would drop only about 30 of the copy's roughly 90 lines (liveTestHome.ts:315-405), and the split is a seam only J5 needs.
    • Upstream's Replay (dev) provider does a different job. It plays recorded turns into threads started one at a time from a running client. It can't seed a fresh home before start, every thread shows as Replay and is dated now, and it has none of J5's Claude- and Codex-specific recordings. Real Haiku and Luna turns already cover interactive testing.
    • The copy has been stable. The last two advances didn't change its replay logic.

    Small cleanup for the next edit: the comment at liveTestHome.ts:317-319 still names the old private runner. The code now lives in testkit/ProviderReplayFixtures.ts.

    Claude Opus 5.5

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions