# test384 — opencode local-package preview release gate

date: 2026-07-16T03:33:28+00:00
node: v22.23.1
bun: 1.3.14
opencode expected: 1.18.1
agent-network expected: 2.3.0-preview.34 (publish tag preview)
agent-node expected: 2.5.0-preview.26 (publish tag preview)
free model: opencode/deepseek-v4-flash-free
hub: isolated loopback :9384, db=/tmp/test384/commhub-test384.db
external safe base: /run/user/0/anet-test384-safe (mode 700)

## L0 — environment + locally packed artifacts
opencode acp

start ACP (Agent Client Protocol) server

Options:
  -h, --help         show help                                                             [boolean]
  -v, --version      show version number                                                   [boolean]
      --print-logs   print logs to stderr                                                  [boolean]
      --log-level    log level                  [string] [choices: "DEBUG", "INFO", "WARN", "ERROR"]
      --pure         run without external plugins                                          [boolean]
      --port         port to listen on                                         [number] [default: 0]
      --hostname     hostname to listen on                           [string] [default: "127.0.0.1"]
      --mdns         enable mDNS service discovery (defaults hostname to 0.0.0.0)
                                                                          [boolean] [default: false]
      --mdns-domain  custom domain name for mDNS service (default: opencode.local)
                                                                [string] [default: "opencode.local"]
      --cors         additional domains to allow for CORS                      [array] [default: []]
      --cwd          working directory                                [string] [default: "/test384"]PASS: exact local tarballs installed — agent-network=2.3.0-preview.34 agent-node=2.5.0-preview.26; both publishConfig.tag=preview
PASS: tarball sha256 network=f6b915577205b38eefd4e1d814892684d0c53185947dac1c9f59e3c86688afcb
PASS: tarball sha256 node=7edd95ac0835a6d0fac649a03448d0bbec203ca08cf4fa8fc7584b051e8ec72f
PASS: agent-node bundle markers processWithOpencode + opencode-cli present
PASS: opencode-ai exact pin=1.18.1 and acp smoke passed

## L1 — isolated CommHub + real CLI login
PASS: secured local hub ready; registration + anet login + default network persisted

## L1.5 — pre-seeded node-state symlink is rejected before profile secret write
PASS: malicious node-root symlink failed closed; ntok profile/config dotenv did not escape
PASS: ordinary pre-planted dotenv/auth/invalid config were atomically reset on keyless create; login hint uses the sandboxed helper

## L1.6 — exact 1.18.1 auth-login uses a disposable root and imports only validated API auth
AUTH_LOGIN_PASS: interrupt
AUTH_LOGIN_PASS: success
PASS: traversal ref rejected; interrupted login preserved old auth; successful exact-pin login atomically imported only anthropic API auth
PASS: auth-login temporary roots=0 and planted persistent DB/log/cache/state/runtime/tmp links caused zero outside writes
PASS: real auth prompt/interrupt/success never executed the malicious project-ancestor plugin

## L2 — real pexpect picker: unnamed/Anthropic + named/OpenAI
PEXPECT_PASS runtime_choices=6 exact_order=yes unnamed=opencode-cli/anthropic named=opencode-cli/openai
PASS: both installed-bundle picker paths rendered the exact 6-choice canonical-main set/order, selected opencode-cli, and exited 0

## L3 — preset auth/config materialization and permissions
PASS: Anthropic/OpenAI provider shapes and synthetic dummy-key equality verified (values redacted)
PASS: opencode-ai@1.18.1 auth list consumed both node-scoped preset files
PASS: both auth.json and opencode.json are mode 600 for both nodes
PASS: node and persistent OpenCode state roots are pre-created mode 700
PASS: preset + upstream effective config disable bash/read/glob/grep/edit/write/list/task/skill/question

## L3.5 — post-create config/dotenv replacement cannot bypass the OpenCode binding
PASS: post-create config.json symlink was refused; external target stayed byte-identical
PASS: regular runtime downgrade was refused by the external OpenCode binding before NODE_OPTIONS execution
PASS: post-create .env symlink was refused; external target stayed byte-identical and payload did not run

## L4 — hostile inherited config/XDG + child env allowlist
SECURITY_ENV_PASS forbidden keys absent; external 0700 cwd/HOME/XDG; process PWD and ACP session cwd identical; project/plugin/skill/Claude/LSP discovery disabled
PASS: fake ACP task replied through installed launchers; credential env names were absent
PASS: same-version project-local opencode-ai impersonator was skipped; canonical external package fake ran
PASS: hostile XDG/OPENCODE_CONFIG* lost precedence; discovery controls present; fresh launch root cleaned

## L5 — rejected handshake and SIGTERM during opening leave no child
PASS: child that rejected initialize and stayed alive was explicitly reaped
PASS: SIGTERM during unresolved initialize reaped agent-node + opening OpenCode child

## L5.5 — external safe-base ancestor candidate refuses before ACP spawn
PASS: candidate in trusted-base ancestor chain hard-failed before OpenCode ACP spawn; transient roots=0

## L6 — exact 1.18.1 real task ignores malicious ancestor config/plugin
PASS: installed agent-network launched installed agent-node; alias reached idle
PASS: task 658f2d0f... reached replied under hostile parent overrides; result length=75
PASS: exact opencode-ai@1.18.1 kept node free model authoritative; ancestor file-plugin marker absent
safe node-log evidence:
[03:34:11] [INFO ] [wizard-openai] SSE connected
[03:34:12] [INFO ] [wizard-openai] → processing [opencode]: Hold the ACP initialize request open until supervisor shutdown.
[03:34:18] [INFO ] [wizard-openai] [opencode-acp] session/new — ses_09702b38...
[03:34:27] [INFO ] [wizard-openai] [opencode] turn done | reply=580ch thought=1282ch chunks=126 stopReason=end_turn rescued=false in=520 out=127 thought=253
[03:34:27] [INFO ] [wizard-openai] sending reply to api (task 2021be48, status=replied)...
[03:34:28] [INFO ] [wizard-openai] → processing [opencode]: Reply in one short sentence confirming the preview OpenCode end-to-end test.
[03:34:29] [INFO ] [wizard-openai] [opencode] turn done | reply=59ch thought=208ch chunks=13 stopReason=end_turn rescued=false in=23 out=14 thought=42
[03:34:29] [INFO ] [wizard-openai] sending reply to api (task 658f2d0f, status=replied)...

## L7 — graceful shutdown + global orphan audit
PASS: launcher exited on SIGTERM; zero agent-node/opencode-acp orphan processes

OVERALL: PASS
trailer: test384 local package -> picker -> security/lifecycle gates -> real OpenCode reply — PASS
