fix(ci): CUA smoke true-E2E with local opencode server (#15) (#18)

* chore: repoint OpenCode links to agentlabs.cc/opencode

agentlabs.cc/opencode and /opencode/privacy are now live (200). Repoint
README, distribution listings (Play/App Store/F-Droid/IzzyOnDroid/iOS),
docs, and in-app privacy links (settings + telemetry consent) from
www.vibebrowser.app/opencode to the canonical agentlabs.cc hub.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(ci): run local opencode server for CUA smoke true-E2E (#15)

GitHub-hosted runners can't reach the Tailscale dev server
(100.108.64.76:4096), so the CUA smoke always failed at session creation.

- Install opencode-ai and run `opencode serve` on the runner host; the
  Android emulator reaches it via 10.0.2.2. OPENCODE_URL now points there.
- Healthcheck /global/health before launching the app; dump server log on
  failure for diagnosis.
- Add --only-connect-scenario to the smoke script and run just the
  connect-and-verify-sessions path in CI: deterministic, needs no model
  backend. The scenario now creates a session if the list is empty, so a
  fresh server still yields a non-empty list.

This makes the smoke a true E2E and also exercises the #10 sessions-list
rendering path against a real server.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(ci): emulator smoke script is dash, not bash — drop brace-group healthcheck

android-emulator-runner runs the script: block under /usr/bin/sh (dash). The
multi-line `|| { ...; }` healthcheck was a dash syntax error (end of file
unexpected), failing the step before the smoke ran. Replace with a non-fatal
one-line re-check; the server was already health-gated in the prior step.

* docs(tasks): record smoke CI round 1 failure + dash fix

---------

Co-authored-by: engineer <engineer@opencode.ai>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Den
2026-06-01 15:32:06 -07:00
committed by GitHub
parent d1888dc392
commit c9a57901c4
13 changed files with 95 additions and 24 deletions

30
.tasks/15/STATE.md Normal file
View File

@@ -0,0 +1,30 @@
# Task 15 — STATE
- phase: 3-design
- issue: #15 (CUA smoke can't reach opencode server in CI)
- branch: fix/cua-smoke-local-opencode-server
- supervisor: opus 4.8 (solo-founder loop)
## Success metric (R1)
GitHub Actions `CUA Smoke Test` workflow run on the branch ends with
`All N scenarios passed.` (exit 0), where the connect-and-verify-sessions
scenario connected the app to a real opencode server running on the runner
and saw a non-empty session list. Observable in the Actions run log.
## Approach
- Run real `opencode serve` on runner; app (emulator) reaches it via 10.0.2.2.
- Add `--only-connect-scenario` to smoke script; enhance connect goal to
create a session so a fresh empty server still yields a non-empty list.
- This also gives E2E verification for #10 (sessions list after connect).
## Local de-risk (2026-06-01)
- opencode-ai@1.15.13 installs; `opencode serve` healthy in 1s.
- GET /global/health -> {"healthy":true}; /project/current 200; /path 200.
- POST /session then GET /session returns the created session. Flow validated.
- phase: 5-implemented, ready for CI verify.
## CI verify round 1 (FAILED -> fixed)
- run 26750362939: build OK, opencode server step healthy, but emulator
script died with dash syntax error on `|| { ...; }` brace group before smoke ran.
- Fix 42e60db: emulator script: block runs under /usr/bin/sh; replaced brace
group with non-fatal one-line re-check.
- Re-dispatched: run 26751422570.