Skip to content

OpenCode 2: keep the serving account's scoped windows and credits fresh - #866

Merged
ualtinok merged 1 commit into
mainfrom
fix/864-poll-fields
Nov 22, 2026
Merged

ualtinok merged 1 commit into
mainfrom
fix/864-poll-fields

Conversation

@antauth-alfonso

@antauth-alfonso antauth-alfonso Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Refs #864. Vault sweeps apply Insula's cached reading every tick (no extra Insula refresh or /usage call); local sweeps are due on the poll-only clock; header merges keep the poll's top-level checkedAt. Routing freshness still reads per-window clocks (regression: zero /usage on a header-fed serving account). Packed 2.16.4 and 2.2.7 accept the stored shapes.


Summary by cubic

Fixes #864: the serving account's model-scoped weekly windows and credits now refresh from Insula (vault) or the regular poll (local) while response headers keep arriving, so the sidebar no longer shows a growing "checked … ago" for it.

Key changes

  • Header merges retain the poll's clock instead of letting response headers advance the top-level checkedAt.
  • Vault sweeps apply a cached Insula reading each tick without an extra Insula refresh or /usage call.
  • The newest poll owns the complete scoped windows and credits list; older polls and late headers can't restore removed fields.
  • Routing freshness still reads per-window clocks, so a header-fed account doesn't trigger a usage GET.
  • Compatibility guards verify packed 2.16.4 and 2.2.7 accept the stored shapes.

Written for commit 19f1741. Summary will update on new commits.

View guided diff Turn on auto-fix

@ualtinok
ualtinok force-pushed the fix/864-poll-fields branch from 23037c2 to 19f1741 Compare November 22, 2026 10:51
@antauth-alfonso

Copy link
Copy Markdown
Author

Merged to main as 19f1741.

@ualtinok
ualtinok merged commit 19f1741 into main Nov 22, 2026
17 checks passed
@ualtinok
ualtinok deleted the fix/864-poll-fields branch November 22, 2026 10:57
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 2 vault: the serving account's poll-only quota fields are never refreshed while headers arrive

1 participant