Skip to content

drift --ci exits 0 with violations at the default threshold #411

Closed

Description

@stackbilt-admin

Problem

At the default drift.minScore of 0.7, charter drift --ci exits 0 while reporting a violation of a blessed pattern. The docs say "If any step exits 1, the check fails", and the template's name suggests a gate, so a repository can believe forbidden patterns are blocked when they are only scored.

Reproduction (CLI 2.1.0)

With a customized pattern Avoid /LLMProviders\.fromEnv/ and a file using it:

[ok] Drift Score: 90% (threshold: 70%)
Violations (1):
  Pattern: Explicit Inference Clients

Exit 0. Setting "drift": { "minScore": 1 } gives exit 1.

Only security-deny.json patterns block regardless of score.

Expected

Not necessarily a default change, since a score threshold suits gradual adoption. But at least one of:

  • Say in drift output or the CI docs that blessed-pattern violations don't fail below the threshold.
  • Offer a blocking status per pattern, like the security denies.

Scope

Measured on 2.1.0. Reading drift.js, the exit decision is report.score < minScore || hasSecurityBlocker.

Activity

  1. added
    enhancement
    priority:p2
    on Oct 31, 2026
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

    enhancementpriority:p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions