refactor: route boot through readiness runtime - #1747
Conversation
Size Report
Startup median (7 runs, lower is better):
Top changed chunks:
|
|
Reviewed exact head d48788c. [P2] The Apple/Android/provider fact and binding paths are otherwise coherent, and Web/Harmony/Linux/Vega fail closed as unavailable. All authoritative checks are green. This head is still not ready: dependencies #1740 and #1745 remain open (#1740 has a confirmed gate finding), the required parametrized cutover-gate |
|
Confirmed cross-unit blocker for the apps unit:
Therefore apps cannot both consume the declared use and preserve its macOS denominator without a readiness/boot contract decision in or immediately after #1747. Simply making ensureReady available on macOS would make boot admission too broad; dropping ensureReady from the macOS apps plan contradicts the recorded complete use. HarmonyOS is not the parity blocker: its legacy apps capability bucket rejected it. Please resolve or explicitly sequence this before the apps PR final rebase. The apps worker is keeping facts honest and is not widening boot. |
|
Review fixes are now pushed at exact head
Validation immediately before push: Still draft: final rebase and the boot row in #1745's parametrized gate remain blocked on corrected #1740/#1745 heads; live simulator/emulator/physical evidence is still required before readiness. |
d54ab6e to
0e59197
Compare
|
Boot is now rebased onto the current parametrized-gate stack and published at exact head The prior P2 is resolved in the current stack: admission uses the discriminated This remains draft. Current GitHub checks are green except the iOS smoke lane still running. Prerequisite review blockers remain in #1740 and #1745, and live simulator/emulator/physical-device evidence is still outstanding. |
|
Adversarial review correction is pushed at exact head |
|
Live boot evidence completed on exact head
The Android and iOS simulator targets were restored to stopped, the isolated |
|
Reviewed exact head 3ed4734. The discriminated readiness-plan fix is sound and consistently drives stopped-AVD recovery, fact selection, the binding use, and the exact normal/headless operation. Its regression is meaningful, and the remaining facts, ownership, and one-inspect/one-bind flow are coherent. The branch is CLEAN/MERGEABLE and all current CI is green. This is still not ready:
No ready-for-human label yet. |
3ed4734 to
a200645
Compare
|
Exact-head correction is complete at
The PR body now records the 84-file scope-expansion verdict, current size report, denominator, and exact-head evidence. No review threads remain. It stays draft only for the prerequisite stack and the final in-progress smoke lane. |
|
Exact head |
|
Exact-head correction is complete at .\n\n- readiness semantics now live in the Apple/Android packages behind narrow command/process ports; the root cross-family semantic adapter is deleted and planted as a retirement violation\n- cancellation reaches simulator/physical/emulator work, including cleanup of an emulator started by an aborted request\n- boot now owns unique R20 in the shared parameterized gate\n- [WARN] This project is configured to use 11.17.0 of pnpm. Your current pnpm is v11.21.0
[skip] test-app-typecheck — GitHub-authoritative (jobs: Resolve native fingerprint) [skip] swift-runner — GitHub-authoritative (jobs: Swift Runner Unit Compile, iOS / Smoke Tests, macOS / Smoke Tests) [skip] android-helpers — GitHub-authoritative (jobs: Android / Smoke Tests) [skip] macos-helper — GitHub-authoritative (jobs: macOS / Smoke Tests) [skip] web-smoke — GitHub-authoritative (jobs: Web Platform Smoke) [run] format: pnpm run format:check All matched files use the correct format. [run] lint: pnpm run lint [run] typecheck: pnpm run typecheck [run] layering: pnpm run check:layering [run] fallow: pnpm run check:fallow --base origin/main ● Unused exports (1) [run] mcp-metadata: pnpm run check:mcp-metadata [run] build: pnpm run build [run] package: pnpm run check:package [run] integration-node: pnpm run test:integration:node [dedupe] vitest-related — covered by affected LCOV or GitHub CI [dedupe] unit — covered by affected LCOV or GitHub CI [run] coverage: pnpm exec vitest related --run --passWithNoTests --maxWorkers=2 --coverage --coverage.reporter=lcov --coverage.thresholds.statements=0 --coverage.thresholds.lines=0 packages/capture-kit/src/app-log-pid-runtime.ts packages/capture-kit/src/index.ts packages/capture-kit/src/platform-runtime-unavailable.test.ts packages/capture-kit/src/platform-runtime-unavailable.ts packages/contracts/src/command-platform-execution.test.ts packages/contracts/src/command-platform-execution.ts packages/contracts/src/device-inventory.ts packages/contracts/src/device-readiness-runtime.ts packages/contracts/src/facades/platform.ts packages/contracts/src/platform-runtime-operations.test.ts packages/contracts/src/platform-runtime-operations.ts packages/contracts/src/platform-runtime.ts packages/kernel/src/device.ts packages/platform-android/src/inventory.test.ts packages/platform-android/src/inventory.ts packages/platform-android/src/network/runtime.test.ts packages/platform-android/src/readiness/runtime.test.ts packages/platform-android/src/readiness/runtime.ts packages/platform-android/src/runtime.test.ts packages/platform-android/src/runtime.ts packages/platform-apple/src/logs/runtime.ts packages/platform-apple/src/network/runtime.test.ts packages/platform-apple/src/readiness/runtime.test.ts packages/platform-apple/src/readiness/runtime.ts packages/platform-apple/src/runtime.fixtures.ts packages/platform-apple/src/runtime.test.ts packages/platform-apple/src/runtime.ts packages/platform-harmonyos/src/runtime.test.ts packages/platform-harmonyos/src/runtime.ts packages/platform-linux/src/runtime.test.ts packages/platform-vega/src/runtime.test.ts packages/platform-web/src/runtime.test.ts packages/platform-web/src/runtime.ts packages/provider-limrun/src/app-log-runtime.test.ts packages/provider-limrun/src/app-log-runtime.ts packages/provider-webdriver/src/platform-runtime.test.ts packages/provider-webdriver/src/platform-runtime.ts scripts/layering/check.ts scripts/layering/cutover-policy-ast.ts scripts/layering/device-inventory-cutover-policy.test.ts scripts/layering/device-inventory-cutover-policy.ts scripts/layering/logs-runtime-cutover-policy.test.ts scripts/layering/logs-runtime-cutover-policy.ts scripts/layering/network-runtime-cutover-policy.test.ts scripts/layering/network-runtime-cutover-policy.ts scripts/layering/record-runtime-cutover-policy.test.ts scripts/layering/record-runtime-cutover-policy.ts scripts/layering/record-runtime-mechanics-policy.ts scripts/layering/record-runtime-policy-ast.ts scripts/layering/record-runtime-registry-policy.ts scripts/layering/rule-ids.ts scripts/layering/runtime-command-cutover-extensions.test.ts scripts/layering/runtime-command-cutover-extensions.ts scripts/layering/runtime-command-cutover-fixtures.ts scripts/layering/runtime-command-cutover-model.ts scripts/layering/runtime-command-cutover-policy.test.ts scripts/layering/runtime-command-cutover-policy.ts scripts/layering/runtime-command-cutover-table.test.ts scripts/layering/runtime-command-cutover-table.ts src/tests/contracts/apple-os-capability-table-parity.test.ts src/cli.ts src/cli/injected-daemon-dispatch.ts src/core/tests/capabilities.test.ts src/core/tests/capability-plugin-routing-parity.test.ts src/core/command-descriptor/tests/boot-runtime-execution.test.ts src/core/command-descriptor/tests/parity.test.ts src/core/command-descriptor/tests/platform-execution-cli-route.test.ts src/core/command-descriptor/tests/platform-execution-entry.test.ts src/core/command-descriptor/platform-execution-entry.ts src/core/command-descriptor/registry.ts src/core/dispatch-resolve.ts src/daemon/tests/app-log-resource-recovery.test.ts src/daemon/tests/device-claim-reconciliation.test.ts src/daemon/tests/request-handler-catalog.test.ts src/daemon/tests/request-handler-chain-provider-scope.test.ts src/daemon/tests/request-handler-chain.test.ts src/daemon/tests/request-router-record-runtime-lock.test.ts src/daemon/tests/request-runtime-binding-router.test.ts src/daemon/tests/request-runtime-binding.test.ts src/daemon/tests/screen-recording-resource-recovery.test.ts src/daemon/tests/test-device-runtime-gateway.ts src/daemon/handlers/tests/network-runtime-harness.ts src/daemon/handlers/tests/record-runtime.fixtures.ts src/daemon/handlers/tests/session-boot-shutdown.test.ts src/daemon/handlers/tests/session-capabilities.test.ts src/daemon/handlers/tests/session-command-harness.ts src/daemon/handlers/tests/session-logs.test.ts src/daemon/handlers/tests/session-state-boot-warmup.test.ts src/daemon/handlers/tests/session-state.test.ts src/daemon/handlers/session-device-utils.ts src/daemon/handlers/session-inventory.ts src/daemon/handlers/session-state.ts src/daemon/handlers/session.ts src/daemon/request-execution-scope.ts src/daemon/request-handler-chain.ts src/daemon/request-router.ts src/daemon/request-runtime-binding.ts src/platform-runtime-android-emulator-host.ts src/platform-runtime-apple-automation-keep-hot.ts src/platform-runtime-apple-physical-readiness.ts src/platform-runtime-gateway.test.ts src/platform-runtime-gateway.ts src/platform-runtime-operation-host.ts src/platforms/apple/core/physical-device-control.ts src/platforms/apple/core/physical-device-coredevice.ts src/platforms/apple/plugin.ts src/utils/tests/device.test.ts test/integration/provider-scenarios/harness.ts test/integration/provider-scenarios/ios-alert-settings.test.ts test/integration/provider-scenarios/ios-world.ts RUN v4.1.8 /private/tmp/agent-device-adr19-1747 ✓ |interaction-contract| test/integration/interaction-contract/interaction-response-shape.contract.test.ts (10 tests) 3416ms Test Files 1 failed | 573 passed (574) [ELIFECYCLE] Command failed with exit code 1. passed (574 files / 4,765 tests; 82.43% changed-line and 77.55% changed-branch coverage)\n- exact-head live verification passed on stopped iOS simulator, physical iOS, and stopped Android AVD in headless and normal modes; targets were restored and isolated daemon state cleaned\n\nThe PR body now records the 84-file scope-expansion verdict, current size report, denominator, and exact-head evidence. No review threads remain. It stays draft only for the prerequisite stack and the final in-progress smoke lane. |
|
Re-reviewed exact head |
a200645 to
c7b5a24
Compare
c7b5a24 to
fcb2f35
Compare
|
Exact-head coordinator update at fcb2f35: final replay onto #1745 is complete and code review is clean. Boot remains a single request-scoped unit with package-owned Apple/Android readiness, one inspect/one bind, cancellation propagation, cleanup on aborted Android startup, and R20 cutover ownership. pnpm check:affected --run passed: 574 files / 4,770 tests, layering 170/170, changed-line coverage 182/224 (81.25%), unchanged daemon wire surface. The GitHub stack is now #1750 → #1745 → #1747 → #1756. Fresh exact-head CI is running; prior live simulator/emulator/physical-iOS evidence remains applicable. |
fcb2f35 to
9d2337f
Compare
Summary
Move
bootonto ADR 0019's request-scoped device-runtime tier at exact headfcb2f35cc:inspectFacts; admission inspects once and a supported request binds exactly once through the discriminatedbootTarget/bootTargetHeadlessplanbootR20 row to the shared parameterized cutover gateEvidence tier: request-scoped. No admission ledger, fence, durable descriptor, recovery adapter, or durable lifecycle state is added.
Legacy-parity denominator
ensureReadyremains the legacy no-op needed by later units; boot stays unavailableFacts tests enumerate the local platform leaves and both provider owners. Handler regressions prove unavailable cells inspect once/bind zero, while supported cells inspect once/bind once. In-flight abort tests cover Apple simulator, Apple physical readiness, and a request-started Android emulator.
This PR changes 84 files (+1,803/-546) relative to its exact #1745 stack base. Scope expanded during review because the originally proposed root cross-family readiness adapter violated ADR 0019 ownership; the additional files move those same boot mechanics into Apple/Android packages and narrow the injected host ports. It remains one boot unit.
Validation
pnpm check:affected --run && git pushpassed at exact headfcb2f35cciPhone 17 Probooted successfully and was restored to stoppedthymikee-iphonecompleted readiness successfullyPixel_7_CIbooted headless and normally through inventory placeholder resolutionDocs/skills were not changed because the public CLI surface and workflow guidance are unchanged.
Stacked on #1745 after its final #1750 replay. Part of #1739.