Goal
Split the GitHub workflow contract tests into focused modules so the Pylint module-size gate passes without weakening the limit.
Background
tests/test_github_workflows.py is 1002 lines on main, which fails Pylint's default too-many-lines limit of 1000. The largest cohesive section is the issue-branch-policy contract and scenario suite. This is follow-up maintenance after the recent workflow-hardening changes; it is independent of the merged documentation change in #2206.
Scope
- Move the issue-branch-policy workflow contract and scenario tests into a focused test module.
- Keep shared process/YAML helpers reusable and preserve test behavior.
- Update contract runners, lightweight CI commands, documentation, and hardening-test references that name the existing module.
- Keep the general workflow contract tests in
tests/test_github_workflows.py.
Acceptance Criteria
- No module checked by Pylint exceeds the configured/default 1000-line limit.
- The moved issue-branch-policy tests run and retain their existing assertions.
- Contract runners and lightweight CI invoke the complete workflow contract coverage.
- The contract registry and enforcement references remain accurate.
- No Pylint threshold increase or blanket
too-many-lines suppression is introduced.
Validation
python -m pytest tests/test_github_workflows.py tests/test_issue_branch_policy_workflow.py -q
bash tests/contracts/run.sh or the focused contract checks it composes.
git diff --check
- Pylint across the supported Python matrix.
Non-goals
- Do not change workflow behavior or issue-branch-policy semantics.
- Do not change the Pylint policy to accommodate this file.
- Do not combine unrelated workflow or documentation changes.
Goal
Split the GitHub workflow contract tests into focused modules so the Pylint module-size gate passes without weakening the limit.
Background
tests/test_github_workflows.pyis 1002 lines onmain, which fails Pylint's defaulttoo-many-lineslimit of 1000. The largest cohesive section is the issue-branch-policy contract and scenario suite. This is follow-up maintenance after the recent workflow-hardening changes; it is independent of the merged documentation change in #2206.Scope
tests/test_github_workflows.py.Acceptance Criteria
too-many-linessuppression is introduced.Validation
python -m pytest tests/test_github_workflows.py tests/test_issue_branch_policy_workflow.py -qbash tests/contracts/run.shor the focused contract checks it composes.git diff --checkNon-goals