Skip to content

refactor(replay): move test outcomes and support into replay-port - #3024

Merged
thymikee merged 3 commits into
codex/2663-replay-dispatchfrom
codex/2663-replay-test-outcomes
Sep 28, 2026
Merged

thymikee merged 3 commits into
codex/2663-replay-dispatchfrom
codex/2663-replay-test-outcomes

Conversation

@thymikee

@thymikee thymikee commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Summary

Move ten dependency-light replay support files into @agent-device/replay-port: test infrastructure classification, outcome projection, artifact collection, flag policy, trace writing, report action types, and suggestion ranking. The three paired test suites move with their sources. Daemon replay consumers import the owning package subpaths.

This dependent #2663 slice builds on #3022. Production implementations are unchanged; moved tests use kernel response types and a package scratch helper to satisfy the package boundary.

Validation

  • Exact head edec4ea61: fresh pnpm install --frozen-lockfile && pnpm build && pnpm check:affected --run passed; pnpm check:fallow --base origin/main and the focused runtime-artifacts suite (2 tests) passed.
  • The three moved test suites passed (15 tests).
  • pnpm typecheck, tracked-file layering, eager-closure budgets, lint, and fallow passed.
  • pnpm format ran repository-wide.

The remaining daemon replay tree and live .ad/Maestro characterization are tracked in #2663.

@thymikee
thymikee added this pull request to stack #3020 September 28, 2026 11:34
@thymikee thymikee changed the title codex/2663 replay test outcomes refactor(replay): move test outcomes and support into replay-port Sep 28, 2026
@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://callstack.github.io/agent-device/pr-preview/pr-3024/

Built to branch gh-pages at 2026-09-28 16:54 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
Installed (including dependencies) 4.87 MB 4.87 MB 0 B
Package (unpacked) 4.87 MB 4.87 MB 0 B
Package (download) 1.46 MB 1.46 MB -6 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 28.4 ms 27.6 ms -0.7 ms
CLI --help 84.8 ms 82.6 ms -2.2 ms

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 22 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread packages/replay-port/src/tmp-dir.fixtures.ts
Comment thread packages/replay-port/src/tmp-dir.fixtures.ts Outdated
@thymikee

Copy link
Copy Markdown
Member Author

Reviewed at 1dbac80. The moves look right, but the PR adds a third copy of a test helper.

mkdtempForTestSync in packages/replay-port/src/tmp-dir.fixtures.ts repeats the helper that packages/replay-test/src/tmp-dir.fixtures.ts already exports. replay-port already depends on @agent-device/replay-test. Can this import that helper? If it must stay separate, please add the same fallow-ignore-next-line code-duplication marker as the sibling. Also fix the comment: the TMPDIR is removed once after all workers, not after each worker.

CI: the Smoke Tests jobs are still queued or running, with no failures yet. They do not exercise this package. This PR stacks on #3022, which was rebased, and now has conflicts with it. Please rebase.

@thymikee

Copy link
Copy Markdown
Member Author

This is a follow-up to the earlier review at 1dbac80 (#3024 (comment)). At c36c940 the request from that round is still open.

mkdtempForTestSync in https://github.com/callstack/agent-device/blob/c36c940/packages/replay-port/src/tmp-dir.fixtures.ts#L5 repeats the body of the existing helper in packages/replay-test/src/tmp-dir.fixtures.ts:19, but without the fallow-ignore-next-line code-duplication marker the sibling copy carries. Its doc comment also says the unit suite removes the tmp dir after each worker, but scripts/vitest-tmpdir-global-setup.ts removes TMPDIR once, after all workers finish. The range-diff from 1dbac80 to c36c940 shows the commit that adds this file unchanged, so this is the same open item, not a new one. Only the one moved test that needs scratch dirs uses this helper, so there's no functional risk, but the stale comment could mislead someone debugging tmp-dir cleanup later. The fix is either to add the same fallow-ignore-next-line code-duplication marker and correct the comment to say the dir is removed once after all workers finish, or to import replay-test's helper directly — the latter needs a new subpath export since replay-test currently exports only ., so it isn't a plain import swap.

The rest of the move (9 files) was reviewed in the prior round and the range-diff shows no content change there, so that part is not re-checked here.

Smoke Tests is the only non-passing check and is still queued; the prior review already noted it doesn't exercise this package, and this delta only touches replay-port test-support moves and a package.json export reorder, with no daemon boot, CLI, or device-facing route touched, so it reads as unrelated to this change. The Smoke Tests log itself wasn't opened since the job hadn't started.

No conflicts are known.

Before this can merge, the tmp-dir.fixtures.ts duplication either needs the same fallow-ignore marker as its sibling with a corrected cleanup comment, or needs to import the existing replay-test helper through a new subpath export.

@thymikee

Copy link
Copy Markdown
Member Author

Reviewed at edec4ea. The comment and marker on the test fixture close the item from the earlier review. The rest is a pure move of test outcomes and support into packages/replay-port with import-path rewrites, so this is ready for human review.

Not blocking: fallow-baselines/health.json line 579 still names src/daemon/replay/internal/session-test-infrastructure.ts, which no longer exists. Move that entry to packages/replay-port/src/daemon-port/session-test-infrastructure.ts, or drop it if fallow reports nothing there now.

CI: Smoke Tests is still queued. This diff does not touch the route it runs.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Sep 28, 2026
@thymikee
thymikee force-pushed the codex/2663-replay-test-outcomes branch from edec4ea to b0948dd Compare September 28, 2026 16:35
@thymikee
thymikee merged commit 0387485 into main Sep 28, 2026
29 of 40 checks passed
@thymikee
thymikee deleted the codex/2663-replay-test-outcomes branch September 28, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant