Repository navigation
test(session-test-source-discovery-inspection): write remote test attempt artifacts from shipped script sources - #4623
Conversation
…empt artifacts from shipped script sources inspectReplayTestSource now returns the script it read as sourceText, and discoverReplayTestEntries copies that field onto a run entry when the source has it. runSingleReplayTestAttempt passes entry.sourceText into prepareReplayTestAttemptArtifacts. When the value is a string, including an empty string, copyReplaySourceFile writes it to replay.ad and to the original flow filename and leaves the caller path unopened; when sourceText is absent, it still copies the local file. Refs callstack#4561
|
The code at 6dc09a5 looks correct: remote test attempts now write Could Not blocking, and you can take or leave these: a route-level case next to The PR says |
…rces ReplayTestSource.sourceText and the run discovery entry's sourceText are now required, and copyReplaySourceFile always writes that text into the attempt directory. The fs.copyFileSync fallback that read the entry path on the daemon host is gone, so a remote client can no longer make the daemon copy a daemon-host file into the downloadable artifacts. inspectReplayTestSource already sets the text on every source. Refs callstack#4561
|
Made |
|
The code at 129752a looks ready, and the earlier concern about missing evidence from 6dc09a5 is now resolved. Not blocking: the PR body still says discovery copies sourceText "when the source has it" and falls back to copying the local file, but this head made the field required and removed that fallback. You could replace that paragraph with: inspectReplayTestSource returns the shipped script as a required sourceText, discovery copies it onto every run entry, and copyReplaySourceFile writes it to replay.ad and the original flow filename without opening entry.path. You could also trim the test plan to the vitest run plus CI. The Coverage job failed in the "Run coverage" step, and the log shows no failing test or vitest summary. Its output stops about 2.5 minutes before the step fails, which looks like a killed or hung worker rather than a test failure. The changed tests are in-process fs tests, and all other checks are green. The changed-line coverage gate was skipped. Please re-run the job. Coverage must pass at 129752a before merge, and if it fails again, the failing test or hang needs a look. No live device run is needed, because the change only prepares attempt artifacts before any device dispatch. |
|
Thanks for merging this, @thymikee. Remote Maestro runs should now get their attempt artifacts written from the shipped flow text instead of failing with ENOENT on a path only the caller has. |
Summary
A Maestro test sent to a daemon on another machine fails with ENOENT while the attempt directory is prepared, and the run never reaches a device. The missing path is the flow file from the caller, which that daemon host does not have. Refs #4561. Each attempt called prepareReplayTestAttemptArtifacts with only entry.path, and copyReplaySourceFile always used copyFileSync on that path. Source inspection had already read the shipped script, but inspectReplayTestSource returned only the path and manifest, so discoverReplayTestEntries never placed the text on the run entry.
inspectReplayTestSource now returns the script it read as sourceText, and discoverReplayTestEntries copies that field onto a run entry when the source has it. runSingleReplayTestAttempt passes entry.sourceText into prepareReplayTestAttemptArtifacts. When the value is a string, including an empty string, copyReplaySourceFile writes it to replay.ad and to the original flow filename and leaves the caller path unopened; when sourceText is absent, it still copies the local file.
Refs #4561
Test plan
npx --no-install vitest run on the source-inspection, artifact, attempt, and discovery test files passed 4 files and 35 tests.
Ran
pnpm run test-app:installin a Linux container (localhost/osc-linux-node:22) for the agent-device inspectReplayTestSource change; it passed.The changed test packages/replay-port/src/daemon-port/session-test-source-discovery.ts did not run here: no test runner for it was available.
The changed test packages/replay-test/src/index.ts did not run here: no test runner for it was available.
The changed test packages/replay-test/src/internal/session-test-artifacts.ts did not run here: no test runner for it was available.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.