Repository navigation
fix(docs): Auto-Combo factor count is read from DEFAULT_WEIGHTS - #11545
Merged
diegosouzapw merged 1 commit intoAug 25, 2026
Merged
diegosouzapw merged 1 commit into
diegosouzapw merged 1 commit into
Conversation
The engine was documented as 6-, 9-, 13- and 14-factor in seventeen places while `DEFAULT_WEIGHTS` declares fifteen factors. Two of the fifteen sit at weight 0 by default, which is where some of the lower counts came from, but they are computed for every candidate and `cacheAffinity` gates prompt-cache deduplication outside the score — they are declared factors that do not vote by default, and `AUTO-COMBO.md` now says so. `check:docs-counts` grows a strict check that reads the count from `scoring.ts` and validates every `N-factor` claim in the README, `AGENTS.md`, the guides, the diagrams and the code comments. Adding a factor without updating the prose now fails. `CHANGELOG.md` is deliberately out of scope: its old entries record what was true when they were written. The gate fails on the pre-change tree and passes after, and the counting helper is covered for zero-weight factors, comment noise and unreadable sources.
diegosouzapw
merged commit Aug 25, 2026
a63b3e2
into
cheaper-inference:release/v3.8.51
10 of 16 checks passed
4 of 5 tasks
This was referenced Aug 25, 2026
Merged
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…per-inference#11545) Validated in a combined 3-PR batch worktree off release/v3.8.51 tip. The prerequisite sibling (159→160 migrations) was already covered by cheaper-inference#11502 — closed the redundant cheaper-inference#11543 separately. - New check:docs-counts gate: proven fail-before/pass-after per the PR's own methodology, re-verified here (PASS, 2 unrelated soft-drift notices on cloud-agent/A2A doc counts, non-blocking) - Focused tests: check-docs-counts-sync.test.ts, combo-matrix/auto.test.ts, lkgp-enabled-context-11181.test.ts — pass - typecheck:core, file-size, changelog-integrity, complexity, cognitive-complexity — all OK Thanks for replacing seventeen hand-maintained factor-count claims with one source-derived gate.
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
DEFAULT_WEIGHTSdeclares fifteen factors. Two of the fifteen sit at weight 0 by default, which is where some lower counts came from, but they are computed for every candidate, andcacheAffinitygates prompt-cache deduplication outside the score — they are declared factors that do not vote by default, andAUTO-COMBO.mdnow says exactly that.check:docs-countsgrows a strict check that reads the count fromscoring.tsand validates everyN-factorclaim across README, AGENTS.md, guides, diagrams and code comments. Adding a factor without updating the prose now fails CI.CHANGELOG.mdis deliberately out of scope: old entries record what was true when they were written.routerStrategy.tsstops hard-coding an enumerable count ("15-factor weighted scoring (see DEFAULT_WEIGHTS)") so there is one fewer derived number to keep in sync.Related Issues
Validation
check:docs-countsfails on the pre-change tree and passes after (verified in that order, otherwise the gate proves nothing); counting-helper unit tests passnpm run lintLocal caveat: my machine's node_modules is broken (
es-abstractincomplete) and a borrowed install carries a newereslint-plugin-react-hooksthan this branch's lockfile pins, which produces results that do not match CI. The only file my scoped run flagged isfree-provider-rankings/page.tsx, untouched by this PR. CI is authoritative.tests/unit/check-docs-counts-sync.test.ts; code-comment strings are covered by the same gate)Tests Added Or Updated
tests/unit/check-docs-counts-sync.test.ts— counting helper handles zero-weight factors, comment noise and unreadable sources; drift detection proven.lkgp-enabled-context-11181.test.tsandcombo-matrix/auto.test.tsupdated only where they quoted a stale factor count in a string.Coverage Notes
scripts/check/check-docs-counts-sync.mjs(build tooling) and is covered by the unit test above; runtime routing code changed only in doc-facing strings.Reviewer Notes
docs/migrations-count-160— merging that one first keeps this PR's CI green.