Repository navigation
fix(extension): pre-flight bug-report arm — fail actionably on stale server (#296) - #299
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tsserverHasCommand(server, name): GET/command, verify the skill is in the responseopen()beforecreateSession()— on absence, shows an actionable error and returns without creating a sessiontrue(falls through to the existing arm-failure path)packages/extension/test/bug_report.test.tsmockFetchto includeGET /commandroute by default (all existing tests needed it)fetchImplin the concurrent test and auth test to handle/commandCompanion PR
Testing
27/27 tests pass.
Closes #296