Skip to content

fix(daemon): fence managed readiness behind runtime admission - #2280

Open
thymikee wants to merge 1 commit into
mainfrom
codex/adr-0021-prebinding-readiness
Open

fix(daemon): fence managed readiness behind runtime admission#2280
thymikee wants to merge 1 commit into
mainfrom
codex/adr-0021-prebinding-readiness

Conversation

@thymikee

@thymikee thymikee commented Sep 4, 2026

Copy link
Copy Markdown
Member

Summary

Move legacy local readiness out of device/session resolution into the shared request-runtime admission seam. Local-family requests reuse existing readiness only after facts, binding, and claim admission; provider-owned requests remain claim-free and unchanged; managed-local readiness rejects absent allocator confirmation and never calls family readiness. Sessionless snapshot/selector, keyboard/app-event, clipboard, settings/alert, and recording paths use the same fence. Managed lifecycle cells and the allocator port remain unchanged.

Validation

  • Planted-red proof: pre-fix session-clipboard ordering test failed (expected 7 to be less than 5); fixed test passes.
  • pnpm build
  • pnpm check:affected --run
  • Focused admission/claim suite: 8 files, 98 tests passed, including exact-owner/fence/incarnation, cancellation, disposal, refusal, and retry coverage.
  • No live device evidence owed: no real device-facing path, Simlock client, Host transport, or managed registration was added.
  • Before: resolve -> direct device-ready -> facts/bind. After: resolve -> facts -> owner bind + claim -> owner-aware readiness -> operation.
  • Deferred: allocator activation must supply allocator-confirmed readiness/facts and managed open reachability; withheld lifecycle cells remain deferred.
  • Exact head: bfe889ec93.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 2.61 MB 2.61 MB +709 B
JS gzip 878.4 kB 878.8 kB +373 B
npm bundled raw 2.61 MB 2.61 MB +709 B
npm bundled gzip 878.4 kB 878.8 kB +373 B
npm tarball 1.04 MB 1.04 MB +212 B
npm unpacked 3.52 MB 3.52 MB +709 B
npm clean-installed 3.52 MB 3.52 MB +709 B

npm unpacked components

Component Base Current Diff
JS / dist source 2.77 MB 2.77 MB +709 B
Apple runner source/project 544.4 kB 544.4 kB 0 B
Apple snapshot presentation source 33.8 kB 33.8 kB 0 B
Apple Simulator snapshot bridge source 30.5 kB 30.5 kB 0 B
macOS helper source 54.8 kB 54.8 kB 0 B
Android helper artifacts 43.3 kB 43.3 kB 0 B
Other package files 46.7 kB 46.7 kB 0 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 29.3 ms 29.4 ms +0.1 ms
CLI --help 79.0 ms 79.0 ms -0.0 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/internal/daemon.js -953 B -309 B
dist/src/session2.js -176 B -36 B
dist/src/interaction2.js +15 B +9 B
dist/src/device-claim-rule.js +15 B +4 B

Top changed packed files

Packed file Base Current Diff
dist/src/request-runtime-binding.js 0 B 2.6 kB +2.6 kB
dist/src/device-ready.js 975 B 0 B -975 B
dist/src/internal/daemon.js 107.9 kB 106.9 kB -953 B
dist/src/response.js 278 B 0 B -278 B
dist/src/session2.js 218.6 kB 218.4 kB -176 B
dist/src/record-runtime.js 7.1 kB 7.2 kB +145 B
dist/src/session-snapshot.js 26.9 kB 26.9 kB +87 B
dist/src/snapshot4.js 11.9 kB 12.0 kB +79 B
dist/src/snapshot-runtime-binding.js 6.0 kB 6.1 kB +71 B
dist/src/selector-runtime.js 14.2 kB 14.1 kB -26 B

@thymikee

thymikee commented Sep 4, 2026

Copy link
Copy Markdown
Member Author

Review complete at exact head bfe889e. The change moves legacy readiness behind the existing request binding/claim seam, preserves each former call family’s readiness condition, skips provider-owned runtimes by owner kind, fails managed-local readiness closed with typed reason managed-readiness-unavailable, and keeps local-family as the sole path to the legacy readiness implementation. No parallel lifecycle owner or new readiness state machine was introduced. The planted-red ordering proof and focused regression coverage are meaningful, and all exact-head checks are green, including Integration, Coverage, platform lanes, Repo Guards, and Size. No remaining code-review finding; ready for human merge.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant