Skip to content

drift_check config path is relative to cwd, so off-root runs silently pass #153

Backlog

Description

@TMHSDigital

Summary

DEFAULT_CONFIG_PATH = Path("standards/drift-checker.config.json") is resolved against the current directory, and a missing file returns permissive defaults with no required_workflows and no skip_checks. Every other meta input is resolved from meta_repo_path.

Where

  • scripts/drift_check/config.py:21, 28-36
  • scripts/drift_check/cli.py:235 (load_config(config_path), None unless --config)
  • scripts/drift_check/cli.py:240-245 (required-refs correctly resolved from meta_repo_path)

Details

CI only works because the composite action sets working-directory: .drift-checker.

Impact

Running the checker from a tool repo (the natural local usage) reports a clean pass while the same repo fails in CI: required-workflow enforcement and the mcp-server skip rules vanish without a warning.

Steps to reproduce

  1. In a temp dir containing only fakerepo/.cursor-plugin/plugin.json, run python <meta>/scripts/drift_check/cli.py --local fakerepo: 0 errors, rc 0.
  2. Run the same command from the meta-repo root: 4 required-workflows errors, rc 1.

Suggested fix

Default the config to meta_repo_path / "standards" / "drift-checker.config.json" in _build_snapshots (as is done for required-refs), and warn on stderr when the default file is missing.

Acceptance criteria

  • Results are identical regardless of cwd
  • A test runs the CLI from a different cwd and still sees required-workflows findings

Getting started

  • Relevant files: scripts/drift_check/cli.py, scripts/drift_check/config.py
  • How to run tests: pip install -r requirements-test.txt && python -m pytest
  • After any registry or standards change: python scripts/sync_from_registry.py
  • Conventions: see CONTRIBUTING.md and standards/writing-style.md

Filed by repo-audit/full-audit at 2c7a7fe. Severity: medium. Effort: S. audit-key: bug|scripts/drift_check/config.py|DEFAULT_CONFIG_PATH

Activity

  1. added
    bug
    good first issue
    severity: medium
    on Nov 30, 2026
  2. abhicodes-007 commented on Nov 30, 2026

    @abhicodes-007

    Fix ready in PR #200: #200

    The new tests fail on main when run from an unrelated cwd and pass with the patch; full suite is 354 passed, 2 skipped.

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

    buggood first issueseverity: medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions