Skip to content

Commit 016577e

Browse files
thymikeeclaude
andauthored
docs: remove superseded architecture proposals and design prototypes (#1478 P7) (#1580)
P7 cleanup per #1478's ratified defer decision: delete the daemon-modularity proposal, module-interface-principles (durable kernel folded into CONTEXT.md), the pre-package Maestro debt map, and the daemon-boundary prototypes with their package scripts; refresh CONTEXT.md's R10 bullet to post-arc state. Also reconciles the interaction façade symbol pin with #1570's wait symbols, which had left check:layering red on main via #1570 × #1574 branch-race skew. Co-Authored-By: Claude Fable 5 <[email protected]>
1 parent 111b85f commit 016577e

11 files changed

Lines changed: 30 additions & 2098 deletions

‎CONTEXT.md‎

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -319,17 +319,19 @@ The perfect-shape refactor is complete and merged. Its end-state:
319319
improvement into a baseline edit. A shrunk tree is reported in the success line instead of
320320
failing. Hubs by in-component dependents: `runtime-contract.ts` (25),
321321
`commands/runtime-types.ts` (21), `backend.ts` (15), `commands/runtime-common.ts` (12).
322-
- Daemon modularity migration (R10). The same tooling-only declaration records R7 at 30
323-
writer-owned fields / 42 owner-file claims, R9's 76 members by zone (`commands` 33,
324-
`daemon-server` 20, `core` 10, `platforms` 7, root 5, `client` 1), and the four
325-
production importers of `daemon/types.ts` from outside daemon. R7 counts and external importers may
322+
- Daemon modularity ratchets (R10). The same tooling-only declaration pins R7's writer-owned
323+
field/owner-claim counts, R9's 76 members by zone (`commands` 33, `daemon-server` 20, `core` 10,
324+
`platforms` 7, root 5, `client` 1), and the external production importers of `daemon/types.ts`
325+
(down to 2: the client normalizers and remote artifacts). R7 counts and external importers may
326326
only shrink; no zone may grow inside R9, and replay/Maestro/replay-test engine files remain outside
327-
it. This per-zone migration ratchet is intentionally stricter than R9's ordinary total-growth
328-
rule: during the extraction, even moving cycle membership into a zone at its ceiling must be
329-
justified by lowering another ceiling or changing the migration baseline explicitly. Zero-count
330-
policies begin enforcing when `src/ad-replay/` or `src/maestro/` first exists and
331-
already protect `src/replay/test/`: engines cannot import daemon/platform/provider implementations,
332-
and no logical module may deep-import another module's `internal/` tree. These are migration
327+
it. This per-zone ratchet is intentionally stricter than R9's ordinary total-growth rule: even
328+
moving cycle membership into a zone at its ceiling must be justified by lowering another ceiling
329+
or changing the baseline explicitly. The #1478 extraction arc (P0–P5) completed against these
330+
ratchets: engines live behind the `packages/{maestro,replay-test,ad-replay}` façades, engines
331+
cannot import daemon/platform/provider implementations, and no logical module may deep-import
332+
another module's `internal/` tree. The P6 platform-modularity phases were measured and deferred
333+
at the #1478 checkpoint (2026-08-04): the Apple perf edge no longer participates in any cycle,
334+
so the remaining R9 work sits at the command-registration hubs, not the platform seam. These are
333335
ratchets, not permission to scaffold façades before a real seam has two adapters.
334336
- Zero-dep CI jobs (R8). Some jobs run scripts straight from a checkout with `install-deps: false`,
335337
so they have no `node_modules`. Nothing local can feel that constraint — every dev machine has
@@ -375,6 +377,21 @@ when landing it, satisfy the gate where one exists.
375377
(#1409) was closed unmerged. A new abstraction layer needs a demonstrated second consumer or
376378
axis of change. The one gated slice of this norm is tests: CI forbids test-only DI seams — a
377379
missing seam gets added as a real one or not at all.
380+
- **Module seams** (the #1478 extraction's durable rules). State crosses seams as immutable
381+
values, authority crosses as capabilities, and both only narrow; a seam exists when its port has
382+
two real adapters (normally the daemon adapter and a deterministic in-memory adapter running the
383+
same contract suite), otherwise it is indirection. Calls go down through module façades and back
384+
through ports; no inter-module event bus — ADR 0018's journal is an observation channel, never a
385+
coordination mechanism. No engine receives `DaemonRequest`, `DaemonError`, `SessionStore`,
386+
mutable `SessionState`, provider handles, or concrete platform implementations; the daemon
387+
adapter closes each capability over one already-admitted request, so an engine cannot express a
388+
session name, acquire a lock, or select a provider scope. Session state keeps three consistency
389+
disciplines distinct and never forces them through one generic transaction: immediate pessimistic
390+
transitions for ref/observation lineage (ADR 0014's mid-request expiry is why end-of-request
391+
commit/rollback is rejected), staged arm/complete/close-succeeded/commit-or-abort protocols with
392+
operation-keyed receipts for repair/publication (ADR 0012/0016), and append-only facts for
393+
recorded actions and diagnostics. Gates: R10 zero-count module policies, R11 package boundaries,
394+
the façade symbol pins, and R7 ownership.
378395
- **Tests couple to stable interfaces.** Norm (see [Testing Principles](#testing-principles))
379396
backed by the test-only-DI-seam gate above; broader test-strength enforcement is planned, not
380397
present — tracked under [#1412](https://github.com/callstack/agent-device/issues/1412).
@@ -433,7 +450,7 @@ the observable freshness and failure semantics below before any runtime refactor
433450
Evidence: [ADR 0002](docs/adr/0002-persistent-platform-helper-sessions.md),
434451
[ADR 0004](docs/adr/0004-ios-snapshot-backend-strategy.md),
435452
[ADR 0005](docs/adr/0005-ios-runner-interaction-lifecycle.md),
436-
[Maestro compatibility debt map](docs/maestro-compat-debt-map.md),
453+
[ADR 0015](docs/adr/0015-direct-maestro-engine.md),
437454
[`find.test.ts`](src/daemon/handlers/__tests__/find.test.ts),
438455
[`snapshot-handler.test.ts`](src/daemon/handlers/__tests__/snapshot-handler.test.ts),
439456
[`snapshot-scoped-refs.test.ts`](src/daemon/handlers/__tests__/snapshot-scoped-refs.test.ts),

0 commit comments

Comments
 (0)