Repository navigation
fix(plugin): refresh the served catalog on the configured TTL instead of publishing once at install - #18235
Open
maxmad64bis wants to merge 1 commit into
Conversation
maxmad64bis
force-pushed
the
fix/opencode-plugin-v2-stale-served-catalog
branch
2 times, most recently
from
October 26, 2026 13:18
0ce0b8b to
5c59366
Compare
maxmad64bis
marked this pull request as ready for review
October 26, 2026 13:36
7 tasks done
maxmad64bis
force-pushed
the
fix/opencode-plugin-v2-stale-served-catalog
branch
from
October 27, 2026 13:33
5c59366 to
bbfbf7e
Compare
maxmad64bis
marked this pull request as draft
October 28, 2026 21:42
maxmad64bis
force-pushed
the
fix/opencode-plugin-v2-stale-served-catalog
branch
from
October 28, 2026 21:42
e175594 to
932505d
Compare
… of publishing once at install includes e175594: eviction guard and refresh loop trim
maxmad64bis
force-pushed
the
fix/opencode-plugin-v2-stale-served-catalog
branch
from
October 28, 2026 22:09
932505d to
334fb40
Compare
maxmad64bis
marked this pull request as ready for review
October 29, 2026 18:07
This branch has not been deployed
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
The served catalog stayed frozen on an earlier calculation even though config and gateway had moved, so new branches stayed missing until a service restart. The plugin published the catalog once at install and never refreshed it, so the configured cache TTL had no effect. Now the catalog refreshes in the background on that TTL, and the served catalog follows the gateway without a restart.
Related Issues
Target Branch
release/v3.8.xbranch (the highest openrelease/v*), notmainv4-featurelabel for the v4 channelValidation
npm run lintTests Added Or Updated
@omniroute/opencode-plugin-v2/tests/catalog-freshness.test.ts— background refresh serves new gateway entries, unchanged catalogs skip reload, refreshes never overlap, one loop per provider id, 60 second floor, a failed refresh keeps the last known catalog, and the stale memory entry is dropped on credential change, plus gateway change, snapshot coherence and branch reactivation without a restart.Coverage Notes
N/A — no file under the repository's
src/,open-sse/,electron/, orbin/is changed; the plugin lives under@omniroute/opencode-plugin-v2/.Reviewer Notes
modelCacheTtlMs(five minutes by default), plus one fetch; a failed refresh keeps the last known catalog, and a change that only touches enrichment (names or prices) may not trigger a host reload.