Repository navigation
refactor(daemon): own the replay script source fixture where it is used - #3704
Conversation
…on's test support Pure git mv; the daemon owns the test stand-in for a client that collects replay sources, so the file leaves replay-port. Imports, importers and the dead helper follow in the next commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The loader-based stand-in for a client leaves replay-port's exports: the daemon's tests import its private copy, root keeps the two helpers its composition tests and provider harness use, and replay-port keeps the two its own test uses. noMaestroIncludeSources had no importer and goes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Size Report
Startup median (7 runs, lower is better):
|
There was a problem hiding this comment.
All reported issues were addressed across 28 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
|
This PR looks good at 203b1b1. CI is green: all 20 checks pass, and the touched tests ran there. I know of no conflicts. Not blocking: On the open review thread: the cubic-dev-ai note on env forwarding in the support fixture does not apply to this change, so please resolve it (#3704 (comment)). The fixture is a plain move, and the old version also passed no env to the loader. No test depends on it today, so a follow-up could add it if wanted. |
|
|
On the two copies of |
What
Removes
replay-port/replay-script-source-fixtures(replay-port exports 30 → 29), the last fixture export in the replay packages. The loader-based helpers can't live in test-kit: they need replay-port, and replay-port now depends on test-kit, which would be a project-reference cycle. Each consumer therefore owns a private copy of only what it uses.Fixture decision
withClientReplayScriptSources,replayScriptSourceBundleFor,maestroScriptSourceBundleForpackages/daemon/src/__tests__/support/replay-script-source-fixture.ts(the original file,git mv)script-source-bundle,source-discovery).replayScriptSourceBundleFor,withClientReplayScriptSourcesdaemon-compositiontests (specifier-only edits) andtest/integration/provider-scenarios/harness.tssrc/__tests__/test-utils/replay-script-source.fixtures.tsreplayScriptSourceBundleFor,maestroScriptSourceBundleForsession-test-source-discovery-inspection.test.ts)src/replay-script-source.fixtures.ts, not exportednoMaestroIncludeSourcesdaemon-runtime-port-fixtures.ts)Commits
git mv packages/replay-port/src/replay-script-source.fixtures.ts packages/daemon/src/__tests__/support/replay-script-source-fixture.ts(pure).noMaestroIncludeSourcesremoved; the 22 daemon importers point at it relatively; the root fixture, the slim replay-port fixture and the three root specifiers; the replay-port export dropped.Test-count parity
All 19 test files that import the fixture, run with
AGENT_DEVICE_VITEST_MAX_WORKERS=1 --testTimeout=60000: 119 passed / 0 failed here. Onorigin/main, the same 19 files under normal timeouts: 107 passed / 12 failed, 119 total — the 12 are 5 s timeouts and the failing set changed between runs (host load average 150-580 while I measured), so I read the totals (119 = 119) as parity and the 60 s run as the pass evidence. CI is authoritative for green on this head. Novi.mockwas added; the fixture files contain none.Surface
replay-port exports 30 → 29; no new subpath, barrel or
export *; test-kit untouched. replay-port, daemon and root each import only production exports of replay-port.Gates
check:layering,check:gate-manifest,pnpm format,pnpm lintandtsc -bclean.check:affected --runnot run locally: the shared host gate lock was queued behind other threads and load was extreme; CI runs it.🤖 Generated with Claude Code