Skip to content

1.2: Resolve remaining test failures #6

@Acharnite

Description

@Acharnite

Remaining test failures after upstream merge

These tests fail on the 1.2 branch and need resolution before the next release.

1. Sidebar UX tests (~46 failures) — HIGH priority

Files: browse/test/sidebar-ux.test.ts, browse/test/sidebar-tabs.test.ts, browse/test/sidebar-security.test.ts

Root cause: Upstream (v1.38.0–v1.39.0) intentionally ripped the chat queue, sidebar-agent.ts, and pickSidebarModel router, replacing the interactive chat sidebar with a Terminal-pane PTY via xterm.js. The tests still check for the old architecture (chat queue, agentStatus, stop button, pickSidebarModel function with ANALYSIS_WORDS/ACTION_PATTERNS, /sidebar-chat endpoint, etc.).

Resolution: Rewrite sidebar-ux tests to match the new Terminal-pane architecture, or remove stale tests and add new ones covering the PTY surface (sidepanel-terminal.js, terminal-agent.ts).

2. Handoff integration tests (3 failures) — MEDIUM priority

File: browse/test/handoff.test.ts

Root cause: Tests require a headed browser (X server). They fail with "Missing X server or $DISPLAY" in headless CI/terminal environments.

Resolution: Either:

  • Mark these tests as --skip when DISPLAY is unset
  • Or run them under xvfb-run in CI

3. gstack-config explain_level (2 failures) — LOW priority

File: test/explain-level-config.test.ts

Root cause: Test-interference — both tests ("get with unset explain_level returns empty" and "config header documents explain_level") pass when run in isolation (bun test test/explain-level-config.test.ts) but fail in the full suite due to state leaking between tests.

Resolution: Add beforeEach / afterEach cleanup to isolate config state per test.

4. gstack-relink (1 failure) — LOW priority

File: test/relink.test.ts

Root cause: Same test-interference issue as explain_level — passes in isolation, fails in full suite.

Resolution: Add proper test isolation (temp directory per test).

5. document-generate/SKILL.md — NOTE

This file gets regenerated by bun run gen:skill-docs and is tracked in git. The diff includes opencode-first detection (checking .opencode/skills/gstack before .claude/skills/gstack). This is expected — its the fork's vendored detection behavior. Keep it in sync by running bun run gen:skill-docs before committing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions