Repository navigation
fix(check): unwrap the check-run candy dirs from the wire CheckEnv into the reverse-leg carrier - #562
Conversation
…to the reverse-leg carrier The in-pod step carrier (InvokeProvider ClassVerb/ops.OpRun branch) decodes the wire spec.CheckEnv into a hostCheckCarrier but never unwrapped the candy source-dir map, so checkhost.ResolveCommittedApk scanned 0 candies for an in-venue step's relative apk: path -- check-android-emulator-pod's adb-install-apidemos / appium-install-apidemos failed with "0 candies scanned" (calver 2026.250.1712) even though the in-venue runner already folded the map (candyDirsFromEnvelope) into its config. The wire field #CheckEnv.candy_dirs landed in spec PR #121 (v0.2026250.1815); the sender half lands in plugin-check PR #37. This change unwraps it here (carrier.candyDirs = env.CandyDirs), so the host-side resolveCheckApk anchors an in-pod step IDENTICALLY to an out-of-pod step, and re-emits it (snapshotCheckEnv, so a nested out-of-process verb dispatch carries the map across the second hop). spec re-pinned to v0.2026250.1815. Regression tests mirror the out-of-pod path's TestResolveCheckApk through the wire decode + carrier construction. Assisted-by: pi (fully tested and validated)
…ckEnv.candy_dirs sender, PR #36) The compiled-in plugin-check must carry the sender half (pluginSnapshotCheckEnv threads RunnerConfig.CandyDirs onto the wire CheckEnv) for the host-side unwrapping this PR adds; v0.2026250.724 predates it. MVS resolves spec at v0.2026250.1815 (this PR's pin) so the sender compiles. Assisted-by: pi (fully tested and validated)
…m the pinned tags) The compiled-in plugin-check v0.2026250.1816 + spec v0.2026250.1815 pins resolve cleanly from the proxy; the local absolute-path replace was a developer-only build aid and must not ship. Assisted-by: pi (fully tested and validated)
…tag with the spec-1815 pin) The #37 merge (pure spec pin bump) was tagged v2026.250.1843; pin the compiled-in plugin-check at that tag instead of v0.2026250.1816 so the module's own go.mod requirement is consistent with the resolved spec. Assisted-by: pi (fully tested and validated)
Review — BLOCKHead SHA: Change class: runtime/code change (Go reverse-leg carrier + provider_checkenv + dependency pins + new tests). Security screen: PASS — no secrets, no egress, no scope mismatch, no weakened guardrails. The change unwraps a wire field into the carrier and re-emits it; description matches code. Blocks
Verdict: BLOCK ollama/deepseek-v4-flash — pi-review-action. |
…hor (E-2 recipe)
Live run (branch-built binary, calver 2026.250.1843, disposable android pod,
charly check live check-android-emulator-pod from distro-cachyos with
CHARLY_REPO_OVERRIDE):
BEFORE (pre-fix, calver 2026.250.1712):
committed APK "tests/data/ApiDemos-debug.apk": candy "pod-android-emulator-layer"
is absent from the source scan (0 candies scanned) — cannot anchor the fixture
AFTER (this branch):
FAIL check adb=install [adb-install-apidemos]
verb "adb": committed APK "./tests/data/ApiDemos-debug.apk" not found under
candy source tree ".../[email protected]" (searched
every ancestor up to the filesystem root)
The map lookup now succeeds (the wire carries CandyDirs → the host carrier
unwraps it → checkhost.ResolveCommittedApk finds the candy key); the residual
file-walk failure is the bed's pinned layer tag v2026.243.1812, which predates
layer PR #5 (the committed fixture shipped at v2026.250.1834) — a bed-side pin
bump owned by the E-4 lane, not this core change. Full detail in the PR body.
Assisted-by: pi (analysed on a live system)
Review — PASSHead SHA: Security screen: PASS — no secrets/egress, no scope mismatch (description matches code), no weakened guardrails, pins are released tags (spec v0.2026250.1815, plugin-check v0.2026250.1843). Checklist: All applicable rules PASS or NA. Prior reviewer findings re-derived against the CURRENT state (all resolved):
Independent checks: unit gates (gofmt/build/vet/full suite) green on final tree; new tests ( Verdict: PASS ollama/deepseek-v4-flash — pi-review-action. |
|
E-4 wave live proof — the run IS this fix A2/B14 evidence (the wave confirm run, calver 2026.250.2041). The full E-4 R10 bed (check-android-emulator-pod, vs the pre-fix failure this PR root-caused (calver 2026.250.1712): Pin claim correction (R1): the merged go.mod pins plugin-check v0.2026250.1843 (the body sentence "tags v2026.250.1816 / v2026.250.1843" could read as 1816 being the pinned tag — 1816 is plugin-check #36 pre-1843 tag, NOT what this PR pins; the actual require is Attribution: the previously "owed by the E-4 lane" R10 run has landed, green, in this wave (analysed on a live system; released-pin consumption runs in the wave consumer beds after the plugin/fixture tags land). |
Summary
The HOST side of the committed-APK anchoring fix for in-venue (in-pod) check steps.
The F10 reverse-leg step carrier (InvokeProvider
ClassVerb/ops.OpRunbranch,plugin_dispatch_reverse.go) decodes the wirespec.CheckEnvinto ahostCheckCarrier, but never unwrapped the candy source-dir map — socheckhost.ResolveCommittedApk(viahostVerbResolver.resolveCheckApk) scanned0 candies for an in-venue step's relative
apk:path. The baked-plan installsteps of
check-android-emulator-podfailed live (calver 2026.250.1712):even though the in-venue runner already folded the map (
candyDirsFromEnvelope)into its config. The chain:
#CheckEnv.candy_dirs.pluginSnapshotCheckEnvthreadsRunnerConfig.CandyDirs(kr.CandyDirs())onto the env in every in-pod verb dispatch + the spec-1815 pin it needs.
This PR pins plugin-check v0.2026250.1843.
env.CandyDirsinto the carrier(
candyDirs: env.CandyDirs) so an in-pod step anchors IDENTICALLY to anout-of-pod step, and re-emit it (
snapshotCheckEnv→ce.CandyDirs = cc.CandyDirs()) so a nested out-of-process verb dispatch keeps the map acrossthe second hop. spec re-pinned to v0.2026250.1815 (was 957).
Out-of-pod parity: the out-of-pod runner folds the same map into its
RunnerConfig.CandyDirs(resolveCheckRunnerContext/candyDirsFromEnvelope→
checkRunnerContext), which is what the sender now puts on the wire — thein-pod path simply lost it between the runner and the host carrier. This closes
the seam at its narrowest point (the wire), no parallel resolution path (R3).
How tested
Unit gates (module root
charly/, final tree f9844d9+):Live proof (E-2 recipe — branch-built binary at the PR head, spec/plugin-check
resolved from the proxy at the pinned tags; disposable android pod from the
cached image, emulator-5554 booted,
charly check live check-android-emulator-podruntime plan from distro-cachyos with
CHARLY_REPO_OVERRIDE):Before (pre-fix, the historical failure — calver 2026.250.1712):
committed APK "tests/data/ApiDemos-debug.apk": candy "pod-android-emulator-layer" is absent from the source scan (0 candies scanned) — cannot anchor the fixture
After (this branch, calver 2026.250.1843):
FAIL check adb=install [adb-install-apidemos] (attempts=36, elapsed=2m57.976s)
verb "adb": committed APK "./tests/data/ApiDemos-debug.apk" not found under
candy source tree "/home/atrawog/.cache/charly/repos/github.com/opencharly/
[email protected]" (searched every ancestor…)
The fix's exact effect: the
0 candies scannedmap-lookup failure is GONE — thewire now carries the candy map, the lookup succeeds, and the resolution proceeds
to the file walk. The residual failure is a SEPARATE, pre-existing bed defect now
precisely RCA'd: the android-emulator box pins
@github.com/opencharly/pod-android-emulator-layer:v2026.243.1812, a tag thatpredates layer PR #5 which shipped the committed
tests/data/ApiDemos-debug.apkfixture (layer tag v2026.250.1834). The R10 final bed run therefore needs that
pin bump — owned by the E-4 lane on the bed's tree (distro-cachyos), not by this
PR's core change.
Rulebook compliance
resolveCheckApk→checkhost.ResolveCommittedApk(spec fabric slice) anchors both placements;the wire shape is the ONE CUE-sourced
spec.CheckEnv.candy_dirson the wire is exactlythe prior behavior (carrier stays empty).
v0.2026250.1843).
classified away.
Change classification
live check-live run on a branch-built binary (above); the released-pin R10
final bed run is owed by the E-4 lane after merge + tag (its aapt2 gate +
the pod-android-emulator-layer pin bump land on the bed's own tree)
gates on the final tree; the E-4 wave full-green R10 confirmation run calver
2026.250.2041 lands the committed-APK install proof)
Assisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (analysed on a live system)