Repository navigation
test: split four test files just over the line cap into topic modules - #21472
Conversation
First Principles Review (Opus 5.5) — ⏭️ skippedRevision |
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing to check. [DESIGN-REVIEWED] c653c0a Description read[DESCRIPTION-READ] 3f84134f699497867539766271123d36be5ef65e2ac649d204c72191082bf628 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
c0e451a to
07ce572
Compare
|
Rebased: main moved in The only conflict was in other changes' rows of the line-cap baseline. It resolves to main's rows minus this PR's four. Outside that file, the patch is identical to the previous head ( |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: test (13 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: splits four test files just over the line cap into topic modules with shared helpers; the spec edit only renames a test reference. Spec files changed as a ride-along (a minority of the diff on both file count and changed lines), not reviewed as a design decision: docs/system-specs/modules/learn-cron-dashboard.md.
07ce572 to
3735729
Compare
|
Rebased: main moved in The only conflict was in other changes' rows of the line-cap baseline. It resolves to main's rows minus this PR's four. Outside that file the patch is identical to the previous head |
3735729 to
cd0def2
Compare
|
Rebased onto main 9d088c8 after #21640 fixed the shard-7 facade-scan timeout (main moved from 4b066e0); CI re-running. The rebase had no conflicts. The patch is identical to the previous head |
test_discord_resumed_busy.py, test_push_branch_gate.py, test_vector_memory_coverage.py and test_steer_requeue.py were each just over the 2,000-line cap. Each keeps one contiguous run of its units, and a contiguous block of whole units moves verbatim into one sibling module named for what it tests. Helpers both halves read move to a *_helpers.py module, and shared fixtures are bound by name in each module, so every test keeps its name, parameters, markers and fixture closure (424 tests, identical multiset). The four line-cap baseline rows are deleted, and the spec citation of the requeue sendId tests names their new module. Part of #20192
cd0def2 to
c653c0a
Compare
|
Rebased onto main 924c159 after #21792 fixed the frozen history-bindings inventory (main moved from 9d088c8); CI re-running. The only conflict was other changes' rows in |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: test (13 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: test-only split of four test files just over the line cap into topic modules and helpers; 171 test functions removed and re-added. Spec files changed as a ride-along (a minority of the diff on both file count and changed lines), not reviewed as a design decision: docs/system-specs/modules/learn-cron-dashboard.md.
Problem / Motivation
Goal: Bring four test files that sit just over the 2,000-line cap under it by moving their tests, unchanged, into topic modules.
test_discord_resumed_busy.py(2,026 lines),test_push_branch_gate.py(2,016),test_vector_memory_coverage.py(2,016) andtest_steer_requeue.py(2,015) are each over the repository's 2,000-line limit for a hand-written file, so each has a row in.github/file-line-cap-baseline.txt.Why it matters
The cap holds only once the files already over it come under it. Until then, every new test for the Discord hand-off, the push gate, vector memory or the steer requeue lands in a file that is already over and grows it.
Not a goal
test_vector_memory_coverage.py. It stays in.github/black-baseline.txt.What changed (motivation → approach → change)
Each file has to shrink without losing or changing a test, and without making CI's added-line gates re-judge code that did not move. So each original keeps one unbroken run of its own units, and a contiguous block of whole units moves, verbatim, into one sibling module named for what it tests. Module-level helpers that both halves read move to a
*_helpers.pymodule, and each half imports only the names it reads. Shared fixtures are bound by name in each module (_isolated_home = discord_resumed_busy_helpers._isolated_home), the waytest_discord_sessions.pyalready shares its own, so every fixture keeps its name and pytest registers it per module.test_discord_resumed_busy.pytest_discord_resumed_busy_after_handoff.pydiscord_resumed_busy_helpers.pytest_push_branch_gate.pytest_push_branch_gate_parser.pytest_vector_memory_coverage.pytest_vector_memory_coverage_vector_space.pyvector_memory_coverage_helpers.pytest_steer_requeue.pytest_steer_requeue_entry_meta.pysteer_requeue_helpers.pyThe three helper modules are under 150 lines because they hold only what both halves of one suite share.
TestSteerLifecycleStatestays intest_steer_requeue.py: it holds an AWS example key id other thanAKIAIOSFODNN7EXAMPLE, which the internal content scan would read as an added line if it moved.Edits that are not moves
test_steer_requeue_entry_meta.py, theTestSendIdMapLifecycledocstring said the other pop sites are "pinned above", and one comment cited "the ordering test above". Both tests stay intest_steer_requeue.py, so both now name that module.discord_resumed_busy_helpers.py, "the refusal every case below either avoids or keeps" names the suites, since that module holds no cases.# nosemgrep: kirocrew.test-autouse-shared-monkeypatchis added on the moved autouse_isolated_home. No module of that family callsmonkeypatch.undo().# flake-ok:is added above six moved unbounded awaits and one zero-delay yield loop intest_discord_resumed_busy_after_handoff.py.test_vector_memory_coverage.py, whose origin is black-baselined; the AST is unchanged.learn-cron-dashboard.mdnamestest_steer_requeue_entry_meta.pyas the home of the requeue sendId tests.Move audit
Exprunits are the module docstrings;TestSendIdMapLifecycle.Expris that class's docstring, with the one-line re-point above.L36 diff parity: for every changed file,
git diffandgit diff --minimaladd and delete the same number of lines. For the originals that is +20/-1260, +4/-678, +15/-1060 and +11/-666 both ways; every new file is +N/-0.Backwards compatibility
Compatible: no product behaviour changes. Every test keeps its name, class, parameters, markers and fixtures. No other test module imports from the four originals.
Removes nothing: the change moves tests between files; no product function, path or key is removed.
Tests
(class, name, params)multiset is identical.item.fixturenames, autouse included) are identical at BASE and HEAD.-n0. The backend related set fromlocal-gate --dry-run(17 files,test_security.pyincluded) passes at-n0.test_flake_pattern_ratchet.py(against the merge-base),test_wait_discipline_ratchet.py,test_source_pin_budget.py,test_file_line_cap.py,test_nodeid_length_guard.py,test_leaf_test_scope.pyandtest_cwd_relative_repo_reads_gate.pypass. The budget row fortest_steer_requeue.pyis unchanged, because its four source reads stay there.scripts/local-gate.py --dry-runselects 17 backend test files and 367 cross-surface frontend specs. Nowebsite/file changes and no spec reads these test files, so the backend set ran.check_file_line_cap.py(0 failures), docs-lint, the comment-history, brand and harness-parity gates, and semgrep 1.78 with CI's configs and--baseline-commit(0 findings, 0 parse errors).Manual verification
N/A — test-only move; the collection, fixture and marker proofs above cover it.
Related Issues
Part of #20192
Follow-up: #20383 (pre-existing shapes moved verbatim; de-flake there)
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.