Problem
The test suite in packages/opencode has 58 test failures across 4 test files. Typecheck and build are green — only tests are broken.
Root Causes
Bug 1: Null byte in config path (57 failures)
Test setup creates a config directory path ending with \u0000 (null byte), producing:
ENOENT: no such file or directory, open '...opencode-test-data-.../home/.config/opencode\u0000'
Affected files:
test/permission-task.test.ts (6 failures)
test/snapshot/snapshot.test.ts (~40 failures)
test/skill/skill.test.ts (10 failures)
test/config/agent-color.test.ts (1 failure)
Bug 2: Missing gitlabAuthPlugin export (1 failure)
@gitlab/opencode-gitlab-auth package doesn't export gitlabAuthPlugin.
Affected: test/core/tasks.test.ts — crashes with SyntaxError: Export named 'gitlabAuthPlugin' not found
Bug 3 (not our code): Bun v1.3.6 segfault
Bun crashes with segfault after test completion. Runtime bug, may be fixed by upstream's Bun 1.3.8 upgrade.
Quality Gates (Non-Negotiable)
Acceptance Criteria
- Null byte path bug identified and fixed at source
- gitlab plugin export resolved (fix import or exclude test)
- Test suite runs green in
packages/opencode
Problem
The test suite in
packages/opencodehas 58 test failures across 4 test files. Typecheck and build are green — only tests are broken.Root Causes
Bug 1: Null byte in config path (57 failures)
Test setup creates a config directory path ending with
\u0000(null byte), producing:Affected files:
test/permission-task.test.ts(6 failures)test/snapshot/snapshot.test.ts(~40 failures)test/skill/skill.test.ts(10 failures)test/config/agent-color.test.ts(1 failure)Bug 2: Missing gitlabAuthPlugin export (1 failure)
@gitlab/opencode-gitlab-authpackage doesn't exportgitlabAuthPlugin.Affected:
test/core/tasks.test.ts— crashes withSyntaxError: Export named 'gitlabAuthPlugin' not foundBug 3 (not our code): Bun v1.3.6 segfault
Bun crashes with segfault after test completion. Runtime bug, may be fixed by upstream's Bun 1.3.8 upgrade.
Quality Gates (Non-Negotiable)
bun run typecheck)bun run buildin packages/opencode)Acceptance Criteria
packages/opencode