Repository navigation
Harness composer control never renders in the hub-client posture — the effect chain's server.current guard never fires #1799
Description
Important
Problem — The harness composer control never renders: on a fresh boot with a session open, the panel issues ZERO /amicode/harness requests while /agent and /provider fetch fine — the control's effect chain never runs. The engine serves the route (redeployed clean; the earlier picker regression from the missing harness API is closed engine-side), so this is the panel side never asking. One-command repro: ssh macbook → cd /tmp/opencode/panel-probe && /opt/homebrew/bin/node pickers.mjs — fresh boot, session open, zero harness requests, no control rendered.
Approach — Root-cause the guard in the HarnessComposerControl effect chain in the posture-era framed app: the suspected server.current guard reads as never-true in the hub-client posture (P4's framed app has no conventional local server object), so the effect that would fetch /amicode/harness and mount the control never fires. Name the exact guard, fix it posture-correctly (the control must render in the hub-client posture exactly as it does in the local posture), and pin it with a test.
Scope — in: the control's effect chain + its guard, the mounting path, a regression test, absorption of the panel instrumentation in any file this slice touches. · out: the engine's harness route (serves correctly), the frontdoor, the in-session dock, any new surface.
Acceptance Criteria
- The root cause is named precisely: which guard, in which file of the effect chain, and why it is never-true in the hub-client posture — recorded in the slice's return, not guessed.
- A test drives the control's mount path in the hub-client posture (the framed app's server context as P4 builds it) and fails on the old guard, passes on the fix.
- In the local posture the control's behavior is unchanged (fetch fires, control mounts, "route absent → stays hidden" degradation holds).
- The live panel's reply-path and stream-cycle instrumentation (unbranched, baked into the live dist) is absorbed into source or reverted for any file this slice touches — never left orphaned in a rebuilt dist.
- Zero new failures in the app suite (the known lane baseline stands).
- Post-deploy confirmation (the director's probe, after the deploy decision): pickers.mjs shows the
/amicode/harnessrequest firing and the control rendered.
Testing Decisions
The unit/integration test in the app package is the slice's gate; the macbook probe is the director's post-deploy end-to-end confirmation (the live dist does not change until a deploy decision). Extend the existing control/composer suites — reuse-first.
Key Decisions
- The fix is posture-correct, not guard-deleted: the control must render for the hub-client posture; if the guard existed to protect a posture-specific state, replace it with the correct posture check — never delete a guard to make a widget appear.
- The probe repro may be run read-only from the hub (
ssh -o BatchMode=yes macbook, the harness dir, node at/opt/homebrew/bin/node) to observe the RED state; it cannot show green until the deploy.
Constraints & Invariants
- No engine changes; no new routes; no deploys (the live plane is HITL — Aaron's).
- The "route absent → stays hidden" degradation contract holds: when the engine does NOT serve
/amicode/harness, the control must stay hidden gracefully (the stock-engine case).
Prior Art
- The
#1549harness exception at the panel origin (the extension proxies GET/POST/amicode/harnessto the engine when bound) — the route-reachability half already works. - The P4 hub-client posture (feat(extension): the hub-host client posture — amicode.hubServerUrl spawns nothing, the panel becomes one server (#1760 P4) #1784) — how the framed app's server context differs from the local posture.
- The S2 precedent for absorbing unbranched dist instrumentation (question-reply markers → owned telemetry, S2: the question inbox — every pending question, answerable without opening the session #1786).
Source
Filed from the 2026-10-14 batch approval, riding with #1798's Phase A. Suspected guard: server.current in the posture-era framed app.
Notes
The probe script pickers.mjs and its sibling harness live on macbook at /tmp/opencode/panel-probe/ — page errors that mention aarmoniqs (typo'd directory param) are probe bugs, not server bugs.
Activity
Merge the picker fix (#1799) into the lane — the placement-directory …