refactor(move): collocation batch 1 — allocator contract into managed-allocation

Merged
TH
2mo ago
+224-39

Summary

Part of #3276 §5. Closes #3281.

  • Adds ADR 0033 (renumbered from 0032 this round: #3286 already claims 0032-layering-graph-engine.md). This PR's README change adds only the 0033 row; #3286 has since merged with the 0032 row, and the rebase keeps both rows side by side: a decision table with one row per candidate file in the umbrella's collocation list — move, merge, or keep with the direction that was checked and fails. Required behavior (a) of #3281.
  • Lands the batch-1 refactor(move): packages/contracts/src/managed-device-allocation.ts → packages/managed-allocation/src/managed-device-allocation.ts, new @agent-device/managed-allocation/managed-device-allocation subpath; contracts drops the old subpath. The port and its lease vocabulary had no importer outside managed-allocation and the daemon composition that already depends on it.
  • The other listed batch moves failed the mandated re-verification and the ADR rows are the record: the four capture-kit admission ledgers and durable-json.ts cannot move to managed-allocation because managed-allocation already depends on capture-kit (the move would invert an existing package edge), and the three limrun files have no seam — src/sdk/limrun.ts is the published agent-device/limrun facade entry, limrun-runtime-types.ts is a public-type refinement colliding with the package-internal names, and src/provider-limrun-runtime.ts self-builds the root's ADR-0019 dependency factory in its constructor.

33 files; the move itself is rename-only (git diff -M90% --summary shows the file at 98% similarity; the rest are one-line import re-points and docs). The ADR 0021 link edit is independent of the renumber (it points at the moved contract file, not an ADR number).

Validation

  • Head d4ac51874 (rebase onto origin/main after #3286/#3288 merged; conflict resolved keep-both in docs/adr/README.md, 0032 + 0033 rows side by side): pnpm check:affected --run exit 0, "all runnable checks passed"; check:layering green on the new spine (R80/R6 at the new merge-base).
  • Previous head 6701ab987 (ADR reconciliation with #3288/#3294 after the design follow-up): pnpm check:affected --run exit 0, "all runnable checks passed".
  • Previous head 161b02234 (prose-only ADR intro rewording): pnpm check:affected --run exit 0, "all runnable checks passed".
  • Previous head d7239c323: pnpm check:affected --run exit 0, "all runnable checks passed" (59 selected checks; the single check:affected: lint failed. line in the log is check:affected:test's own envelope fixture, reproduced identically on every run at the same position — standalone pnpm lint exits 0).
  • Previous head 62200ec25 passed the same gate; this round changed only docs/adr/ files.
  • check:layering, check:agent-guidance, typecheck, format:check, focused vitest (managed-allocation package + daemon allocation + reachability + allocator-fake, 116 tests) green.
  • check:production-exports: identical finding count on origin/main and head (55), so no export-surface delta.
  • Declared-zone modularity re-measured with the umbrella's method on both trees: 0.3732 → 0.3745 (before-value reproduces the issue's 0.373; small improvement, not chased).

Docs-only ADR rows need no runtime evidence.