Skip to content

ADFA-4128 (7/11): quickbuild:core — provisioning and the daemon client - #1719

Open
fryanpan wants to merge 2 commits into
feature/ADFA-4128-qb-06-core-deployfrom
feature/ADFA-4128-qb-07-core-provisioning
Open

ADFA-4128 (7/11): quickbuild:core — provisioning and the daemon client#1719
fryanpan wants to merge 2 commits into
feature/ADFA-4128-qb-06-core-deployfrom
feature/ADFA-4128-qb-07-core-provisioning

Conversation

@fryanpan

@fryanpan fryanpan commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Part 7/11 of the stacked split of #1669 (requested by Akash). Base: feature/ADFA-4128-qb-06-core-deploy. Stack overview + review mechanics: PR 1 (#1713). Terms are defined in quickbuild/README.md (lands in PR 1).

Makes sure the two things Quick Build needs before it can start — an installed app to reload into, and a live compiler — are ready, and that it never fights a standard Run for the same install slot.

flowchart LR
    subgraph s7["<b>This PR: core slice 3 — provisioning + daemon client</b>"]
        prov["service/provision<br/>proxy-app install state,<br/>stateless install-slot checks<br/><i>QuickBuildClobberCheck.kt</i>"]
        dc["QuickBuildDaemonController +<br/>DaemonProcessClient (data)<br/>spawn, configure, request matching<br/><i>DaemonProcessClient.kt</i>"]
        fg["FileGenerationStore (data)<br/>generation counter,<br/>outside the scratch tree<br/><i>FileGenerationStore.kt</i>"]
    end
    dc -- "line-delimited JSON<br/>(:quickbuild:protocol, PR 3)" --> d["compile daemon (PR 9)"]
    sess["session state machine (PR 8)"] -.-> prov
    sess -.-> dc
    classDef thisPrBox fill:#dbeafe,stroke:#93c5fd,color:#1e3a5f
    classDef inPr fill:#ffffff,stroke:#64748b,color:#000
    class s7 thisPrBox
    class prov,dc,fg inPr
Loading

What to review

  • DaemonProcessClient.kt — the client half: spawn, configure, request/response matching. C11 fix lands here.
  • QuickBuildClobberCheck.kt — confirms the single install slot before either side clobbers.
  • FileGenerationStore.kt — generation counter lives outside the scratch tree; survives teardown.
  • Deferred followup: prepare() scratch-tree residue, named rather than silently dropped.
  • Fakes.kt grows by FakeDaemon + FakePaths (the progressive split flagged in PR 6).

How this PR Was Tested

  • 13 test files across data/ and service/provision.
  • [verified 2026-08-21] At this cut: :quickbuild:core:test — runs slices 1-3's tests: 49 suites, 650 tests per variant across all 6 variants, 0 failures, 0 errors. Coverage 98.2% line / 90.1% branch.

Coverage (JaCoCo at the stack tip, single run):

Package Line Branch Note
…quickbuild.data 97.9% 90.4%
…quickbuild.service.provision 98.6% 86.9% process-spawn branches
…quickbuild.service.session 100.0% 96.4%
NON-UI TOTAL 98.2% 90.1% 710 lines, 496 branches

11 source files in the diff, all 11 measured.

Slice 3 of 4 — next: orchestration (PR 8).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Kj9YeCDHGp9DU8LPtfWJ7W

@fryanpan
fryanpan force-pushed the feature/ADFA-4128-qb-07-core-provisioning branch from 6233eb7 to c6b09f0 Compare August 22, 2026 06:41
@fryanpan
fryanpan force-pushed the feature/ADFA-4128-qb-07-core-provisioning branch from c6b09f0 to 225d08f Compare August 22, 2026 07:05
@fryanpan
fryanpan marked this pull request as ready for review August 23, 2026 02:31

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@fryanpan
fryanpan force-pushed the feature/ADFA-4128-qb-07-core-provisioning branch from 225d08f to ab316b2 Compare August 24, 2026 14:43
fryanpan and others added 2 commits August 24, 2026 07:44
…ll state and the compile-daemon client the pipeline needs first

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kj9YeCDHGp9DU8LPtfWJ7W
…request bound

Important 1: unguarded asString on diagnostic severity/message threw out of compile() on object/array values -> primitive-guarded, degrading to ERROR / "unknown error"; covered by `a non-primitive severity or message degrades instead of throwing out of compile`.
Important 2: line/column asInt threw NumberFormatException on non-numeric string primitives -> runCatching like the protocol-version read, degrading to absent; covered by `a non-numeric line or column string reads as absent instead of throwing`.
Important 3: the request write had no bound, so a wedged child holding a full stdin pipe parked the mutex forever and shutdown() deadlocked on the writer monitor -> write runs on the client scope under requestTimeoutMillis with destroyForcibly on expiry, and shutdown()'s EOF close moved off the teardown path; covered by `a request the daemon never reads times out instead of wedging the client` and `shutdown is not deadlocked by a write the daemon never reads`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kj9YeCDHGp9DU8LPtfWJ7W
@fryanpan
fryanpan force-pushed the feature/ADFA-4128-qb-07-core-provisioning branch from ab316b2 to 97f4813 Compare August 24, 2026 14:48
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