ADFA-4128 (6/11): quickbuild:core — deploy and reload - #1718
Open
fryanpan wants to merge 2 commits into
Open
Conversation
fryanpan
force-pushed
the
feature/ADFA-4128-qb-06-core-deploy
branch
from
August 22, 2026 06:41
7b2269e to
d5ac48d
Compare
…icy, the binder deploy channel, stage-cost telemetry Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kj9YeCDHGp9DU8LPtfWJ7W
…icity, deploy teardown - Swallowed linkToDeath failure -> a binder dead at connect is reported as an instant death and never registered, so deploys fail fast as NotConnected instead of timing out with the freezer hold kept on a dead package (tests: "a binder that is dead at connect is not left registered", "a dead binder's stale connect retry does not clobber a live registration"). - Non-atomic connect watch/registration -> registration and death watch are one @synchronized step, and death delivery shares the lock, so the watched binder and the registered target can never disagree and a death cannot slip between link and registration (test: "a death delivered while connect is registering still clears the target"; wiring: "a reconnect moves the watch, and firing it clears the registration"). - Restart payload retained with hot-swap metadata -> a confirmed restart deploy clears the retained set instead of retaining it, so a reconnect catch-up can never hot-swap over the live restart-sensitive component and falls back to the forced rebuild (test: "a confirmed restart deploy clears the retained payload instead of retaining it"). - endSession leaving an in-flight deploy to time out -> endSession routes through onDisconnected, whose Disconnected report answers the waiter deterministically (test: "ending the session answers a deploy awaiting its verdict as Disconnected"). - Adjacent minor: disconnect() now unlinks the death watch, so no stale recipient outlives a graceful disconnect (test: "a graceful disconnect unlinks the death watch"). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kj9YeCDHGp9DU8LPtfWJ7W
fryanpan
force-pushed
the
feature/ADFA-4128-qb-06-core-deploy
branch
from
August 22, 2026 07:05
d5ac48d to
df57d58
Compare
fryanpan
marked this pull request as ready for review
August 23, 2026 02:31
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 6/11 of the stacked split of #1669 (requested by Akash). Base: feature/ADFA-4128-qb-05-core-detection. Stack overview + review mechanics: PR 1 (#1713). Terms are defined in quickbuild/README.md (lands in PR 1).
Gets a finished build into the running app by the fastest route that is still correct, and keeps a record of where the time went.
flowchart LR route["a classified route<br/>(detection, PR 5)"] --> orch subgraph s6["<b>This PR: core slice 2 — deploy and reload</b>"] orch["LiveReloadOrchestrator (domain/reload)<br/>one build in flight, supersede,<br/>generations forward-only<br/><i>LiveReloadOrchestrator.kt</i>"] --> pol["DeployPolicy<br/>hot reload vs component restart;<br/>restart rule + logsender exemption<br/><i>DeployPolicy.kt</i>"] pol --> ch["DeployChannel + ProxyAppConnections<br/>(service/deploy)<br/>uid-checked binder, payloads as fds<br/><i>DeployChannel.kt</i>"] pol --> ln["ProxyAppLauncher<br/>relaunch + retry<br/><i>ProxyAppLauncher.kt</i>"] tel["telemetry (domain + service)<br/>stage timings, metrics ports"] end ch -- "AIDL (runtime's .aidl, PR 4)" --> rt["proxy app runtime"] sess["session state machine (PR 8)<br/>drives and observes"] -.-> orch classDef thisPrBox fill:#dbeafe,stroke:#93c5fd,color:#1e3a5f classDef inPr fill:#ffffff,stroke:#64748b,color:#000 class s6 thisPrBox class orch,pol,ch,ln,tel inPrWhat to review
DeployPolicy.kt— restart rule; the logsender exemption saves +477 ms per save. Line-by-line.LiveReloadOrchestrator.kt— one build in flight; a newer edit supersedes the older.DeployChannel.kt— payloads as read-only fds over uid-checked binder; generation-matched reports.ProxyAppLauncher.kt— relaunch and retry; rides here because deploy owns relaunch.Fakes.kt— test fixture grows across PRs 6-8; no production code moves.How this PR Was Tested
:quickbuild:core:test— runs slices 1-2's tests (the module's compiled-so-far set): 36 suites, 472 tests per variant across all 6 variants, 0 failures, 0 errors. Coverage 95.6% line / 90.3% branch.Coverage (JaCoCo at the stack tip, single run):
…quickbuild.data…quickbuild.domain.reload…quickbuild.domain.session…quickbuild.domain.telemetry…quickbuild.service.deploy…quickbuild.service.provision…quickbuild.service.telemetry22 source files in the diff, all 22 measured. The
service.provisionrow isProxyAppLauncher.ktalone, an interface for which JaCoCo emits no counter.Slice 2 of 4 — next: provisioning (PR 7).
🤖 Generated with Claude Code
https://claude.ai/code/session_01Kj9YeCDHGp9DU8LPtfWJ7W