refactor(test-kit): drop the daemon-contracts dependency
What
spawnLegacyDaemonFixture was test-kit's only use of @agent-device/daemon-contracts, and root src/__tests__/daemon-registration-owner.test.ts was its only importer. It moves beside that test, and test-kit drops the daemon-contracts dependency and tsconfig reference. daemon-contracts (and any package that depended on it) is then free to declare test-kit as a devDependency without a project-reference cycle.
Graph check (workspace dependencies + devDependencies, transitive)
| test-kit reach before | after | |
|---|---|---|
| direct deps | capture-kit, command-registry, contracts, daemon-contracts, host-kit, kernel | capture-kit, command-registry, contracts, host-kit, kernel |
| transitive | + ad-script, selectors | + ad-script, selectors |
Packages that can never declare test-kit (they sit under it): capture-kit, command-registry, contracts, host-kit, kernel, ad-script, selectors. daemon-contracts leaves that set. Nothing in test-kit's src imported daemon-contracts besides this fixture (git grep clean after the move).
Commits
git mv packages/test-kit/src/legacy-daemon-fixture.ts src/__tests__/daemon-registration-owner.fixtures.tsโ 100% similarity, named for the one test that uses it.- Entry export, importer specifier, manifest, tsconfig reference and lockfile; the fixture's two repo-root
new URL(โฆ)hops lose one../for the shallower directory (the test exercises both, 47/0).
Parity
src/__tests__/daemon-registration-owner.test.ts: 47 passed / 0 failed on origin/main, 47 / 0 on this head. It stays under src/**/*.test.ts (unit-core). No vi.mock in the moved file. test-kit exports: still the single . entry; named exports 67 โ 66 (spawnLegacyDaemonFixture removed).
Gates
check:layering, check:gate-manifest, check:fallow, pnpm format: clean. check:quick/check:affected --run fail on main's own typecheck errors (fixed by #3684); with #3684's commits cherry-picked locally on a throwaway branch, check:affected --run passes (1828 files, 15474 tests). Rebase after #3684 merges.
๐ค Generated with Claude Code