docs: fix phantom specifiers, the duplicate ADR 0019, and the Node floor - #2533
Conversation
|
Size Report
Startup median (7 runs, lower is better):
|
b0bd822 to
69d62bc
Compare
|
The documentation corrections and the runtime-versus-contributor Node floor are sound at 69d62bc. One gap remains in the requested export check: agent-guidance-contract.test.ts:91 skips root specifiers, so deleting the . export for @agent-device/selectors or @agent-device/contracts would still pass. Check the root export as well as subpaths, with a failing root-export case. Current checks pass and there are no conflicts; this is a gap in the new enforcement, not a runtime defect. |
AGENTS.md routed request cancellation/progress and diagnostics to `@agent-device/capture-kit` subpaths that no package exports; both live in `@agent-device/host-kit/request` and `@agent-device/host-kit/diagnostics`. It also named `@agent-device/contracts` as an importable seam although that package publishes no root export, and claimed `src/daemon/handlers/session.ts` was over budget after that extraction already landed at 242 lines. Two ADRs carried number 0019. The hop trace has its own claims to make, so it now numbers 0023, joins the index, and keeps the links from ADR 0019 and ADR 0022. The Node floor split was undocumented: `engines.node` stays at 22.12 because CI installs the published tarball on that floor, while contributors need 22.13 for the pinned pnpm. CONTRIBUTING now says so, and installation.md names the 22.12 floor and the web backend's Node 24 requirement. Extend the agent-guidance contract to resolve every `@agent-device/*` specifier AGENTS.md names against the owning package's `exports`, root included, so neither a phantom subpath nor a phantom package root can route an agent to a module that does not exist.
69d62bc to
a16821b
Compare
|
Fixed at The check bites immediately: AGENTS.md listed Both planted violations fail with typed messages:
|
|
CI note for It is not unique to this branch. On Current state at this head: 21 checks success/skipped, |
|
The root-export guard is fixed on a16821b, including the invalid contracts root reference. The reported planted-red cases exercise both root and subpath checks. No actionable findings remain; current checks pass and there are no conflicts. Ready for human review and merge. |
Summary
Closes #2520.
AGENTS.md routed request cancellation/progress and diagnostics to
@agent-device/capture-kitsubpaths no package exports. Real homes:
@agent-device/host-kit/request(40 importers) and@agent-device/host-kit/diagnostics(106 importers, 0 for the capture-kit spelling). It also claimedsrc/daemon/handlers/session.tswas over budget; that extraction already landed and the file is 242lines, so the bullet is gone.
0019-end-state-hop-trace.mdbecomes ADR 0023: it is indexed indocs/adr/README.mdand bothlinks to it (from ADR 0019 and ADR 0022) follow the rename.
I did not raise
engines. The issue readspnpm@11.17.0's>=22.13as the runtime floor, but thatis a dev-tooling constraint:
ci.ymlrunsscripts/check-package.tson the installed tarball atNode 22.12 precisely to verify "what a user on
engines.nodefloor actually installs", and says so.Raising
enginesto 22.13 would drop users CI proves work and make that job's stated purpose false.So the floor stays 22.12 and the contributor requirement is what gets documented — CONTRIBUTING now
names 22.13 for the pinned pnpm, and README keeps 22.12.
installation.mdnames the 22.12 floor andthe web backend's Node 24 hard fail (
agent-browser-tool.ts:280), which it previously omitted.agent-guidance-contract.test.tsnow resolves every@agent-device/*specifier AGENTS.md namesagainst the owning package's
exports, root included. That enforcement immediately caught asecond phantom in the same sentence: AGENTS.md listed
@agent-device/contractsas an importable seam,but the package publishes only subpath exports (
./interaction,./replay,./snapshot, …) and no.entry, so nothing can import it that way. Cross-layer contracts now route topackages/contracts/src, which is how the rest of that section names a declaration site.Validation
Docs and manifest only, so no runtime test applies.
pnpm check:agent-guidancepasses (5 tests) andnames both planted violations at
a16821b661: restoring@agent-device/capture-kit/diagnosticsinAGENTS.md fails with "AGENTS.md names a subpath @agent-device/capture-kit does not export", and
deleting the
.export frompackages/selectors/package.jsonfails with "AGENTS.md imports a packageroot @agent-device/selectors does not export".
pnpm check:quickpassed andpnpm check:affected --runata16821b661passed every selected check exceptmutation-model, which fails identically ona clean
origin/maintree in this worktree: its claim thatsrc/commands/interaction/runtime/gestures.test.tsreaches thescroll-edge-statekernel went stalewhen the scroll path moved to
src/daemon/scroll-runtime.ts. Pre-existing, advisory in CI (theworkflow triggers on
scripts/mutation/**only) and unrelated to this diff — worth its own fix.