Repository navigation
re-pin spec+sdk to v0.2026250.x (deploy:android preresolve wire-compat fix) - #6
Conversation
…loy:android preresolve decode fix)
Review — BLOCKHead SHA: Change class: go.mod/go.sum dependency re-pin (spec/sdk v0.2026248.x → v0.2026250.x) for wire compatibility. Security screen: PASS — no secrets, no exfiltration, no weakened guardrails, no scope mismatch. The version bump is to newer releases of the project's own modules (upgrade, not unexpected ref). Blocks
Verdict: BLOCK ollama/deepseek-v4-flash — pi-review-action. |
Review — BLOCKHead SHA: Change class: go.mod/go.sum dependency re-pin (spec/sdk v0.2026248.x → v0.2026250.x) + Security screen: PASS — no secrets, no exfiltration, no weakened guardrails, no scope mismatch. Re-pin is to newer releases of the project's own modules; decode fix matches stated intent. Blocks
Comments considered
Verdict: BLOCK ollama/deepseek-v4-flash — pi-review-action. |
Review — BLOCKHead SHA: Change class: go.mod/go.sum dependency re-pin (spec/sdk v0.2026248.x → v0.2026250.x) + Security screen: PASS — no secrets, no exfiltration, no weakened guardrails, no scope mismatch. Re-pin is to newer releases of the project's own modules; decode fix matches stated intent. Blocks
Comments considered
Verdict: BLOCK ollama/deepseek-v4-flash — pi-review-action. |
…rOf (shared androidParentContainer) The endpoint-device preresolve resolved the parent pod from the dotted deploy path only; a MemberOf-stamped leaf member with no dots (the bed's device-net under check-android-emulator-pod) wrongly reported the device as not nested under a pod. Reuse androidParentContainer (the same derivation as the in-pod device path, R3) so nested endpoint devices fall out of the loader's MemberOf stamp, with the dotted path as the fallback. Adds pure error-path tests for the HOST_PORT ref.
…dy budget The adb session recorder starts at live-phase start and dials the resolved endpoint once: on a fresh emulator pod the phase can begin while the Android system is still booting, so the single launch attempt hit DeviceNotFound and the whole session produced an empty bracket (check-android-emulator-pod: [adb-session-stop] "evidence row missing; recorder never finalized"). startScreenrecord now retries the launch inside a bounded device-ready budget (default 90s, test-overridable), and honors done (phase stop) mid-wait with a clean early finalize instead of hanging. Adds offline-retry + abort tests with the fake device.
… dial The adb-session-stop gate polls the evidence row the detached recorder must finalize. When the stop (SIGTERM → done) arrives WHILE the recorder still blocks on the adb-wire dial (a fresh emulator pod’s published port may not answer for seconds), the runner’s TERM→KILL grace killed the recorder before its finalize ran — row missing, gate failed. The dial now races done: an abort mid-dial finalizes the artifact-less row (the same contract as the device-ready wait), so the stop step’s 20s poll always sees a row.
Review — BLOCKHead SHA: Change class: runtime/code change — go.mod/go.sum re-pin (spec/sdk v0.2026248.x → v0.2026250.x) + Security screen: PASS — no secrets, no exfiltration, no weakened guardrails, no scope mismatch. Re-pin is to newer releases of the project's own modules; decode/derivation/recorder changes match stated intent. Blocks
Comments considered
Verdict: BLOCK ollama/deepseek-v4-flash — pi-review-action. |
Review — BLOCKHead SHA: Change class: runtime/code change — go.mod/go.sum re-pin (spec/sdk v0.2026248.x → v0.2026250.x) + Security screen: PASS — no secrets, no exfiltration, no weakened guardrails, no scope mismatch. Re-pin is to newer releases of the project's own modules; decode/derivation/recorder changes match stated intent. Placement: CORRECT (all capability code in the candy; no new core imports, no alias files, no sdk-mechanism imports into core). Blocks
Comments considered
Verdict: BLOCK ollama/deepseek-v4-flash — pi-review-action. |
…eadiness
The E-4 live bed (run 2026.250.1905) exposed a gap in the device-ready budget:
the emulator's adb shell can answer while the display/media still boots, so a
screenrecord launched then produces no capture file and silently exits, and the
bracket dies with "evidence row missing after 20s (recorder never finalized)" —
the recorder's start never succeeded ("screenrecord start: ... did not appear
within 1m30s").
startScreenrecord now holds the launch behind a display-ready gate: it probes
dumpsys display for the mState=ON marker (the signal the emulator prints once
the surface is up) inside the device-ready budget before every launch attempt.
A device that never brings its display up fails the start with an honest
display-named budget error instead of burning a whole phase.
Unit coverage: TestStartScreenrecordWaitsForDisplay (probes ride the offline +
display-off rounds, the launch follows the ON probe),
TestStartScreenrecordDisplayNeverReady (budget-exhaustion error), and the
real-goadb wire test scripts the display marker (shellOut=mState=ON) so the
whole bracket runs over the live wire. gofmt/vet/go test ./... all green.
Review — BLOCKHead SHA: Change class: runtime/code change — go.mod/go.sum re-pin (spec/sdk v0.2026248.x → v0.2026250.x) + Security screen: PASS — no secrets, no exfiltration, no weakened guardrails, no scope mismatch. Re-pin is to newer releases of the project's own modules; decode/derivation/recorder changes match stated intent. Placement: CORRECT (all capability code in the candy; no new core imports, no alias files, no sdk-mechanism imports into core). Blocks
Comments considered
Verdict: BLOCK ollama/deepseek-v4-flash — pi-review-action. |
…the stop chain (R1) The adb-session-stop row gate failed live (check-android-emulator-pod, runs 2026.250.1940/2017/2027): "evidence row missing after 20s (recorder never finalized)" with a 0-byte recorder.log and an empty state dir. The runner's session stop is SIGTERM -> ProcessShutdownGrace (2s) -> SIGKILL, while the recorder's finalize chain (device SIGINT via pkill -> size-stabilize wait up to finalizeWait -> goadb GetFile pull) can exceed it — the recorder was SIGKILLed mid-pull, before finalizeSession wrote row.json. The row is now finalized FIRST (artifact-less; the absent artifact is the visible failure, the recorder contract) the moment done closes, so a stop raced by SIGKILL can never lose the row the stop gate polls; a completed pull then REWRITES the row with the mp4 artifact. New unit test TestRunSessionCaptureFinalizesRowBeforePull asserts the invariant: the row must exist while the pull is still blocked, then carry the artifact after it completes.
Review — BLOCKHead SHA: Change class: runtime/code change — go.mod/go.sum re-pin (spec/sdk v0.2026248.x → v0.2026250.x) + Security screen: PASS — no secrets, no exfiltration, no weakened guardrails, no scope mismatch. Re-pin is to newer releases of the project's own modules; decode/derivation/recorder changes match stated intent. Placement: CORRECT (all capability code in the candy; no new core imports, no alias files, no sdk-mechanism imports into core). Blocks
Comments considered
Verdict: BLOCK ollama/deepseek-v4-flash — pi-review-action. |
…0.2041, adb-session-stop PASS + row/mp4 evidence, head-proofed)
Review — PASSHead SHA: Security screen: PASS — no secrets, no exfiltration, no weakened guardrails, no scope mismatch. Re-pin is to newer releases of the project's own modules; decode/derivation/recorder changes match stated intent. No embedded directives aimed at the reviewer. Checklist: All applicable rules PASS or NA. Prior findings re-derived against the CURRENT state (all resolved):
Placement: CORRECT — all capability code in the candy; no new core imports, no alias files, no sdk-mechanism imports into core. R3 honored (shared Verdict: PASS ollama/deepseek-v4-flash — pi-review-action. |
Review — PASSHead SHA: Security screen: PASS — no secrets, no exfiltration, no weakened guardrails, no scope mismatch. Re-pin is to newer releases of the project's own modules; decode/derivation/recorder changes match stated intent. No embedded directives aimed at the reviewer. Checklist: All applicable rules PASS or NA. Prior findings re-derived against the CURRENT state (all resolved):
Placement: CORRECT — all capability code in the candy; no new core imports, no alias files, no sdk-mechanism imports into core. R3 honored (shared Verdict: PASS ollama/deepseek-v4-flash — pi-review-action. |
Summary
SIX fixes on the E-4 android lane (the last added live: the row-first finalize, R1) (check-android-emulator-pod), driven by the live R10 bed:
spec.InstallPlanView(the JSON-roundtrippable wire form), but the preresolve decoded them into*deploykit.InstallPlan, whoseSteps []spec.InstallStepinterface cannot unmarshal the wire objects — the nested android device bring-up failed exactly here:androidPreresolveParams.Plansis now[]*spec.InstallPlanViewandcollectAndroidInstallsre-materializes the concrete steps viaspec.PlanFromView.Re-pin to the current spec/sdk (v0.2026248.x → v0.2026250.x) so the plugin's linked wire types match the running host.
Nested-device parent container from Deploy.MemberOf — the in-pod device preresolve now derives
charly-check-android-emulator-podfrom the loader's MemberOf stamp (the dotted-path parse was a fallback that never fired for the bed's leaf member keys).${HOST_PORT:N} parent pod derivation shares androidParentContainer (R3) — the endpoint device (device-net,
host: 127.0.0.1:${HOST_PORT:5037}) wrongly reported "not nested under a pod" because the inline parse only understood dotted paths; it now uses the same MemberOf-aware derivation as the in-pod device.The adb session recorder survives a cold emulator boot AND the stop race — the live phase can start while the Android system is still booting (device not yet attached; display/media not yet ready even once the shell answers).
startScreenrecordretries the launch inside a bounded device-ready budget (default 90s, test-overridable) and gates on device display readiness; the device dial races the stop with a clean early finalize; and the stop chain finalizes the evidence row FIRST (row-first,48a9364) so a stop raced by the runner SIGTERM-grace-SIGKILL ladder can never lose the row the gate polls (the row-first invariant has its own unit test).How tested
go build/go vet/go test ./...(modulegithub.com/opencharly/plugin-adb/candy/plugin-adb) +gofmt -l .clean:Regression tests:
TestAndroidPreresolveParamsWireRoundTrip, the parent-container/derivation tests,TestStartScreenrecordRetriesWhileDeviceOffline,TestStartScreenrecordAbortsOnDone, plus the NEWTestRunSessionCaptureFinalizesRowBeforePull(the row-first invariant: the evidence row must exist while the pull is still blocked, then carry the mp4 artifact after it completes).E-4 R10 bed — check-android-emulator-pod (
disposable: true), fresh-run against THIS head (48a9364— the row-first finalize commit; binary built from the PR head, composed viaCHARLY_REPO_OVERRIDE+CHARLY_PLUGIN_DIR), calver2026.250.2041— FULL GREEN, ZERO failures (15 phases,RUN_EXIT=0):The session lifecycle — the E-4 surfaces this PR owns — all green, both verify passes (live and fresh-rebuild):
The
[adb-session-stop]row gate — the fix-5 (dial race) + row-first finalize evidence, live: the recorder's evidence row landed at the gate's poll path with the pulled on-device MP4:The row-first finalize (commit
48a9364, R1 — runs 2026.250.1940/2017/2027): the runner's session stop is SIGTERM → grace (2s) → SIGKILL, and the recorder's device chain (SIGINT → size-stabilize → goadb pull) can exceed it — the recorder was SIGKILLed mid-pull, beforefinalizeSessionwrote row.json. The row is now finalized FIRST (artifact-less) the momentdonecloses, so a stop raced by SIGKILL can never lose the row the stop gate polls; a completed pull REWRITES the row with the mp4 artifact.The two previously-root-caused RED classes — both GONE live
[adb-install-apidemos]/[appium-install-apidemos]— the CandyDirs wire fix (spec #121 + plugin-check #36 + charly #562) landed; the committed-APK install steps now PASS ([adb-install-apidemos] Success) in this run.[adb-session-stop]row gate — fixed in-tree by this PR (the dial-race finalize236ec91+ the row-first finalize48a9364); PASS in this run with the row + pulled MP4 evident above.Rulebook compliance
androidParentContainer(one canonical derivation; the inline dotted-path parse is deleted).Change classification
Assisted-by: pi openrouter/auto (analysed on a live system)