Repository navigation
chore(gates): daemon layer manifest + R81 daemon-layer rule (no moves) - #3391
Conversation
3a79b6f to
0fcfd34
Compare
Size Report
Startup median (7 runs, lower is better):
|
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
|
The daemon-layer manifest and the new R81 rule look correct at 0fcfd34, and I found no code problem that should hold the merge. CI is green: 19 checks, none failing. No conflicts. I did not run Not blocking: Would the smaller end state be one folder per layer under On the open threads: the cubic-dev-ai P2 on empty layer arrays still applies (#3391 (comment)). Before merge, answer the empty-layer thread. |
Partition every production file under src/daemon/ into five local layers (core < resources < execution < sessions < server) with an exhaustive machine-readable manifest, and verify it: reject upward static value and type-only edges, report dynamic cross-layer edges without rejecting them, and fail on omitted, duplicated, or untracked manifest entries. No files move; the global spine rank stays 4 for all five layers.
An empty layer array kept a phantom position in the daemon layer order after its last file moved; reject it, and isolate the orphaned-file test from the empty-layer check.
#3393 split http-server.ts into http-authorization/http-rpc-envelope/ http-rpc-methods (daemon-server) and #3400 moved dispatch-context (daemon-core: pure flag vocabulary read by core's context.ts) and interaction-response-data-transform (daemon-execution, beside its touch-response consumer) into the daemon; the exhaustive manifest follows, verified upward-edge-free at the new head.
3e87465 to
646d73d
Compare
|
Re: the Landed: empty-layer rejection in 1609f70 (planted test fails without it). Rebased onto latest main (6e80737, includes #3393 and #3400); the five new production daemon files joined the manifest in 646d73d — http-authorization/http-rpc-envelope/http-rpc-methods under daemon-server, dispatch-context under daemon-core (pure flag vocabulary), interaction-response-data-transform under daemon-execution — still zero upward static edges, manifest 286 files. Both review threads replied to and resolved. |
|
Both findings from the earlier review (0fcfd34) are now fixed at 646d73d, and I found no new problems in the daemon layer manifest or the R81 rule. All 19 checks pass, and the diff touches only scripts/layering and docs, so no device-facing route is involved. No conflicts. Nothing else stands in the way of merging. I did not run On the other reviewer's threads: the empty-owner check thread (#3391 (comment)) is fixed, since |
|
#3391's manifest was cut before #3403 and #3404 landed, so src/daemon/platform-services.ts (imported by daemon-core files, so core) and src/daemon/device/claim-recovery-gateway.ts (imported only from daemon-server, beside its device-claim siblings in resources) were the only files R81 found unowned. This PR re-ran check:layering after rebasing over them and assigns both. Co-authored-by: Copilot <2235562194+Copilot[bot]@users.noreply.github.com>
…fest (#3412) #3391 added the daemon layer manifest while #3403 and #3404 were in flight, and each merged green on its own: src/daemon/platform-services.ts and src/daemon/device/claim-recovery-gateway.ts reached main in no layer, so R81 fails on main and every PR's Repo Guards. platform-services.ts fits only daemon-core; the claim-recovery port fits any layer and goes in daemon-resources beside the device claims, matching the assignment #3395 already carries. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…n-contracts (#3395) * refactor(move): extract the daemon-contracts zone into packages/daemon-contracts The ten files of the daemon-contracts zone (the nine root modules declared by ROOT_MODULE_ZONES plus src/daemon-contracts/daemon-diagnostics-scope.ts) move behind a workspace-package boundary with narrow per-file subpath exports. The shared daemon/client placement from #2559 and the #3288 zone declaration become physical: R11 and the package manifest hold the boundary where the per-file rows held it before. Consumers switch from relative specifiers to @agent-device/daemon-contracts/<file>; the tests move with their sources. Behavior is unchanged. * chore(gates): retarget daemon-contracts path-keyed enforcement at the package ROOT_MODULE_ZONES sheds its daemon-contracts rows (the package derives the zone), the R78 guidance names the package as the shared-contract home, the wire-compat manifest/ledger/mutation keys move with request-progress-protocol, the mutation-lane exclusion pins the moved test path, and ADR 0033 records the extraction with its rationale. * test(daemon-contracts): own the daemon-registration fixture and export it as a subpath publishDaemonRegistration was duplicated verbatim between packages/daemon-contracts/src/daemon-registration.fixtures.ts and src/__tests__/test-utils/device-claim-store.ts. Keep the package as the single owner: export the fixture via ./daemon-registration-fixtures the way capture-kit exports ./recording-artifact-fixtures, delete the root copy, and point the six root tests at the subpath. Co-authored-by: Copilot <2235562194+Copilot[bot]@users.noreply.github.com> * docs(layering): name packages/daemon-contracts/ in the root-zone migration note The example repeated src/command-runtime/ after the daemon-contracts zone moved out of src/daemon-contracts/; name the package instead. Co-authored-by: Copilot <2235562194+Copilot[bot]@users.noreply.github.com> * fix(layering): place the two port files R81 found unlayered #3391's manifest was cut before #3403 and #3404 landed, so src/daemon/platform-services.ts (imported by daemon-core files, so core) and src/daemon/device/claim-recovery-gateway.ts (imported only from daemon-server, beside its device-claim siblings in resources) were the only files R81 found unowned. This PR re-ran check:layering after rebasing over them and assigns both. Co-authored-by: Copilot <2235562194+Copilot[bot]@users.noreply.github.com> --------- Co-authored-by: Copilot <2235562194+Copilot[bot]@users.noreply.github.com>
Summary
Adds the daemon layer manifest and the R81 verifier; moves no files, changes no behavior. Every production file under
src/daemon/is claimed exactly once inscripts/layering/daemon-layer-manifest.json— 286 files as of the rebase onto 6e80737 (daemon-core62 /daemon-resources26 /daemon-execution82 /daemon-sessions72 /daemon-server44).scripts/layering/daemon-layers.tsrejects upward static value and type-only edges across core < resources < execution < sessions < server, reports dynamic cross-layer edges (4 today, all downward), and fails on omitted, duplicated, untracked, or empty-layer entries. Tests and fixtures carry no layer, matching the other daemon rules. Global spine rank stays 4 for all five. Planted-violation tests cover upward value/type edges, omission, duplicate, unknown path, unknown/missing/empty layer keys.Deviations from the seed:
managed-session-artifact-path.tsandplatform-owner-lifecycle.ts→daemon-core(import onlynode:*/workspace types; path-guard and vocabulary contracts, and rootplatform-runtime-*already consumes the latter as contract vocabulary);handlers/human-control.ts→daemon-sessions(the seed'sdaemon-serverleft the one upward type edge:request-handler-chain.tstypestypeof import()of it; its own imports reach only core/resources);daemon-stop.tsstaysdaemon-server. Post-seed arrivals from main: #3393's three http split files →daemon-server; #3400'sdispatch-context.ts→daemon-core,interaction-response-data-transform.ts→daemon-execution. Residue: none.Validation
Commits f680d70 + 1609f70 + 646d73d (head 646d73d).
pnpm install --frozen-lockfile,pnpm build,pnpm format,pnpm check:quick,pnpm check:layering(324 tests + guard, exit 0, zero upward edges at the new head),pnpm check:affected --run(all selected runnable checks pass). Earlier evidence (depgraph:test 43 pass; depgraph summary unchanged vs main) recorded at 0fcfd34. Docs-only reasoning: no runtime paths touched.