Repository navigation
test: drop history-only text from test docstrings - #24558
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the diff only rewords docstrings in 43 test files. It adds no code, renders nothing new, and takes nothing away. Notes
[DESIGN-REVIEWED] 93a6409 Description read[DESCRIPTION-READ] 9150a552a27698337b03b2f90aec46de35cdc3aaff671592dfab987210560580 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: |
bolichen97
left a comment
There was a problem hiding this comment.
Looks good to ship.
Verified at 328fa00:
- I compared each of the 43 files at the merge base and at head with docstrings stripped from the AST: 0 files differ in code. Only docstring text changed.
- I read every rewritten docstring. Each keeps the rule and the reason the test pins, now in the present tense. None was emptied, and no added line is over 100 columns.
- No added line still carries review-round, commit or issue history.
One small nit, inline: three docstrings in test/test_file_change_snapshots.py now open with an identifier whose first letter was capitalised.
CI: Backend Tests shard 4 (Linux and Windows) fails on two tests in test/test_telegram_dispatcher.py, a file this PR does not touch. Main fixed those tests in #24531 after this branch's merge base, so a rebase onto main should turn the shard green.
Leaving this as a comment, not an approval: the change spans 43 files, above the size where a maintainer signs off by hand.
328fa00 to
d44b076
Compare
|
Disposition: |
bolichen97
left a comment
There was a problem hiding this comment.
Thanks for the rebase. Re-checked at d44b076.
Verified:
- I compared each of the 43 files at the new merge base and at head with docstrings stripped from the AST: 0 files differ in code. Only docstring text changed.
- No added line still carries review-round, commit or issue history, and no added line is over 100 columns.
Still open from the last round: the three docstrings in test/test_file_change_snapshots.py at lines 852, 926 and 944 still open with ReplaceAll, StrReplace and OldStr. The code spells these replaceAll, strReplace and oldStr. Details inline.
CI: Backend Tests (Windows) shard 6 fails in test/test_slack_team_id_env.py, a file this PR does not touch. That test arrived in the commit this branch is based on, so the failure comes from main, not from this change.
Leaving this as a comment, not an approval: the change spans 43 files, above the size where a maintainer signs off by hand.
|
Disposition: |
d44b076 to
2a7a16e
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Re-reviewed at 2a7a16e.
The earlier note is addressed: the docstrings in test/test_file_change_snapshots.py that began with a capitalised identifier now read "A replaceAll edit ...", "The edit strReplace(...) ...", and "The oldStr needle ...", so the code names keep their real casing.
What I verified on this head:
- Parsed the base and head version of every one of the 43 changed files and compared the ASTs with docstrings blanked. All 43 are identical, so the change is docstring-only and no test logic moved.
- No comment lines or non-Python files changed.
The one red check, Backend Tests (Windows) shard 6, fails in test/test_slack_team_id_env.py with FileNotFoundError. That file is not touched here and a docstring edit cannot change its behaviour, so a rerun should clear it.
Looks good to ship from my side. This PR changes more than 20 files, so I am leaving a comment rather than an approval; a maintainer should approve once readiness passes.
Cut review-round, reviewer-found and PR/commit references from test docstrings and comments, keeping the rule each test pins. Docstrings and comments only; test code is unchanged.
2a7a16e to
93a6409
Compare
Problem / Motivation
Goal: Test docstrings state the rule each test pins, without review-round history.
Many test docstrings open with "(review finding)", "Three review rounds each found...", "a reviewer caught...", commit SHAs or issue numbers. That text tells a reader how the test came to be, not what it guards, and it goes stale. This is part 1 of 2 (43 files,
test/metrics/throughtest/test_issue_radar_crew_runtime_sweep.py); part 2 covers the rest.Why it matters
A reader of a failing test needs the invariant and why it matters. History narration hides that and is what
scripts/check_comment_history.pyalready refuses on new lines.Not a goal
src/) changes.What changed (motivation → approach → change)
For each strict-rule history hit: cut the history; where the docstring also says what the test pins and why, kept that as the rule, stated in the present tense ("would ..." instead of "was ..."). No docstring that carried a real why was emptied. Long lines rewrapped to ≤100 columns.
Left as-is because review is the feature under test:
test/test_gh_pr_fetch.py:900,:976(fetching PR review remarks)test/test_fix_loop_discipline.py:5(the reviewer-finding / deferral discipline itself)Strict history count for
test/(goal_scan.py history --strict): 132 → 62 on this branch (70 lines cut or rewritten).Backwards compatibility
Compatible: docstring text only; nothing is parsed from these strings.
Removes nothing: only docstring wording changes; no test, reader or behaviour is removed.
Tests
Proof: not provable -- test-only change
goal_scan.py astcheck 20c46e97d9(merge-base):-n 4,KIROCREW_PROFILE=standalone): 4893 passed, 16 skipped.check_black_formatting.pywith black 26.10.1) andcheck_comment_history.pypass.Manual verification
N/A — docstring-only change; AST check proves no code moved.
Related Issues
Part 2:
chore/test-docstrings-history-part2.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributed under the project's Apache-2.0 license.