Repository navigation
Description
Bug
bin/sync-models.mjs — the "existing model" update branches judge drift by limit.context only, so two kinds of drift are never reconciled and the sync reports the config up-to-date while it stays wrong:
bin/sync-models.mjs:543(antigravity-agy / antigravity-ls):if (prov.models[baseId].limit?.context !== limits.context)— the wholelimitobject is replaced only whencontextdiffers. Ifcontextalready matches, a wrong or stalelimit.output(the sync's own desired values come fromdefaultLimits,bin/sync-models.mjs:488-492: claude 64000, gpt-oss 16384, otherwise 65536) is kept forever.bin/sync-models.mjs:538: variants are written only when the existing entry has none (&& !prov.models[baseId].variants). If a model's effort set changes upstream (an effort dropped or added), an existingvariantsmap is never updated: stale efforts stay offered and new efforts never appear.bin/sync-models.mjs:583(openai-codex): the same shape —if (codexProv.models[m.slug].limit?.context !== 1000000)— so a codex entry with the right context but any otheroutputthan the sync's 128000 is never corrected.
Because no edit is recorded for these cases, the run's summary counts no update, and a later run sees the same state and again does nothing: the sync does not converge.
Evidence (verified this run)
Laptop probe ~/git/fleet/probe-2026-10-28-laneB-syncmodels/probe.mjs (node v24; source bin/sync-models.mjs sha256 5e21fe06… on the laptop, identical to sandbox main e91098f1; all three condition strings asserted present verbatim, then the two branches copied verbatim and run over fixtures):
A control context-drift: changed=true limit={"context":1048576,"output":65536}
B agy output-drift: changed=false limit={"context":1048576,"output":9999} (desired output 65536)
C agy variants-drift: changed=false variants=["low"] (desired high,medium)
D codex output-drift: changed=false limit={"context":1000000,"output":1} (desired output 128000)
E control codex context-drift: changed=true limit={"context":1000000,"output":128000}
BUG CONFIRMED: output-limit and variants drift are never reconciled when context matches
Controls A/E show the branches do fire when context differs (and fix output only as a side effect of replacing the whole object); B/C/D show that with context already correct, nothing ever fires.
Why it matters
sync-models is the tool that keeps the opencode config's model entries honest against the live catalogs. An entry whose output limit was set wrong — by a hand edit, an older sync with different defaults, or a changed defaultLimits — is silently permanent, and the operator is told "All providers are already up-to-date". The same holds for the reasoning-effort variants a model is offered with: once written, they are frozen at whatever the first sync saw.
Acceptance criteria
- The agy/ls update branch reconciles the full desired state: if the existing
limitdiffers fromdefaultLimits(id)incontextoroutput, the limit is replaced (one edit, counted as an update); if the existingvariantsdiffer from the variants built from the current effort set, they are replaced the same way. - The codex update branch likewise fires when
outputdiffers from 128000, not only whencontextdiffers from 1000000. - Regression tests in
bin/sync-models.test.mjs(verbatim-extraction style, as forparseJsonc): output-only drift is corrected, variants drift is corrected, and an already-correct entry records no edit. - A genuinely up-to-date entry still produces no edits and no count changes (no write churn on every run).
Found by new-issue-creator-code-b. Dedup: gh issue list --search 'sync-models' (open + closed) on 2026-10-28 shows only #704 (parseJsonc), #591 (Nix store path), #1754 (provider-catalog-sync, a different script) and unrelated mentions — nothing on limit/variants reconciliation.
Activity
developing-today commentedon Oct 28, 2026
CODE-738
dezren39 commentedon Oct 28, 2026
🤖 Agent note · filed
e91098f1that bin/sync-models.mjs's existing-entry branches (agy/ls :538/:543, codex :583) judge drift by limit.context only: a wrong limit.output and a stale variants map record no edit and are never reconciled. Laptop probe (source sha256 5e21fe06… = main; three condition strings asserted verbatim; branches copied verbatim over fixtures): controls with context drift changed=true; output-only drift changed=false (output stayed 9999 vs desired 65536; codex stayed 1 vs 128000); variants drift changed=false (stale [low] kept vs desired high,medium).queue-packets/packet-1799.json(repo-health-code-pilot, triage); probe~/git/fleet/probe-2026-10-28-laneB-syncmodels/(laptop)dezren39 commentedon Nov 1, 2026
agent-note:v1 — holder: repo-worker-code (OpenChamber scheduled lane), since 2026-11-01. Picked up queue task 2674 to revalidate the reported sync-models drift on current main before routing or closing with evidence.
28 remaining items
dezren39 commentedon Nov 14, 2026
Released to the queue under Drew's 2026-11-13 unblock-all order (main chat, 23:53 CT). Task(s) 15169 moved from blocked/parked to queued in the fleet unblock-all pass (worker
main-unblock-all-2026-11-13). Dependency gates still recorded on a task remain recorded — the dependency checker will re-block it if a gate is genuinely unmet.Merge pull request #9917 from developing-today/queue/15169-1799-sync-…
dezren39 commentedon Nov 14, 2026
🤖 Agent note · done
Outcome — fixed and merged
bin/sync-models.mjs— variants written only when the entry had none, andlimitreplaced only whencontextdiffered.planModelReconciliationreconciles the full desired state —limitreplaced whencontextoroutputdiffers (or is missing),variantsreplaced when they differ from the current effort set — with order-insensitive comparison so a converged entry records no edits (no write churn). Issue sync-models: existing entries are never reconciled when limit.context already matches — a wrong limit.output and stale variants survive every sync #1799 closed by the merge.node --test bin/sync-models.test.mjson the laptop worktree — 46 pass, 0 fail (39 existing + 7 new regression tests covering output-only drift, variants drift, context drift / missing limit, variants addition, both-drift, no-op for a correct entry in either key order, and no stripping on an empty desired variants set). CodeRabbit check passed; no Codex findings were posted on PR fix(sync-models): reconcile limit.output and variants drift on existing entries (#1799) #9917.dezren39 commentedon Nov 14, 2026
🤖 Agent note · already done — revival duplicate
status:done. Task 15169 (lane code-a, today) fixed it in the same claim: PR fix(sync-models): reconcile limit.output and variants drift on existing entries (#1799) #9917 MERGED (merge commit 5319133) —planModelReconciliationinbin/sync-models.mjsnow reconciles existing entries instead of skipping them whenlimit.contextalready matches. This revival predates/duplicates that completion.