Repository navigation
refactor(command-registry): move the wait-positionals test into the package - #3656
Conversation
|
This PR is ready at 517ef43. The test move into the command-registry package looks right, and it adds only a devDependency, so it touches no production route. Not blocking: the comment at https://github.com/callstack/agent-device/blob/517ef43/packages/daemon/src/sessions/handlers/__tests__/snapshot.test.ts#L113 still points to src/tests/wait-positionals.test.ts as the root-owned home of the #1800 rejection coverage, but this PR deletes that path. You could point it to packages/command-registry/src/wait-positionals.test.ts, or leave it. CI is still pending, with all checks queued and no failures yet. There are no conflicts. I did not run the moved test. I also did not check the other vitest project excludes in full, or whether the moved file's selectors imports resolve inside the package (the lockfile lists selectors as a dependency). The next step before merge is for CI to finish green. |
|
Size Report
Startup median (7 runs, lower is better):
|
…ackage Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the test's fast-check dependency Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
517ef43 to
742a64a
Compare
|
The PR is ready at 742a64a. The earlier clean review of 517ef43 still holds, and the test now sits at Not blocking: the comment at https://github.com/callstack/agent-device/blob/742a64a/packages/daemon/src/sessions/handlers/__tests__/snapshot.test.ts#L113 still points to I did not run the moved test or the CI gates, and I did not check that |
What
src/__tests__/wait-positionals.test.tstestsparseWaitPositionals/resolveWaitBudgetMsfrom@agent-device/command-registry/wait-positionalsand nothing in rootsrc. That is procedure case 2 (a package's test living at root), so it moves beside the module it tests:packages/command-registry/src/wait-positionals.test.ts.git mv(100% similarity)../wait-positionals.ts; command-registry declaresfast-checkindevDependencies(the test uses it; the lockfile importer entry is added,pnpm install --frozen-lockfilepasses).The test still imports
PROPERTY_RUNSfrom@agent-device/selectors/snapshot-geometry-fixtures(selectors is already a command-registry dependency). That specifier is changed when the fixture moves to test-kit.Fixture decisions (root importers of the fixtures I own)
I classified every root
src/test/scriptsimporter of the four fixture exports. This is the only one that tests package code. The others test rootsrc/commands/**,src/platform-runtime*, the CLI or integration harnesses (root worker), orsrc/__tests__/daemon-composition/**(daemon thread), so they only get import-specifier edits when their fixture moves.src/__tests__/kernel/snapshot-ref-grammar.test.tstests the kernel package and belongs to whoever owns kernel.Parity
vitest run <file> --reporter=json: before 17 / 17 atsrc/__tests__/wait-positionals.test.ts; after 17 / 17 atpackages/command-registry/src/wait-positionals.test.ts. Selected byunit-core(packages/*/src/**/*.test.ts) and ran undercheck:affected --run. Novi.mock.Surface
exportscount command-registry 21 -> 21. No new subpaths, barrels orexport *. One new devDependency (fast-check, already used by the repo).Gates
check:quick,check:layering,check:fallow,check:gate-manifest,pnpm formatpass.pnpm check:affected --runfails open to the full set (a package manifest changed) and passes except one test unrelated to this diff:scripts/__tests__/eager-closure-budgets.test.ts > no APPROVED_OVER_CEILING row is stalereportspackages/daemon/src/index.ts(the row added with the daemon single-entry change #3633). Nothing in this branch touches daemon or that table.Pointer for the daemon thread: the comment at
packages/daemon/src/sessions/handlers/__tests__/snapshot.test.ts:113namessrc/__tests__/wait-positionals.test.ts; it should now readpackages/command-registry/src/wait-positionals.test.ts. I left it alone because I only edit specifiers in daemon files.🤖 Generated with Claude Code