Skip to content

Fix OpenCode readiness during plugin activation - #771

Merged
sox8502 merged 3 commits into
mainfrom
daniel/issue-748-repro
Oct 26, 2026
Merged

sox8502 merged 3 commits into
mainfrom
daniel/issue-748-repro

Conversation

@sox8502

@sox8502 sox8502 commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

OpenCode can report healthy while plugins are still activating, then return a temporary catalog 503. Retry only the structured plugin-activation error within discovery’s existing 30-second deadline, preserving V1, legacy V2 activation, empty-catalog polling, and the last complete catalog. Other failures remain immediate with a bounded diagnostic.

Settings keeps the settled harness selected after a failed refresh, so the timeout stays visible. Shared test fixtures cover startup, retry, deadline, and fallback behavior without duplicate setup.

Closes #748.

Verification:

  • Focused discovery regressions on both catalog routes, one legacy activation, additive error fields, immediate unrelated errors, malformed catalogs, stalled requests, and complete-pair fallback.
  • Query-consumer tests, including provisional startup selection and selection retention after readiness changes.
  • UI build and in-app browser recheck: OpenCode stays selected with the 30-second timeout visible.
  • Actual OpenCode 1.18.29 and 2.1.0 through the in-app browser; actual 2.0.4 discovery through the app API.
  • Ubuntu 22.04 checks by Devin on the original backend fix with OpenCode 2.1.2/2.1.3: 18 API cases and repeated UI checks.
  • Four Opus reviewers rechecked the simplified full candidate with no blockers.
  • Formatting, clippy, locked build, and full locked tests: 1,282 unit tests and 19 CLI integration tests passed (three existing ignored tests). All 433 UI tests, typecheck, localization/style checks, and UI build passed. One existing deletion-lock test failed on the first full run, then passed alone and in the full rerun.
  • Greptile review of a1fe974b: 5/5 confidence, no actionable findings.
  • Reporter verification with the original 11-plugin configuration.

@sox8502

sox8502 commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review

@greptile-apps

greptile-apps Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

OpenCode discovery now retries structured plugin-activation errors within its existing 30-second deadline.

  • OpenCode discovery waits through plugin activation before loading its catalogs.
  • Settings keeps its default harness when readiness changes the list order.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Start V2 discovery] --> B{Legacy V2?}
  B -->|Yes| C[Await activation once]
  B -->|No| D[Read both catalogs]
  C --> D
  D --> E{Structured plugin error?}
  E -->|Yes| F[Wait 200 ms]
  F --> D
  E -->|No| G{Complete valid pair?}
  G -->|No| H[Return error]
  G -->|Yes| I[Save complete pair]
  I --> J{Legacy or models present?}
  J -->|Yes| K[Return catalogs]
  J -->|No| F
  A -. 30-second deadline .-> L[Return saved pair or timeout error]
Loading

Reviews (2) · Last reviewed commit: "Keep failed OpenCode checks visible and ..." · Reviewed by Greptile

@sox8502

sox8502 commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review

@sox8502
sox8502 merged commit 41db8ef into main Oct 26, 2026
15 checks passed
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.

OpenCode harness: the single GET /api/model probe gets 503 "Location plugins did not finish activating" and is not retried

1 participant