Skip to content

fix(extension): pre-flight bug-report arm — fail actionably on stale server (#296) - #299

Merged
jeonghun-jj-lee merged 1 commit into
mainfrom
fix/296-bug-dock-preflight
Aug 9, 2026
Merged

jeonghun-jj-lee merged 1 commit into
mainfrom
fix/296-bug-dock-preflight

Conversation

@jeonghun-jj-lee

Copy link
Copy Markdown
Contributor

Summary

Fixes the bug dock wedge when the server can't arm report-a-bug (staged-skill drift on launchd canonical servers). This is Layer 1 (extension-side pre-flight).

Changes

packages/extension/src/bug_report.ts

  • New private method serverHasCommand(server, name): GET /command, verify the skill is in the response
  • Called in open() before createSession() — on absence, shows an actionable error and returns without creating a session
  • Fail-open: a network error or non-200 response returns true (falls through to the existing arm-failure path)

packages/extension/test/bug_report.test.ts

  • Updated mockFetch to include GET /command route by default (all existing tests needed it)
  • Fixed custom fetchImpl in the concurrent test and auth test to handle /command
  • 2 new tests:
    • Pre-flight blocks when skill is absent (no session created, actionable error shown)
    • Fail-open: network error on probe does NOT block the button

Companion PR

  • harmoniqs/opencode#TBD — Layer 2 (app-side liveness effect: auto-dismiss when session vanishes)

Testing

27/27 tests pass.

Closes #296

…server (#296)

The bug dock's 'Report Bug' button wedged the composer when the server
lacked the report-a-bug skill (staged-skill drift on launchd canonical
servers). The arm step POSTs against the SERVER's command set, which can
diverge from the extension's own skill paths.

Fix: before creating the bug session, GET /command and verify
report-a-bug is in the response. On absence, show an actionable error:
'the opencode server's staged skills are stale (missing report-a-bug).
Restart or re-stage the server.' No session is created, no orphan.

Fail-open: a network error on the probe returns true and falls through
to the existing arm-failure path — never blocks the happy path.

Tests: 2 new tests (pre-flight blocks, fail-open passes through);
existing 25 tests updated to include GET /command in mocks. 27/27 pass.
@jeonghun-jj-lee
jeonghun-jj-lee merged commit d0737e6 into main Aug 9, 2026
6 checks passed
@jeonghun-jj-lee
jeonghun-jj-lee deleted the fix/296-bug-dock-preflight branch August 9, 2026 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug dock: composer wedges when the server can't arm report-a-bug (staged-skill drift)

1 participant