review-provider classify(): missing/corrupt model-hints.json silently disables the non-text-model exclude filter #43
Labels
No labels
already-shipped
bug
documentation
duplicate
enhancement
good first issue
help wanted
in progress
invalid
needs-decision
proposal
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: crenshawdev/cadence#43
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: medium · Area: review · surfaced in the post-v1.2.0 cross-model review sweep.
What happens
classify()tags each detected provider model with a tier and filters out non-text models (embeddings, audio, image) that cannot do text review, using the shippedreferences/model-hints.json. If that file is missing or malformed, the load is swallowed and defaults torules=[],exclude=[]— byte-indistinguishable from a valid hints file that legitimately has no rules for the provider. Two silent degradations result:tier:null(all "unknown").excludefilter that keeps non-text modalities out is off, so embedding/audio/image model IDs pass through as review candidates and can be assigned to a review tier in/cad-config— failing only later, at call time, with a confusing error.Nothing in the
{ok:true, models:[...]}output signals the hints file failed to load, so the operator cannot tell "hints broken" from "provider has no known models."Mechanism (verified against source)
cadence-core/bin/review-provider.mjs:519-524:The catch turns a load failure into the same empty state as a present-but-ruleless file, and the empty
excludedisables the non-text filter at:524.Fix direction
Distinguish "hints file present and empty" from "hints file failed to load." On a genuine load/parse failure of the shipped file, surface it (a warning, or a flag on the result) rather than silently emptying both
rulesandexclude. Same benign-default-on-parse-error pattern as #39.