Repository navigation
refactor(daemon-contracts): drop the registration and claims fixture exports - #3689
Conversation
|
|
This PR is ready at ff09203. I found no problems in the diff. Not blocking: CI is still running on this head: 14 of 18 checks are queued or in progress, and none have failed. I did not run the typecheck, layering, fallow or unit gates myself. The 194/194 parity numbers come from the PR body and I did not reproduce them. This PR is stacked on #3686, and I only checked that test-kit has no daemon-contracts dependency at this head. I did not review #3686's own diff. No conflicts. Before merge, CI needs to finish green on this head and #3686 needs to land, after which GitHub will retarget this PR to main. |
Size Report
Startup median (7 runs, lower is better):
|
… module Pure git mv; the test imports createDeviceClaimReconciler and only daemon-contracts' own code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e fixtures Adds publishDaemonRegistration and deviceClaimFilePath as named exports and points the daemon and root importers at them. deviceClaimFilePath restates the sha256 on-disk layout instead of re-exporting the production resolver. daemon-contracts declares test-kit as a devDependency; the claim reconciler test uses it from beside its module. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…re exports daemon-registration.test.ts publishes through test-kit; device-claims.fixtures only re-exported production functions, now reached through their modules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… of a local copy Removes the package's tmp-dir.fixtures.ts duplicate now that test-kit no longer depends on it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ff09203 to
4e4294b
Compare
…ion resolver deviceClaimFilePath restates the on-disk layout on purpose; this fails the moment the two copies drift, including the AGENT_DEVICE_CLAIMS_DIR override. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Took the drift-test suggestion: On the new head |
|
The code looks good at 701802c. This follows my earlier review at ff09203, and nothing from that review is left open. All 23 checks pass. I did not run the drift test or the sha1 mutation locally, so I relied on your report and on green CI. I also did not run the layering scan locally, so I relied on CI and a grep. There are no conflicts. #3689 is stacked on #3686, so it can merge once that base lands. |
…ctions-1 * origin/main: feat(react-devtools): inspect React components and profile renders through the Metro inspector (#3613) refactor(daemon-contracts): drop the registration and claims fixture exports (#3689) refactor(test-kit): drop the daemon-contracts dependency (#3686) refactor(test-kit): drop command-registry by making the replay-script generator a root fixture (#3687) fix(ios): handle delayed launch confirmations without stopping XCTest (#3682) refactor(test-kit): move the dispatch-disclosure harness out of contracts (#3690) refactor(test-kit): host the target classification capture fixture (#3691) ci: fold six CI jobs into four with parallel and background steps; cancel superseded and closed-PR runs (#3658) build(typescript): move root project references into tsconfig.typecheck.json (#3688) chore(daemon): declare @agent-device/proxy as a devDependency, since only a test imports it (#3685) refactor(settings): declare settings once and admit them per setting (#3662) # Conflicts: # packages/platform-android/src/alert.ts # website/docs/docs/limrun.md
Stacked on #3686 (test-kit stops depending on daemon-contracts, which this PR needs: daemon-contracts now declares test-kit as a devDependency, and test-kit → daemon-contracts would be a project-reference cycle). Base is #3686's branch; GitHub retargets to
mainwhen it merges. Review only the last four commits.What
Removes
daemon-contracts/daemon-registration-fixturesanddaemon-contracts/device-claims-fixtures(daemon-contracts exports 17 → 15), moves the one test of daemon-contracts' own code out of daemon, and replaces the package's duplicatedtmp-dir.fixtures.tswith test-kit's.Fixture decisions
publishDaemonRegistrationcli-device-status.test.ts)resolveDeviceClaimPathsession-idle-expiry-harness)deviceClaimFilePathAGENT_DEVICE_CLAIMS_DIRoverride so tests pin the on-disk contract instead of re-importing the production resolver. daemon-contracts' own tests never used it.createDeviceClaimReconcilerdevice-claim-reconciliation.ts. The coordinator chose to rewrite it throughdevice-claim-recoverybecause daemon-contracts could not import test-kit; with #3686 it can, so the test moves as a puregit mvinstead (named for its module) and keeps testing the unit directly.Commits
git mvof the reconciler test intopackages/daemon-contracts/src/device-claim-reconciliation.test.ts(pure, 100%).publishDaemonRegistrationanddeviceClaimFilePath; daemon and root importers switch to@agent-device/test-kit(specifiers, plus theresolveDeviceClaimPath→deviceClaimFilePathidentifier at its call sites); the moved test's two specifiers change (./device-claim-reconciliation.ts,./device-claims.ts); daemon-contracts declares test-kit (devDependencies+ tsconfig reference + lockfile).chore(gates): deletedaemon-registration.fixtures.ts,device-claims.fixtures.tsand their two exports.tmp-dir.fixtures.ts; six daemon-contracts tests importmkdtempForTestSyncfrom test-kit.Test-count parity (
vitest run … --reporter=json)All files this diff touches, plus every daemon-contracts test: 194 passed / 0 failed on
origin/main(23 files, with the reconciler test at its daemon path), 194 / 0 here (same files, reconciler test at its new path; plusdaemon-registration-owner.test.ts's 47, covered by #3686). Reconciler test alone: 2 / 0 before and after.Selection:
packages/daemon-contracts/src/device-claim-reconciliation.test.tsis underpackages/*/src/**/*.test.ts(unit-core), collected by path;check:affected --runincludes it.vi.mock: the moved test usesvi.fnonly; none of the touched files adds one.Surface
daemon-contracts exports 17 → 15; no new subpath on any package. test-kit adds two named exports from its one entry (sorted position). No barrels or
export *. daemon-contracts:devDependenciesand tsconfigreferencesboth declare test-kit.Gates (on
ff0920312, rebased on main after #3684)check:quick,check:layering,check:fallow,check:gate-manifest,pnpm format,check:affected --run(exit 0; 1828 files, 15474 tests): all clean.🤖 Generated with Claude Code