fix(ci): repair the weekly model-limits drift check and refresh model data - #136
Merged
Merged
Conversation
… data The scheduled `model limits · drift vs Cursor docs` job failed on every run. cursor.com answers 404 to the script's `accept: text/plain,text/markdown,*/*` header and 200 to default fetch headers, so the check exited 2 before reading any data. Drop the custom header. With the fetch working, the generator also needed updating: - the pricing doc now has two tables with identical columns (Cursor Models pool, then Other Models); read every matching table, and still report a row present in both as ambiguous - MODEL_IDS now matches the live 40-id catalog (adds claude-fable-5-1, claude-opus-5-5, claude-sonnet-5-5, gemini-3.7-flash, gemini-3.8-flash, grok-4.6, grok-4.7, muse-spark-1.3; drops glm-5.2) - grok-4.5 and composer-2.5 now have docs price rows, so their $0 pool overrides are removed; auto-smart/default/composer-2 keep $0 as placeholder rates with corrected reasons - the NO_AUTO_COMPACTION_INPUT_LIMIT block, hand-inserted into the generated file in 27d11bb, moves into the generator template so a regen keeps it Also add a root vitest.config.ts excluding `.cursor/**`: the plugin mirrors skills into <cwd>/.cursor/skills/, and default discovery then collects their test files (94 load failures when running `npm test` in a dogfooded checkout). Tests: add a two-table generate test; drop two tests that only echoed generated cost numbers and assert the invariant instead.
justin-carper
force-pushed
the
chore/repair-model-drift
branch
from
September 30, 2026 11:51
b466a22 to
6565d6d
Compare
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 scheduled
model limits · drift vs Cursor docsjob has failed on every weekly run (latest: 2026-09-28). This fixes the job and brings the model data it guards back in line with Cursor's docs.Root cause
scripts/sync-model-limits.mjsfetchDocsentaccept: text/plain,text/markdown,*/*. cursor.com returns 404 for that header and 200 with default fetch headers, so--checkexited 2 (HTTP 404) before reading any data. Dropping the header is the one-line fix; the rest of this PR is what the check then surfaced.Changes
MODEL_IDSnow matches the live 40-id catalog. Added:claude-fable-5-1,claude-opus-5-5,claude-sonnet-5-5,gemini-3.7-flash,gemini-3.8-flash,grok-4.6,grok-4.7,muse-spark-1.3. Dropped:glm-5.2(absent from the live catalog).grok-4.5andcomposer-2.5$0 "pool" overrides are removed: the docs now list price rows for both.auto-smart,defaultandcomposer-2keep $0 as placeholder rates, with correctedwhystrings.NO_AUTO_COMPACTION_INPUT_LIMITblock was hand-inserted into the generatedsrc/model-limits.tsin 27d11bb without updating the template, so a regen would have deleted it. It now lives in the template.src/model-limits.ts: regenerated withnpm run sync:model-limits, not hand-edited.claude-sonnet-5$3/$15 → $2/$10,gpt-5.6-sol$5/$30 → $4/$20,grok-4.5$0 → $2/$6,composer-2.5$0 → $0.5/$2.5. No context window changed.vitest.config.ts(new): excludes.cursor/**. The plugin mirrors skills into<cwd>/.cursor/skills/, and default discovery then collects their test files (94 load failures when runningnpm testin a dogfooded checkout).generatetest that fails if the parser goes back to first-table-only; removed two tests that only echoed generated cost numbers and assert the invariant instead.Verification
npm run sync:model-limits -- --check: exit 0, printsup to date (context: 36 from docs, 4 overridden | cost: 36 from docs, 4 overridden | 40 model ids), which is the lineci.ymlgreps fornpm run typecheck,npm run build: passnpm testwith no--excludeflags: 42 files / 642 tests passworkflow_dispatch(run 36711158492, re-run on the rebased head 6565d6d):model limits · drift vs Cursor docssuccess (it had failed on every scheduled run before this)Independent of #132 (different files apart from
CHANGELOG.md[Unreleased]; whichever merges second needs a trivial rebase).