You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cli: config validate passes rule options no rule can use, and a wrong type fails the whole audit #510
[rule_options] mistakes are invisible until an audit runs, and then they either do nothing or stop the whole audit:
squirrel config validate prints Config valid for an unknown rule id ([rule_options."performance/ttfb"]), an unknown option name, and a value of the wrong type (min_length = "thirty" on core/meta-title). Rule ids are looked up exactly (packages/rules/src/runner.ts, getRuleOptions) and each rule's zod optionsSchema drops keys it does not know, so the first two silently change nothing.
The wrong type then fails the entire audit, not the one rule: squirrel audit exits 1 with ✗ Audit failed: and a raw zod issue list ("path": ["min_length"], Invalid input: expected number, received string) that does not name the rule or the config table.
squirrel config validate reports a [rule_options] table whose rule id matches no loaded rule, naming the table
squirrel config validate reports an option key the rule's optionsSchema does not declare, and a value of the wrong type, naming the rule and the key
A wrong-typed rule option during squirrel audit names the rule and the key in its error (or skips that rule with a visible check) instead of a bare zod issue list
squirrel config validate prints Config valid: .../squirrel.toml and exits 0. Then squirrel audit http://127.0.0.1:8901/ --http --refresh -m 2 --offline -f json -o out.json against a two-page local fixture finds both URLs in the sitemap and then exits 1:
No report is written, and the message names neither core/meta-title nor [rule_options].
Main is unchanged here. config validate (apps/cli/src/cli/commands/config.ts:133-149) only loads the file through showConfig. getRuleOptions (packages/rules/src/runner.ts:189-195) still calls rule.meta.optionsSchema.parse(ruleConfig) with nothing catching the error per rule.
Fixed in # and merged to main. Every acceptance criterion is met per the PR description, with before and after evidence from the CLI on local fixtures, tests that fail on the old code, and review comments triaged. Criteria ticked.
Activity
nc9 commentedon Oct 11, 2026
Checked against 0.0.108 and current main (ad95fb2): REPRODUCES.
With a scratch HOME and this
squirrel.toml:squirrel config validateprintsConfig valid: .../squirrel.tomland exits 0. Thensquirrel audit http://127.0.0.1:8901/ --http --refresh -m 2 --offline -f json -o out.jsonagainst a two-page local fixture finds both URLs in the sitemap and then exits 1:No report is written, and the message names neither
core/meta-titlenor[rule_options].Main is unchanged here.
config validate(apps/cli/src/cli/commands/config.ts:133-149) only loads the file throughshowConfig.getRuleOptions(packages/rules/src/runner.ts:189-195) still callsrule.meta.optionsSchema.parse(ruleConfig)with nothing catching the error per rule.test(cli): match the site by hostname; pin options schemas exposing s…
docs(changelog): say plainly that config validate now fails on rule o…
test(cli): run the config validate command test in a scratch home #510
docs(changelog): config set writes the --config-file file too #510
fix(cli): check rule options in config validate and before an audit #510
test(cli): match the site by hostname; pin options schemas exposing s…
docs(changelog): say plainly that config validate now fails on rule o…
test(cli): run the config validate command test in a scratch home #510
docs(changelog): config set writes the --config-file file too #510
fix(cli): check rule options in config validate and before an audit #510
nc9 commentedon Oct 12, 2026
Fixed in # and merged to main. Every acceptance criterion is met per the PR description, with before and after evidence from the CLI on local fixtures, tests that fail on the old code, and review comments triaged. Criteria ticked.