Skip to content

docs: propose daemon module boundaries - #1451

Open
thymikee wants to merge 2 commits into
mainfrom
agent/daemon-modularity-proposal
Open

docs: propose daemon module boundaries#1451
thymikee wants to merge 2 commits into
mainfrom
agent/daemon-modularity-proposal

Conversation

@thymikee

@thymikee thymikee commented Jul 28, 2026

Copy link
Copy Markdown
Member

Summary

Propose an incremental daemon modularity architecture centered on narrow capability ports,
daemon-owned adapters, and module façades for native replay, Maestro, and replay-test.

Adds measurable R7/R9/import-boundary migration ratchets, documents the benefits and tradeoffs, and
includes two executable design probes. The session probe now pins operation-keyed repair-close
receipts, target/force persistence, and publication failure/retry transitions. Updates the dependency
findings with the measured Apple-perf SCC counterfactual. Eight files are touched; there are no
production-source or command-behavior changes.

Validation

Both boundary prototypes pass on current main. Tooling, layering, dependency-graph, Fallow, build,
and smoke gates pass. The unrestricted unit run passed 4,663 of 4,664 tests; the lone load-sensitive
device-claim test then passed 7/7 in isolation. Runtime device verification does not apply because
this PR changes architecture documentation and throwaway design probes only.

@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://callstack.github.io/agent-device/pr-preview/pr-1451/

Built to branch gh-pages at 2026-07-28 19:42 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 1.87 MB 1.87 MB 0 B
JS gzip 598.8 kB 598.8 kB 0 B
npm tarball 714.5 kB 714.6 kB +45 B
npm unpacked 2.50 MB 2.50 MB +252 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 24.3 ms 23.9 ms -0.3 ms
CLI --help 48.8 ms 49.1 ms +0.4 ms

Top changed chunks: no changes in the largest emitted chunks.

@thymikee

Copy link
Copy Markdown
Member Author

Design blocker — The proposed ScriptPublicationState cannot preserve the repair close/commit transaction it claims to consolidate. Its repair variant omits the persisted output target and force authorization, committed state, and repairPlatformCloseReceipt. Today, after platform close succeeds, the receipt is stored before atomic publication; if publication fails, retry reuses that receipt rather than dispatching platform close again. explicit-close { platformCloseSucceeded } is an input event, not durable retry state, so the proposed aggregate either loses idempotency or leaves hidden parallel state behind. Model the explicit repair phases and durable fields—including target/force, close receipt, committed/abort state—state where they live, and pin the failure/retry transitions in the prototype before treating this as a migration target. Exact-head prototype and layering checks are green, but the design is not ready.

@thymikee

Copy link
Copy Markdown
Member Author

Implementation handoff: #1478. It captures the post-review interface decisions, compatibility constraints, dependency-ordered worker briefs, STOP conditions, success metrics, and Phase 7 docs cleanup. Where it differs, #1478 supersedes the proposal's provisional TypeScript sketches and unanswered grilling section; the proposal's rationale, ADR constraints, measurements, tradeoffs, and probes remain the design context. No files in this reviewed seven-artifact PR were changed.

@thymikee

Copy link
Copy Markdown
Member Author

Architecture blocker: #1478 contains the corrected implementation handoff, but this PR’s checked-in docs still present the incompatible ScriptPublicationState / explicit-close { platformCloseSucceeded } sketches as the revised recommendation, and the session probe claims repair completion without modeling durable close/publication retry state. A PR comment does not supersede versioned guidance. Replace/remove those sketches and adjust/remove the probe, or prominently mark the exact sections as superseded by #1478 with an explicit do-not-implement warning. Exact-head checks are green; #1478 remains unimplemented residual risk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant