test: add oversized test split plan#3987
Conversation
RaresKeY
left a comment
There was a problem hiding this comment.
I rechecked this against the current PR head and refreshed the linked roadmap state. #3982 has merged and #3973 is closed now, so the old sequencing note is no longer the blocker. The remaining issue is that the generated plan is stale on this branch.
Findings
issue (test): Regenerate the checked-in split plan on the current head
-
Problem: Running
venv/bin/python tests/tools/build_oversized_test_split_plan.pyon the exact PR head rewrites the checked-in plan. The committed document reports541scanned test files and3263collected pytest items, but the generator now reports543and3267. It also updates the area/sub-area distributions and thetests/test_platform_compat.pyline count, so the PR's own freshness check fails after regeneration. -
Impact: This PR is meant to add a reproducible, current-data planning document. As submitted, it would land stale generated data and leave the next split-planning work based on counts that the branch itself no longer reproduces.
-
Ask: Update the branch, rerun the builder, and commit the regenerated
tests/OVERSIZED_TEST_SPLIT_PLAN.md. Since the branch is also behind currentdev, rerun it after the final branch update so the landed plan reflects the actual merge candidate. -
Location:
tests/OVERSIZED_TEST_SPLIT_PLAN.md:29
Validation
git diff --check origin/dev...HEADpassed.venv/bin/python -m py_compile tests/tools/build_oversized_test_split_plan.pypassed.venv/bin/python tests/tools/build_oversized_test_split_plan.pycompleted and rewrote the generated plan.git diff --exit-code -- tests/OVERSIZED_TEST_SPLIT_PLAN.mdfailed with the generated-plan drift above.venv/bin/python -m pytest --collect-only -q testscollected3267tests.
PR Hygiene
543e42d to
b0ade99
Compare
|
Thanks for the review. I updated the branch onto current I also re-ran the freshness validation after regeneration. The remaining failing CI check is unrelated to this PR: the same two This PR still only changes the generated split-plan markdown and the plan builder script. |
* test: add oversized test split plan * test: refresh oversized split plan
* test: add oversized test split plan * test: refresh oversized split plan
Summary
Adds a reproducible oversized test-file split plan.
This PR adds:
tests/tools/build_oversized_test_split_plan.pytests/OVERSIZED_TEST_SPLIT_PLAN.mdThe plan is generated from current repo data and is intended to guide future split PRs safely. It does not move tests, rewrite assertions, extract helpers, change CI, or change production behavior.
Target branch
dev, notmain.Linked Issue
Fixes #3983
Part of #2523
Type of Change
Checklist
dev.docker compose uporuvicorn app:app) and verified the change works end-to-end.For this planning-only test-tooling PR, "end-to-end" means the audit builder was run against the live test tree, regenerated the plan deterministically, and produced current metrics from pytest collection, taxonomy classification, AST scanning, and static setup-signal scans. This PR does not change app runtime behavior, routes, UI, or user-facing behavior.
How to Test
Regenerate the plan:
Validate formatting and syntax:
Confirm the generated plan is fresh after regeneration:
Confirm pytest collection count:
Local validation:
git diff --check: passedpy_compile: passedMethodology
The builder generates the plan using:
test_*.pydiscovery undertests/;test_*functions andTest*classes;pytest --collect-only -q testsfor collected item counts;tests._taxonomy.classify_test_pathfor area/sub-area classification;Static signals are treated only as review prompts. They are not proof that a file is unsafe, and the generated plan explicitly states that future split PRs still need manual review.
Taxonomy Coverage Note
The generated plan intentionally surfaces
uncategorizedsplit candidates in a dedicated section instead of reclassifying them in this PR.This PR does not change taxonomy behavior. Any taxonomy refinement for oversized split candidates should happen in a separate focused issue/PR before those files are used as split targets.
Behavior Added
The new builder:
tests/OVERSIZED_TEST_SPLIT_PLAN.md;/tmp/oversized-test-file-metrics.json;unknownfor every file;Safety Details
This PR does not:
tests/conftest.py;Future split PRs should be separate, scoped, and validated independently.
Visual / UI changes - REQUIRED if you touched anything that renders
Anything that changes what the UI looks like - buttons, icons, padding, colors, fonts, spacing, layout, CSS, HTML, SVG, or any
static/js/module that draws to the DOM - needs all of the following. PRs that change rendering without these WILL be closed.N/A: planning/test-tooling-only PR. No UI, CSS, HTML, SVG, or rendering files changed.
Screenshots / clips
N/A - no visual or UI changes.