Walkthrough
The adapter now passes the configured server password to connection setup and uses the returned password when creating the SDK client. A live test checks authenticated requests for external and managed OpenCode servers.
Changes: OpenCode server authentication
Layer / File(s) Summary Server password flow
packages/provider-opencode/src/server/adapter.ts,packages/provider-opencode/src/server/adapter.test.tsopenSessionpasses the configured password to connection setup and uses the connection-provided password for SDK client creation. The live test checks authenticated health, session, and event requests for external and managed servers. It also checks that managed startup occurs only for the managed server.Priority: External image Normal
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix
Suggested labels:
bugfix,size:M,macroscope-reviewSuggested reviewers:
juliusmarminge
Merge Risk: External image Low · up to 17a2f
Explicit managed passwords work, but the new test would not catch a regression in their forwarding. Add the case or accept the coverage gap before merging.
Pre-merge checks: Passed 3 · Failed 1
Failed Failed checks: 1 warning
Check name Status Explanation Resolution Description check Warning The description follows the template's main sections: Problem, Change, and Verification. Problem and Change are specific. Verification lists focused tests (both regression cases failing with HTTP 401 … Add a 'Scope and approval' section. Link the triaged bug issue or the maintainer-approved discussion, including the approval comment. If the change qualifies as a very small, focused fix of an obvious bug, explain why it qualifies without a… Passed Passed checks: 3 passed
Check name Status Explanation Title check Passed The title "fix(opencode): authenticate with the resolved server password" names the main change: OpenCode session startup now authenticates with the password the connection resolves. The raw summary c… Linked Issues check Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request. Full details: Title check
Explanation
The title "fix(opencode): authenticate with the resolved server password" names the main change: OpenCode session startup now authenticates with the password the connection resolves. The raw summary confirms openSession now forwards settings.serverPassword and uses connection.serverPassword for the SDK client. The title is specific and conventional, and it matches the PR objectives.
Full details: Description check
Explanation
The description follows the template's main sections: Problem, Change, and Verification. Problem and Change are specific. Verification lists focused tests (both regression cases failing with HTTP 401 on main and passing after the fix, 37 focused adapter/environment tests, and a runtime check with OpenCode 1.19.4), and it states what was not verified. The 'Scope and approval' section is missing. It does not link a triaged issue or maintainer-approved discussion. It only mentions that the change replaces
#23384. The template requires this section for a bug fix, and the description does not explain why the fix qualifies without prior approval.Resolution
Add a 'Scope and approval' section. Link the triaged bug issue or the maintainer-approved discussion, including the approval comment. If the change qualifies as a very small, focused fix of an obvious bug, explain why it qualifies without a prior issue or discussion. The PR also notes that Macroscope requires human approval for this authentication change, so that approval should be linked or obtained first.
Finishing Touches
📝 Generate docstrings
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
- Commit to this branch
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.