diff --git a/docs/specs/DEVX-166.md b/docs/specs/DEVX-166.md new file mode 100644 index 0000000..aca4d00 --- /dev/null +++ b/docs/specs/DEVX-166.md @@ -0,0 +1,27 @@ +# DEVX-166: Exclude docs/plans/* from PR size check + +## Problem +Planning docs in `docs/plans/` are legitimately large (700+ lines) but +fail the PR size check (max 500 lines). This blocks PRs that only add +planning documents. + +## Approach +REQ-1: Add `docs/plans/*` to `DEFAULT_EXCLUDED_PATTERNS` in + `src/devx/ci/check_pr_size.py` +REQ-2: Add test coverage for the new exclusion pattern + +## Test Plan +- `make pytest-cov` passes with 100% coverage +- `make lint-all` passes + +## Deploy Plan +- Merge to master → post-merge auto-publishes new devx version +- Infra PR #1179 picks up the fix once devx is bumped + +## Rollback Plan +- Revert the merge commit + +## Acceptance Criteria +- [x] REQ-1: Add `docs/plans/*` to `DEFAULT_EXCLUDED_PATTERNS` in + `src/devx/ci/check_pr_size.py` +- [x] REQ-2: Add test coverage for the new exclusion pattern diff --git a/src/devx/ci/check_pr_size.py b/src/devx/ci/check_pr_size.py index bab11b4..79e2010 100644 --- a/src/devx/ci/check_pr_size.py +++ b/src/devx/ci/check_pr_size.py @@ -36,6 +36,7 @@ DEFAULT_EXCLUDED_PATTERNS = [ "CHANGELOG.md", "README.md", "docs/index.md", + "docs/plans/*", "*.svg", "uv.lock", "poetry.lock", diff --git a/tests/unit/test_check_pr_size.py b/tests/unit/test_check_pr_size.py index 0fb9451..9dcfd3e 100644 --- a/tests/unit/test_check_pr_size.py +++ b/tests/unit/test_check_pr_size.py @@ -26,6 +26,12 @@ class TestIsExcluded: def test_excludes_readme(self) -> None: assert is_excluded("README.md", ["README.md"]) + def test_excludes_plans_glob(self) -> None: + assert is_excluded("docs/plans/sso-bridge-full-extraction.md", ["docs/plans/*"]) + + def test_does_not_exclude_specs(self) -> None: + assert not is_excluded("docs/specs/DEVX-165.md", ["docs/plans/*"]) + class TestCheckSize: def test_under_limits_passes(self) -> None: