Skip to content

fix(rules): gaps/keywords and gaps/content can never run, even when enabled as documented #1067

Closed

Description

@nc9

The docs say the two gap-analysis cloud rules are opt-in and can be turned on with [rules] enable = ["gaps/keywords", "gaps/content"] (docs/cloud/rules.mdx, docs/rules/gaps/index.mdx). In the code they can never run:

  • Both rules set meta.disabled: true (packages/rules/src/gaps/keywords.ts, packages/rules/src/gaps/content.ts), with a comment saying they stay off "until the user explicitly enables it".
  • loadAllRules() skips every rule with meta.disabled before any enable or disable pattern is read (packages/rules/src/loader.ts).
  • The runner (packages/rules/src/runner.ts) and both selectCloudRules() copies (apps/cli/src/audit/cloud.ts, packages/audit-engine/src/cloud-prefetch-run.ts) build on loadAllRules(), so an enable list, --rule-include gaps or [rule_options."gaps/keywords"] enabled = true cannot bring the rules back.

So a user who follows the docs gets no gap results and no error. loadKnownRules() does include them, which is why their [rule_options] validate.

Found while upgrading the gaps docs hub (squirrelscan/repo#3145); a codex trace confirmed the path.

Acceptance Criteria

  • With [rules] enable = ["gaps/keywords", "gaps/content"] and a signed-in audit, both rules run and the cloud keyword-gaps and content-gaps services are selected (or the docs say plainly that the rules are unavailable and the enable example is removed)
  • With the default config, neither rule runs and no gap credits are spent
  • --rule-include gaps either runs both rules or the docs stop presenting it as a way to run them
  • A test covers the opt-in path, so meta.disabled cannot silently swallow an explicit enable again

Activity

  1. added
    bug
    size: S
    rules
    on Oct 23, 2026
  2. WilliamK112 commented on Oct 24, 2026

    @WilliamK112
    Contributor

    I would like to take this. I will make an explicit rules.enable/--rule-include opt-in able to select the two disabled gap rules while preserving their default-off behavior, cover the loader and cloud-selection paths with focused tests, and keep the documented configuration contract in sync.

  3. nc9 commented on Oct 26, 2026

    @nc9
    ContributorAuthor

    Fixed in #1117 (main 06b9a3b): gaps/keywords and gaps/content now run when selected explicitly (gaps/*, --rule-include gaps, or enabled = true in rule_options). Ships in v0.0.134.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugrulessize: S

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions