Skip to content

axisOf() silently scores unknown rule ids as Soul #110

Open

Description

@CodeDeficient

axisOf() in ai-slop-detector.ts falls back to 'soul' (FRESH_PACKAGE_AXIS) for any rule id that is neither in RULES nor a custom pattern. That's right for fresh_package_version, the only such id today. But a future rule emitted by analyzeSource or checkImports without a RULES entry would be scored as Soul without any warning.

Fix: map fresh_package_version explicitly and throw (or fail a test) for an unknown id. Alternatively, add a test that runs every rule the code can emit and checks that each one has an axis.

Found by /review of #108 (P3).

Activity

  1. coderabbitai commented on Oct 26, 2026

    @coderabbitai
    🔗 Related PRs

    #34 - Rebuild KarpeSlop's rules on the AST and real import resolution [merged]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions