Repository navigation
fix(opencodego): honor app source configuration and show actual source - #4616
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs real behavior proof before merge. What this changesThis PR makes the macOS app honor OpenCode Go’s saved source selection and display the configured or last successful source. Example: OpenCode Go has source=api, a valid API key, and manual cookie value Cookie: invalid.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain Keep this PR open: it addresses a source-routing defect still present on main with a small, focused change; no introduced correctness defect was found. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe app’s provider implementation supplies the saved source to the shared provider registry, which constructs fetch contexts and selects API, web, or local strategies; successful results supply the displayed source label. flowchart LR
A[Saved provider configuration] --> B[App provider implementation]
B --> C[Provider registry]
C --> D[Shared fetch pipeline]
D --> E[API web or local strategy]
E --> F[Usage store]
F --> G[Settings source label]
Technical reviewBest possible solution: Use the existing source-resolution and source-label owners, preserving Auto ordering and selected-account credential isolation. Do we have a high-confidence way to reproduce the issue? The current-main source establishes the reported path: saved api is ignored, manual cookies select web first, and invalid manual credentials stop fallback; no runtime reproduction was performed. Is this the best way to solve the issue? The patch is the smallest complete source-level repair: it supplies the existing saved mode to the shared resolver and reuses the existing label owner without duplicating routing or credential logic. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6480977b47f6. Provenance checked
TestingProof path: none. SecurityNone. EvidenceWhat I checked:
Likely related people:
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 18, 2026, 9:14 AM ET / 13:14 UTC. |
Refs steipete#4616. Co-authored-by: Arietids <69024461+ArietidsZ@users.noreply.github.com>
# Conflicts: # CHANGELOG.md
|
Merged in 0373cd6, thanks @ArietidsZ! OpenCode Go now follows the source you configure in the app, even with a manual cookie saved, and shows which source actually answered. We kept your routing fix and reused the shared workspace and cookie accessors. It will ship in the next release. |
Summary
sourceselection when constructing macOS app fetch contexts. Previously,OpenCodeGoProviderImplementationinherited the default.automode, so a configuredsource=apicould still try an invalid manual Cookie first.webprovider header with the configured source before a successful fetch, or the actual source label of the last successful fetch.auto,api, andwebrouting throughProviderRegistryandProviderSpec.makeFetchContext(), plus header-label coverage.Reproduction
source=api(for example,codexbar config set-source --provider opencodego --source api), and select Manual Cookie with an invalid cookie.codexbar usage --provider opencodego --source apisucceeds, but the macOS app still follows Auto routing and reportsOpenCode Go cookie header is invalid.webregardless of the configured or successful source.After this change, an explicitly configured
apisource selects onlyopencodego.api. Explicitweband existing Auto precedence are retained. The header shows the selected/fetched source rather than a fixedweb.Validation
swiftc -frontend -parseon the modified implementation and new test file: passed with Swift 6.2.1 (Linux).git diff --checkon the prepared patch: passed.make checkwere not run here because the available local test runtime is Linux. Suggested macOS check:./Scripts/test_fast.sh --filter OpenCodeGoAppSourceTests, thenmake check.Scope
One app implementation file and one test file. No changes to remote usage parsing, Cookie normalization, token storage, or Auto source strategy ordering.