Repository navigation
refactor(gates): own the client-only replay rule as daemon-process reachability (R82) - #3604
Conversation
Size Report
Startup median (7 runs, lower is better):
|
|
This PR is ready at 7ed93ce. The rule reads as a correct move from import-specifier matching to reachability from the daemon entry. Not blocking, and you can take or leave these: the rule passes silently if CI is still pending: the 7 jobs that have not passed are all queued, and none has failed. Lint & Format, Typecheck & Package and the Before merge, please confirm those three checks go green once the queued jobs run, and land #3603 first, since this PR is stacked on it. |
…test redeclared Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7ed93ce to
aacd646
Compare
…achability (R82) The R11 path gate (daemon root plus two named root files) missed root platform-runtime modules and reached packages. R82 walks every module the daemon process can load from src/daemon.ts, over static and dynamic edges, and denies replay-port's caller-side collector. The eager closure would not do: the composition root and platform-runtime modules load behind a function-scoped await import. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
aacd646 to
3389177
Compare
A renamed `src/daemon.ts` or collector module turned the reach walk into a silent pass. R82 now reports an entry or denied module that is not a tracked source as stale. The tests plant both denied modules over a dynamic chain and a static-only chain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Addressed in 9d95852.
|
|
This is ready for review at 9d95852. The earlier review at 7ed93ce was clean, and the delta adds no new problems: the stale-target check reuses the same entry and denied-module constants, so R82 stays the single owner of the rule. The new tests fail if the reachability walk or the stale check is reverted. There are no conflicts. CI is still running (15 of 18 checks queued or in progress, none failed). Not blocking: checkDaemonProcessReach builds its own adjacency map and BFS and repeats the executable-edge filter. Could it use |
|
* origin/main: feat(leasing): proxy CLI names each new lease, daemon keeps a caller-chosen lease id (#3479) feat(remote): name the held lease on upload, artifact download and diagnostics requests (#3594) fix(android): record the launched intent owner from the device (#3600) fix(selectors): type rect-requiring targets as addressable (#3608) feat(snapshot): interpret iOS node facts once at producer seams (#3592) refactor(gates): own the client-only replay rule as daemon-process reachability (R82) (#3604)
* origin/main: feat(remote): name the held lease on upload, artifact download and diagnostics requests (#3594) fix(android): record the launched intent owner from the device (#3600) fix(selectors): type rect-requiring targets as addressable (#3608) feat(snapshot): interpret iOS node facts once at producer seams (#3592) refactor(gates): own the client-only replay rule as daemon-process reachability (R82) (#3604)
* origin/main: feat(remote): name the held lease on upload, artifact download and diagnostics requests (#3594) fix(android): record the launched intent owner from the device (#3600) fix(selectors): type rect-requiring targets as addressable (#3608) feat(snapshot): interpret iOS node facts once at producer seams (#3592) refactor(gates): own the client-only replay rule as daemon-process reachability (R82) (#3604)
Follow-up to the #3517 review (comment). Based on main.
The design question
You asked whether the
src/daemon.tshub closure should own the client-only rule instead of a hand-listed path set. The answer is yes: what the daemon process can load owns it. But the eager closure can't carry it. Measured on main:src/daemon.tseagerly evaluates 393 modules. Neithersrc/daemon-composition.tsnor anysrc/platform-runtime-*module is among them, because they load behind a function-scopedawait import. A plantedimport '@agent-device/replay-port/source-discovery'insrc/platform-runtime-daemon-services.tspasses an eager-closure deny set.src/daemon.tsreaches 1,366 modules, including the composition root, the platform-runtime family and every package they reach. Neither collector module is among them.So the rule is a layering check over the resolved import graph, like R76, instead of a deny set in
eager-closure-budgets.What
daemon-process-reach(scripts/layering/daemon-process-reach.ts): a breadth-first walk fromsrc/daemon.tsover value and dynamic edges. It fails ifpackages/replay-port/src/script-source-bundle.tsorsource-discovery.tsis reachable, naming the importing edge and the shortest chain.src/daemon.ts -> … -> src/platform-runtime-daemon-services.ts -> packages/replay-port/src/source-discovery.ts.CLIENT_ONLY_SUBPATHS,DAEMON_PROCESS_ROOT_FILES, the daemon-path predicate) andclient-only-subpaths.test.ts.testRequestScope, now exported next totestInventoryHost, instead of redeclaring it.Validation
check:layering: 326 tests, guard OK, R82 in the success line.check:quick,check:fallow(no issues in 10 changed files),check:gate-manifest, test-file-size ratchet,check:affected --run: all runnable checks passed.🤖 Generated with Claude Code