Repository navigation
refactor(daemon): cut daemon test edges into root data fixtures and fakes [11a-3] - #3517
Conversation
Size Report
Startup median (7 runs, lower is better):
|
|
I reviewed e51dff5 and found two problems to fix before merge. Both are copied test fakes, and one shared owner should replace each. The new device-inventory-gateways.ts is about 110 lines copied from the existing device-selection fake. It also re-states the discover/providerFirst flow of the real The new replay-script-source.ts copies Not blocking, and you can take or leave these: the Android archived captures and walker builders in android-ui-hierarchy-fixtures.ts are platform fixtures, and they have several non-daemon consumers (core interactor tests, snapshot-chrome tests, Could the daemon avoid new fakes altogether? Export the existing inventory fake through one test-support owner, or move it into test-kit with an injected context wrapper, and point the 43 daemon importers and the root importers at it. That removes about 150 lines. Keep one replay-source helper module with the collector passed in. Keep plugin.fixtures in test-kit, as you have it. Put the Android captures with platform-android if the eager-closure rule allows, or leave them at the root and accept those few edges explicitly instead of inverting core to daemon. The first decision is which module owns the inventory fake: a device-selection test-support subpath or a test-kit dependency edge. The test-kit rejection from ADR-0019 applies only to the Android pieces. The changes are test-only, so I ran no tests or gates here. I relied on your reported 433 files and 3305 tests green, and on the green layering, DI-seams and eager-closure checks. Smoke Tests is still queued, not failed, and this diff does not touch the runtime code that run exercises. There are no conflicts. The next step before merge is to replace the two copied fakes with one shared owner each. |
e51dff5 to
2e636d1
Compare
2e636d1 to
93356dc
Compare
|
The code still has two copied test fakes and two failing checks at 93356dc, so it is not ready to merge. The earlier review at e51dff5 raised the same two copies. The inline bridge is now an in-file helper, but both copies are still there, and the Required evidence is satisfied. First, src/daemon/tests/support/device-inventory-gateways.ts is still a roughly 110-line copy of the fake in Second, src/daemon/tests/support/replay-script-source.ts is a second implementation of the bundle helpers and collector. It has no glob support, no bundle size cap, no not-found Third, Fourth, Not blocking, and you can take or leave these: the delta stat lists limrun, CONTRIBUTING, coverage and website-docs changes, which are probably base movement from the rebase, so please confirm the diff against 2c7a8d0 is test-side only (the PR body says 83 files and I count 84), and the header comments in the new support files narrate the root modules they replace, so drop them or keep one line stating the contract. Could both daemon copies be deleted, with the device-selection fake exposed through one test-support subpath or moved to test-kit, and a single replay-source helper that takes the collector as a parameter? That would remove about 250 lines and keep the edge count at 0 for On checks, the fallow and Lint & Format failures look related to this diff. I did not read the Coverage failure log, and Smoke Tests is still queued. I did not run tests or gates, and I did not grep the head to confirm 0 |
…y source collector Owner review on #3517: the two daemon-side fakes restated logic that already had owners. Both are replaced by single importable owners: - The device-selection test fake becomes the one inventory-gateways fixture: moved to packages/device-selection/src/inventory-gateways.fixtures.ts and exported as ./inventory-gateways-fixtures (with findInstalledApp already in its options and createTestDeviceInventoryGatewaysFromProvider now exported). The daemon copy, the root fake, and its pin (the real composer's fail-closed contract is pinned in platform-runtime-device-inventory.test.ts) are deleted; daemon, root, device-selection, and integration consumers all import the owner. - The real client collector moves into its package: script-source-bundle and source-discovery move from src/commands/replay into replay-port (own exports ./script-source-bundle, ./source-discovery). The bundle helpers live once in packages/replay-port/src/daemon-port/replay-script-source.fixtures.ts (./replay-script-source-fixtures), typed on DaemonWireRequest; both test trees import it and run the same globs, size cap, AppErrors and ranking. - The Android capture fixtures move to platform-android test-only entries (./snapshot-capture-fixtures, ./ui-hierarchy-fixtures) so no test tree reaches sideways; the archived raw JSONs move with them.
93356dc to
c61535e
Compare
|
Rework pushed at c61535e (rebased onto the refreshed base 57b6b9b; findings → fixes):
|
|
The PR is ready at c61535e. Both earlier problems from the 93356dc review are fixed: the fallow findings sat on the copied fakes, and the Lint & Format failure sat on the unformatted fixture, so both are gone or formatted. All 36 checks pass, and the review found no code problems. Not blocking, and you can take or leave these: the single fake in packages/device-selection/src/inventory-gateways.fixtures.ts (https://github.com/callstack/agent-device/blob/c61535e/packages/device-selection/src/inventory-gateways.fixtures.ts#L77) restates createComposedDeviceInventoryGateways without assertProviderOutcome and assertSourceFamily, so a malformed provider outcome in root tests would fail with a TypeError or pass instead of the typed provider_inventory_contract_violation, and the composer pin already owns that contract; the three new APPROVED_OVER_CEILING rows and the mechanics-facet exceptions in scripts/tests/eager-closure-budgets.ts (https://github.com/callstack/agent-device/blob/c61535e/scripts/__tests__/eager-closure-budgets.ts#L135) could be dropped once 11a-2 settles and the Android fixture subpaths can live in test-kit; and the PR body names the inventory pin as src/tests/platform-runtime-device-inventory.test.ts when the file is src/platform-runtime-device-inventory.test.ts. I did not run tests or gates myself, so the parity and gate results rest on the PR body and green CI. I also did not check that moving the collector adds no CLI startup import-closure weight beyond the passing guard, or that the 43-file count in the body matches the 37 files I counted under src/daemon. The total of 60 importers does confirm one owner. Nothing else needs to happen before merge. |
|
Non-blocking items taken; pushed as bd49bf8 (normal push):
Gates: 11,030 tests green across |
…y source collector Owner review on #3517: the two daemon-side fakes restated logic that already had owners. Both are replaced by single importable owners: - The device-selection test fake becomes the one inventory-gateways fixture: moved to packages/device-selection/src/inventory-gateways.fixtures.ts and exported as ./inventory-gateways-fixtures (with findInstalledApp already in its options and createTestDeviceInventoryGatewaysFromProvider now exported). The daemon copy, the root fake, and its pin (the real composer's fail-closed contract is pinned in platform-runtime-device-inventory.test.ts) are deleted; daemon, root, device-selection, and integration consumers all import the owner. - The real client collector moves into its package: script-source-bundle and source-discovery move from src/commands/replay into replay-port (own exports ./script-source-bundle, ./source-discovery). The bundle helpers live once in packages/replay-port/src/daemon-port/replay-script-source.fixtures.ts (./replay-script-source-fixtures), typed on DaemonWireRequest; both test trees import it and run the same globs, size cap, AppErrors and ranking. - The Android capture fixtures move to platform-android test-only entries (./snapshot-capture-fixtures, ./ui-hierarchy-fixtures) so no test tree reaches sideways; the archived raw JSONs move with them.
bd49bf8 to
1159838
Compare
|
Coordinator: rebased onto the current tip of the PR below (stack sync, no content changes). |
|
This PR is ready at 1159838. The earlier clean review at c61535e still stands, and the new commit adds a contracts export, device-selection fixture, root composer and one daemon test change that I found correct when reading the diff. All 36 checks are green, and they cover those routes. I did not run the tests locally, and I did not execute a check that the new fixture test fails without assertProviderOutcome; I reasoned that from the code. I also did not confirm beyond green CI that the export-pin and eager-closure gates account for the two new contracts facade exports. Not blocking, and you can take or leave these: the rebase comment says "stack sync, no content changes" and the body cites bd49bf8, but this head adds a real contracts export and test changes, so a corrected comment and hash would help; and the web-close teardown test change in daemon-runtime-web-close-teardown.test.ts (installFakeManagedAgentBrowser plus a stderr assertion) is a separate concern from the contracts inventory work, so it is worth keeping out of the stated scope. No conflicts are known. The PR is still a draft with the ready-for-human label, so nothing else stands between this delta and merge. |
|
Coordinator correction to my earlier sync comment: the sync itself changed nothing. It only rebased the branch's existing commits onto #3519's new tip, 773f78b. 1159838 is bd49bf8 (the worker's contracts-export and inventory-assertion commit) rebased; the hash changed but the content didn't. The web-close teardown test change ( |
…y source collector Owner review on #3517: the two daemon-side fakes restated logic that already had owners. Both are replaced by single importable owners: - The device-selection test fake becomes the one inventory-gateways fixture: moved to packages/device-selection/src/inventory-gateways.fixtures.ts and exported as ./inventory-gateways-fixtures (with findInstalledApp already in its options and createTestDeviceInventoryGatewaysFromProvider now exported). The daemon copy, the root fake, and its pin (the real composer's fail-closed contract is pinned in platform-runtime-device-inventory.test.ts) are deleted; daemon, root, device-selection, and integration consumers all import the owner. - The real client collector moves into its package: script-source-bundle and source-discovery move from src/commands/replay into replay-port (own exports ./script-source-bundle, ./source-discovery). The bundle helpers live once in packages/replay-port/src/daemon-port/replay-script-source.fixtures.ts (./replay-script-source-fixtures), typed on DaemonWireRequest; both test trees import it and run the same globs, size cap, AppErrors and ranking. - The Android capture fixtures move to platform-android test-only entries (./snapshot-capture-fixtures, ./ui-hierarchy-fixtures) so no test tree reaches sideways; the archived raw JSONs move with them.
1159838 to
2354fd0
Compare
|
The earlier review at 1159838 found no problems, and the rebase onto the new #3519 head (2354fd0) changed only the base. Your patch is the same apart from hunk offsets, and all 41 checks pass. Not blocking, take or leave: Two questions. First, the fake exists only because the daemon test tree cannot import the root module. Could the composer move into I did not run the tests or |
…y source collector Owner review on #3517: the two daemon-side fakes restated logic that already had owners. Both are replaced by single importable owners: - The device-selection test fake becomes the one inventory-gateways fixture: moved to packages/device-selection/src/inventory-gateways.fixtures.ts and exported as ./inventory-gateways-fixtures (with findInstalledApp already in its options and createTestDeviceInventoryGatewaysFromProvider now exported). The daemon copy, the root fake, and its pin (the real composer's fail-closed contract is pinned in platform-runtime-device-inventory.test.ts) are deleted; daemon, root, device-selection, and integration consumers all import the owner. - The real client collector moves into its package: script-source-bundle and source-discovery move from src/commands/replay into replay-port (own exports ./script-source-bundle, ./source-discovery). The bundle helpers live once in packages/replay-port/src/daemon-port/replay-script-source.fixtures.ts (./replay-script-source-fixtures), typed on DaemonWireRequest; both test trees import it and run the same globs, size cap, AppErrors and ranking. - The Android capture fixtures move to platform-android test-only entries (./snapshot-capture-fixtures, ./ui-hierarchy-fixtures) so no test tree reaches sideways; the archived raw JSONs move with them.
2354fd0 to
e4eee6b
Compare
|
Both design questions taken; pushed at e4eee6b (stack of two commits on the fresh 11a-2f base — force-with-lease was needed because the base moved under the previous push; content of the earlier commits unchanged):
Gates on the pushed head: typecheck, layering (incl. enumeration + eager-closure hub budgets), quick, di-seams, gate-manifest, fallow green; full |
…y source collector Owner review on #3517: the two daemon-side fakes restated logic that already had owners. Both are replaced by single importable owners: - The device-selection test fake becomes the one inventory-gateways fixture: moved to packages/device-selection/src/inventory-gateways.fixtures.ts and exported as ./inventory-gateways-fixtures (with findInstalledApp already in its options and createTestDeviceInventoryGatewaysFromProvider now exported). The daemon copy, the root fake, and its pin (the real composer's fail-closed contract is pinned in platform-runtime-device-inventory.test.ts) are deleted; daemon, root, device-selection, and integration consumers all import the owner. - The real client collector moves into its package: script-source-bundle and source-discovery move from src/commands/replay into replay-port (own exports ./script-source-bundle, ./source-discovery). The bundle helpers live once in packages/replay-port/src/daemon-port/replay-script-source.fixtures.ts (./replay-script-source-fixtures), typed on DaemonWireRequest; both test trees import it and run the same globs, size cap, AppErrors and ranking. - The Android capture fixtures move to platform-android test-only entries (./snapshot-capture-fixtures, ./ui-hierarchy-fixtures) so no test tree reaches sideways; the archived raw JSONs move with them.
|
Coordinator: rebased onto #3519's new head |
3bdeef3 to
6b4b1d9
Compare
…ize tripwire Unblocks the stack: 9dc0bb5 (the design-question round on #3517) grew package-boundaries.test.ts from 961 to 1005 lines, crossing the 1000-line test-file tripwire, so the size ratchet fails unit-core on #3517 itself and every branch stacked on it. The ratchet's own message prescribes the repair: split along the mirrored source. Pure move — the test body is byte-identical; the in-memory parser fixtures it shares with the R11 suite move to package-boundaries.fixtures.ts so the split files parse one pair.
package-boundaries.test.ts is over the 1,000-line tripwire (961 at the merge-base), so the size ratchet rejects the consumer-gate pins these branches add to it. Tests mirror source topology: the test-only fixture subpath inventory (R11's TEST_ONLY_FIXTURE_SUBPATHS accept/deny gate and the platform-android manifest's fixture export entries, both owned by package-boundaries.ts) moves with its rule into scripts/layering/test-only-fixture-subpaths.test.ts, mirroring the R13-side pin in platform-package-policy.test.ts. Move-only: the accept/ deny test is byte-identical and the manifest assertion keeps its full sorted key list; it reads the tree itself instead of sharing the real- tree test's package list. package-boundaries.test.ts ends at 955 lines, under its base length.
|
Coverage was red on the size ratchet:
Verified: ratchet test green, |
…ize tripwire Unblocks the stack: 9dc0bb5 (the design-question round on #3517) grew package-boundaries.test.ts from 961 to 1005 lines, crossing the 1000-line test-file tripwire, so the size ratchet fails unit-core on #3517 itself and every branch stacked on it. The ratchet's own message prescribes the repair: split along the mirrored source. Pure move — the test body is byte-identical; the in-memory parser fixtures it shares with the R11 suite move to package-boundaries.fixtures.ts so the split files parse one pair.
… test redeclared Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mon code R11 now denies @agent-device/replay-port/source-discovery and /script-source-bundle to daemon production files; the daemon receives the client's source bundle in the request. The test-consumer predicate is extracted so both R11 subpath gates share it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Took the two remaining notes from your earlier reviews; both are new commits, pushed as a fast-forward:
Verified at |
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
…oot in the client-only gate Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The earlier duplicate-host question is resolved, and I see no code defect at 196452d. The change is still pending evidence: only the Mutants shards are still running (kernel-errors-1, daemon-ref-frame, scroll-edge-state, selectors-2/7/8, target-annotation-serde, snapshot-occlusion), and none has failed. This delta touches scripts/layering, one device-selection fixture export and one root test, so none of it sits on the routes those shards mutate. There are no conflicts. I read the code but did not run the layering gate or client-only-subpaths.test.ts locally, so the regression checks rest on reading, and I did not check whether the closure walker in eager-closure-budgets can express a per-hub deny set without new plumbing. Before merge, the Mutants shards need to finish green. Please also answer one design question: does the src/daemon.ts hub closure own the client-only rule, or does a hand-listed path set own it? Today the gate defines the daemon by the DAEMON_SOURCE_FILE regex plus the two DAEMON_PROCESS_ROOT_FILES. A static import of the replay-port collector from src/platform-runtime-daemon-services.ts, from any src/platform-runtime-.ts, or from a workspace package the daemon imports would still pass R11. The rule to satisfy is that the src/daemon.ts closure never contains packages/replay-port/src/script-source-bundle.ts or source-discovery.ts. Could you delete DAEMON_PROCESS_ROOT_FILES and the daemon-path regex, and give the src/daemon.ts hub entry in eager-closure-budgets a deny set for those two files, enforced like denyPlatformImplementations? That one check would cover daemon/, the root entry, the composition root, every platform-runtime- module and every package the daemon reaches, with no hand edits. The hub closure already exists, so nothing needs to change first. Dynamic imports would stay outside it, which is the limit the platform-implementation rule already accepts. If you keep the path gate instead, please note in its comment that it covers direct imports only. Not blocking, and you can take or leave it: the local On the open inline threads from the other reviewer, all seven are fixed at this head, so please resolve them: client-only denies for src/daemon.ts and src/daemon-composition.ts (the wider transitive gap is the question above), isTestConsumerFile recognizes packages//test/, literal lists pinning the fixture and client-only sets, platform-package-policy, retired-paths-policy.ts, device-lanes.test.ts fixture path, and test-only fixture paths gated by the consumer predicate. |
#3517 merged, so its three over-ceiling fixture entries are carried from the next PR on and the no-growth rule governs them; their rows fail the stale check on every branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
) * test(closure): read committed JSON modules on the merge-base side The `ui-hierarchy-fixtures` export now imports a `.json` capture, so every entry whose base closure reaches it threw at module load: the committed reader served only TypeScript and manifests while the working-tree side read the JSON. Read JSON modules under the walked source roots from the same `git cat-file --batch`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(closure): drop approvals for entries the merge-base now carries #3517 merged, so its three over-ceiling fixture entries are carried from the next PR on and the no-growth rule governs them; their rows fail the stale check on every branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* origin/main: (83 commits) feat(ios): interpret React Native accessibility value semantics (#3589) fix(android): reinstall and reselect the test IME helper after it disappears (#3606) feat(snapshot): carry provider keyboard observations through acquisition (#3593) chore(web): bump managed agent-browser backend to 0.39.0 (#3591) fix(fold): report a dispatched pose as unverified when devicectl has no hinge-angle stream (#3587) feat(android): expose system-bar membership on snapshot nodes (#3585) fix(android): align ADB and Appium field values (#3584) test(closure): read committed JSON modules on the merge-base side (#3602) fix(ci): preserve manual Android suite timing (#3554) refactor(daemon): make the layer folders the declaration (PR 10) (#3520) refactor(move): extract the daemon server into @agent-device/daemon (11b) (#3546) refactor(daemon): package-local runtime fakes for the remaining daemon ports [11a-4] (#3544) refactor(daemon): cut daemon test edges into root data fixtures and fakes [11a-3] (#3517) refactor(11a-2): package-local fakes at the daemon ports; root-own command-surface composition tests (#3519) test(replay): verify Settings queries and bound scrolling (#3560) feat(snapshot): measure Android Appium viewport (#3586) fix(ios): verify a fill whose unidentified field moved while it kept focus (#3596) refactor(coverage): one fallow config with per-function CRAP ceilings (#3588) test: bound CLI promotion cases and align provider budget (#3590) fix(metro): report what the dev-server stop proved instead of assuming success (#3575) ...
* origin/main: (83 commits) feat(ios): interpret React Native accessibility value semantics (#3589) fix(android): reinstall and reselect the test IME helper after it disappears (#3606) feat(snapshot): carry provider keyboard observations through acquisition (#3593) chore(web): bump managed agent-browser backend to 0.39.0 (#3591) fix(fold): report a dispatched pose as unverified when devicectl has no hinge-angle stream (#3587) feat(android): expose system-bar membership on snapshot nodes (#3585) fix(android): align ADB and Appium field values (#3584) test(closure): read committed JSON modules on the merge-base side (#3602) fix(ci): preserve manual Android suite timing (#3554) refactor(daemon): make the layer folders the declaration (PR 10) (#3520) refactor(move): extract the daemon server into @agent-device/daemon (11b) (#3546) refactor(daemon): package-local runtime fakes for the remaining daemon ports [11a-4] (#3544) refactor(daemon): cut daemon test edges into root data fixtures and fakes [11a-3] (#3517) refactor(11a-2): package-local fakes at the daemon ports; root-own command-surface composition tests (#3519) test(replay): verify Settings queries and bound scrolling (#3560) feat(snapshot): measure Android Appium viewport (#3586) fix(ios): verify a fill whose unidentified field moved while it kept focus (#3596) refactor(coverage): one fallow config with per-function CRAP ceilings (#3588) test: bound CLI promotion cases and align provider budget (#3590) fix(metro): report what the dev-server stop proved instead of assuming success (#3575) ... # Conflicts: # packages/daemon/src/server/http/daemon-runtime-lease-expiry.test.ts # packages/daemon/src/server/http/daemon-runtime.ts # packages/daemon/src/sessions/__tests__/lease-lifecycle.test.ts # packages/daemon/src/sessions/lease-lifecycle.ts
* origin/main: (79 commits) feat(ios): interpret React Native accessibility value semantics (#3589) fix(android): reinstall and reselect the test IME helper after it disappears (#3606) feat(snapshot): carry provider keyboard observations through acquisition (#3593) chore(web): bump managed agent-browser backend to 0.39.0 (#3591) fix(fold): report a dispatched pose as unverified when devicectl has no hinge-angle stream (#3587) feat(android): expose system-bar membership on snapshot nodes (#3585) fix(android): align ADB and Appium field values (#3584) test(closure): read committed JSON modules on the merge-base side (#3602) fix(ci): preserve manual Android suite timing (#3554) refactor(daemon): make the layer folders the declaration (PR 10) (#3520) refactor(move): extract the daemon server into @agent-device/daemon (11b) (#3546) refactor(daemon): package-local runtime fakes for the remaining daemon ports [11a-4] (#3544) refactor(daemon): cut daemon test edges into root data fixtures and fakes [11a-3] (#3517) refactor(11a-2): package-local fakes at the daemon ports; root-own command-surface composition tests (#3519) test(replay): verify Settings queries and bound scrolling (#3560) feat(snapshot): measure Android Appium viewport (#3586) fix(ios): verify a fill whose unidentified field moved while it kept focus (#3596) refactor(coverage): one fallow config with per-function CRAP ceilings (#3588) test: bound CLI promotion cases and align provider budget (#3590) fix(metro): report what the dev-server stop proved instead of assuming success (#3575) ...
* origin/main: (79 commits) feat(ios): interpret React Native accessibility value semantics (#3589) fix(android): reinstall and reselect the test IME helper after it disappears (#3606) feat(snapshot): carry provider keyboard observations through acquisition (#3593) chore(web): bump managed agent-browser backend to 0.39.0 (#3591) fix(fold): report a dispatched pose as unverified when devicectl has no hinge-angle stream (#3587) feat(android): expose system-bar membership on snapshot nodes (#3585) fix(android): align ADB and Appium field values (#3584) test(closure): read committed JSON modules on the merge-base side (#3602) fix(ci): preserve manual Android suite timing (#3554) refactor(daemon): make the layer folders the declaration (PR 10) (#3520) refactor(move): extract the daemon server into @agent-device/daemon (11b) (#3546) refactor(daemon): package-local runtime fakes for the remaining daemon ports [11a-4] (#3544) refactor(daemon): cut daemon test edges into root data fixtures and fakes [11a-3] (#3517) refactor(11a-2): package-local fakes at the daemon ports; root-own command-surface composition tests (#3519) test(replay): verify Settings queries and bound scrolling (#3560) feat(snapshot): measure Android Appium viewport (#3586) fix(ios): verify a fill whose unidentified field moved while it kept focus (#3596) refactor(coverage): one fallow config with per-function CRAP ceilings (#3588) test: bound CLI promotion cases and align provider budget (#3590) fix(metro): report what the dev-server stop proved instead of assuming success (#3575) ...
* origin/main: (24 commits) feat(ios): interpret React Native accessibility value semantics (#3589) fix(android): reinstall and reselect the test IME helper after it disappears (#3606) feat(snapshot): carry provider keyboard observations through acquisition (#3593) chore(web): bump managed agent-browser backend to 0.39.0 (#3591) fix(fold): report a dispatched pose as unverified when devicectl has no hinge-angle stream (#3587) feat(android): expose system-bar membership on snapshot nodes (#3585) fix(android): align ADB and Appium field values (#3584) test(closure): read committed JSON modules on the merge-base side (#3602) fix(ci): preserve manual Android suite timing (#3554) refactor(daemon): make the layer folders the declaration (PR 10) (#3520) refactor(move): extract the daemon server into @agent-device/daemon (11b) (#3546) refactor(daemon): package-local runtime fakes for the remaining daemon ports [11a-4] (#3544) refactor(daemon): cut daemon test edges into root data fixtures and fakes [11a-3] (#3517) refactor(11a-2): package-local fakes at the daemon ports; root-own command-surface composition tests (#3519) test(replay): verify Settings queries and bound scrolling (#3560) feat(snapshot): measure Android Appium viewport (#3586) fix(ios): verify a fill whose unidentified field moved while it kept focus (#3596) refactor(coverage): one fallow config with per-function CRAP ceilings (#3588) test: bound CLI promotion cases and align provider budget (#3590) fix(metro): report what the dev-server stop proved instead of assuming success (#3575) ... # Conflicts: # src/remote/daemon-artifacts.ts
* origin/main: (83 commits) feat(ios): interpret React Native accessibility value semantics (#3589) fix(android): reinstall and reselect the test IME helper after it disappears (#3606) feat(snapshot): carry provider keyboard observations through acquisition (#3593) chore(web): bump managed agent-browser backend to 0.39.0 (#3591) fix(fold): report a dispatched pose as unverified when devicectl has no hinge-angle stream (#3587) feat(android): expose system-bar membership on snapshot nodes (#3585) fix(android): align ADB and Appium field values (#3584) test(closure): read committed JSON modules on the merge-base side (#3602) fix(ci): preserve manual Android suite timing (#3554) refactor(daemon): make the layer folders the declaration (PR 10) (#3520) refactor(move): extract the daemon server into @agent-device/daemon (11b) (#3546) refactor(daemon): package-local runtime fakes for the remaining daemon ports [11a-4] (#3544) refactor(daemon): cut daemon test edges into root data fixtures and fakes [11a-3] (#3517) refactor(11a-2): package-local fakes at the daemon ports; root-own command-surface composition tests (#3519) test(replay): verify Settings queries and bound scrolling (#3560) feat(snapshot): measure Android Appium viewport (#3586) fix(ios): verify a fill whose unidentified field moved while it kept focus (#3596) refactor(coverage): one fallow config with per-function CRAP ceilings (#3588) test: bound CLI promotion cases and align provider budget (#3590) fix(metro): report what the dev-server stop proved instead of assuming success (#3575) ...
* origin/main: (83 commits) feat(ios): interpret React Native accessibility value semantics (#3589) fix(android): reinstall and reselect the test IME helper after it disappears (#3606) feat(snapshot): carry provider keyboard observations through acquisition (#3593) chore(web): bump managed agent-browser backend to 0.39.0 (#3591) fix(fold): report a dispatched pose as unverified when devicectl has no hinge-angle stream (#3587) feat(android): expose system-bar membership on snapshot nodes (#3585) fix(android): align ADB and Appium field values (#3584) test(closure): read committed JSON modules on the merge-base side (#3602) fix(ci): preserve manual Android suite timing (#3554) refactor(daemon): make the layer folders the declaration (PR 10) (#3520) refactor(move): extract the daemon server into @agent-device/daemon (11b) (#3546) refactor(daemon): package-local runtime fakes for the remaining daemon ports [11a-4] (#3544) refactor(daemon): cut daemon test edges into root data fixtures and fakes [11a-3] (#3517) refactor(11a-2): package-local fakes at the daemon ports; root-own command-surface composition tests (#3519) test(replay): verify Settings queries and bound scrolling (#3560) feat(snapshot): measure Android Appium viewport (#3586) fix(ios): verify a fill whose unidentified field moved while it kept focus (#3596) refactor(coverage): one fallow config with per-function CRAP ceilings (#3588) test: bound CLI promotion cases and align provider budget (#3590) fix(metro): report what the dev-server stop proved instead of assuming success (#3575) ...
Plan step 11a-3: daemon test files stop importing the root
src/__tests__/test-utils/data fixtures, and the review's copied-fake findings are resolved with one owner each.Targeted root modules (scan edges now 0): device-inventory-gateways, replay-script-source, android-ui-hierarchy-fixtures, android-snapshot-capture, plugin.fixtures. Total daemon→root scan residue after the cut: 23 edges, all into the platform-runtime cluster owned by step 11a-2 (the only remaining 11a-1 residue).
Review resolutions:
packages/device-selection/src/inventory-gateways.fixtures.ts, exported as@agent-device/device-selection/inventory-gateways-fixtures, withfindInstalledAppin options,createTestDeviceInventoryGatewaysexported, and the nullable-provider bridge (withTestDeviceInventoryProvider) extracted once. Daemon (37 files undersrc/daemon), root composition, device-selection's own tests, and test/integration all import it. The root wrapper and its pin are deleted: the wrapper's fail-closed pin duplicated the real composer's pin already atsrc/platform-runtime-device-inventory.test.ts, and the real adapter has its own direct tests. test-kit was not viable: the fake needs the root composition'screateDeviceInventoryContext(device-selection's production entry), which would make test-kit→device-selection while device-selection's tests need test-kit — atsc -bproject-reference cycle — so the package's own test-only subpath (the fallback) is the one owner.script-source-bundle,source-discovery, byte-pure moves with their own test suites), and the bundle helpers live once inreplay-port/src/daemon-port/replay-script-source.fixtures.ts(./replay-script-source-fixtures), typed onDaemonWireRequestso it serves both trees without a production seam. Both test trees exercise the same globs, size cap, not-found AppErrors and ranking through it. The rootsrc/__tests__/test-utils/replay-script-source.tsis deleted (its exports move with it; nothing suppressed via.fallowrc).snapshot-capture-fixturesandui-hierarchy-fixturesare test-only entries on@agent-device/platform-android(the Apple runner requests-fixtures pattern), with the archived raw JSONs underpackages/platform-android/src/fixtures/whereown:package-captureowns them. Contract comments kept to one line.plugin.fixturesstays in@agent-device/test-kit/plugin.fixtures(package vocabulary over the filesystem install, no platform adapters).createTestDeviceInventoryGatewaysFromProvideris used (lock-policy test + integration harness), so it stays exported; the daemon-side copy that fallow flagged is deleted.pnpm formatrun repo-wide.src/commands/replay/index.ts; everything else is test/fixture moves, import retargets, and gate wiring. No limrun/CONTRIBUTING/coverage/website files in the delta against the current base.Gates (on the pushed commit, under the host gate lock):
check:affected --runclean across all selected lanes;check:quick,check:layering,check:di-seams,check:gate-manifest,check:fallow, the eager-closure budgets table (threeAPPROVED_OVER_CEILINGrows + the mechanics-facet exception for the Android fixture entries), the R13 export-pin tests, and the test-file-size ratchet green. Targeted full runs:src/daemon,src/__tests__,packages,scriptswith zero failures;vitest list srcparity vs base is exact modulo the moved test files' path keys and one intentionally deleted duplicate pin (the root inventory wrapper's fail-closed case, already owned root-side).Risk: no production behavior change (CLI startup import-closure guard green through the replay move). Eager-require weight: daemon suites now pull replay-port's real collector instead of the local test twin.
NO DOCS — test topology and fixture ownership only; no user-facing behavior or CLI surface changes.
Follow-up commit (bd49bf8, second review round):
assertProviderOutcome/assertSourceFamilymoved from the root composer into@agent-device/contracts/device; the fake now calls the sharedassertProviderOutcomeinstead of restating the flow (a malformed provider outcome fails closed withprovider_inventory_contract_violationin both paths, pinned by a new fixture test). The fake's local path keeps its per-family filter because thelocaloption is a flat whole-inventory discoverer fanned out per family — that filter is the adapter to the per-family source contract, not a restated assertion site.Design answers at e4eee6b (review follow-up round):
@agent-device/device-selection/composed-inventory-gatewayswith the installed-app probe injected instead of hardcoded;src/platform-runtime-device-inventory.tsstays as the production wiring that attaches the Apple probe (function-scoped import keeps the composition root's eager closure flat; the hub no-growth gate is green). The test fake composes through the real composer with fake registry sources — the root, daemon-composition, and integration consumers exercise the production flow, not a restatement. No root-side wrapper is needed anymore: the one owner is the package entry both trees build on.script-source-bundle,source-discovery, and the request fixture now sit atpackages/replay-port/src/(client-side replay vocabulary, likesession-replay-vars), outside thedaemon-port/engine-prefix zone; the./script-source-bundle,./source-discovery, and./replay-script-source-fixturessubpaths keep their names. Caller filesystem reads stay out of the daemon's dispatch vocabulary.