Skip to content

test: drop history-only text from test docstrings (part 2) - #24559

Merged
chenmingwei23 merged 1 commit into
mainfrom
chore/test-docstrings-history-part2
Oct 27, 2026
Merged

chenmingwei23 merged 1 commit into
mainfrom
chore/test-docstrings-history-part2

Conversation

@iamwhatever

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Test docstrings state the rule each test pins, without review-round history.

Many test docstrings open with "(review finding)", "Four review rounds 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 2 of 2 (42 files, test/test_issue_radar_crew_triage_model.py through test/test_workspace_crud_handlers.py); part 1 is on chore/test-docstrings-history.

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.py already refuses on new lines.

Not a goal

  • No test code, assertion, fixture or test name changes.
  • No source (src/) changes.
  • Docstrings and comments where review is the feature under test are left alone (listed below).

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. 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_pr_readiness_evaluate.py:1672, test/test_pr_readiness_sweep.py:1373 (changes-requested reviews)
  • test/test_prepare_pr_findings.py:135, test/test_prepare_pr_monitor_armed.py:93, test/test_prepare_pr_profiles.py:294, test/test_prepare_pr_prove_line.py:239, :464 (the prepare-PR review tooling)

Strict history count for test/ (goal_scan.py history --strict): 132 → 80 on this branch (52 lines cut or rewritten). With part 1 merged as well: 132 → 10, all of them the feature-under-test hits above and in part 1.

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):
files checked: 42  code-changed: 0  docstring-only: 42
  • All touched test files from both parts run once (-n 4, KIROCREW_PROFILE=standalone): 4893 passed, 16 skipped.
  • Collected test count over the touched files: 4909 at base and 4909 at head.
  • flake8, isort, black gate (check_black_formatting.py with black 26.10.1) and check_comment_history.py pass.

Manual verification

N/A — docstring-only change; AST check proves no code moved.

Related Issues

Part 1: chore/test-docstrings-history.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributed under the project's Apache-2.0 license.

@iamwhatever
iamwhatever requested review from a team and KiroCrewCaptain as code owners October 26, 2026 20:27
@iamwhatever
iamwhatever requested a review from CrysisDeu October 26, 2026 20:27
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 26, 2026
@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision c418309a447b7d916671ff4f5a0247352a1e9519 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ⏭️ skipped

Revision c418309a447b7d916671ff4f5a0247352a1e9519 ships no reviewable capability (docs, tests or generated files only), so there is nothing to inventory. Does not block merge.

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of c418309a447b7d916671ff4f5a0247352a1e9519 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

The diff only changes wording in test docstrings and comments, and no test logic or behaviour changes, so there is nothing at the design level to judge.

[DESIGN-REVIEWED] c418309

Description read

[DESCRIPTION-READ] df34862350468c1a233daa5a868b9dfa67ed5fc3bee57021b6b0c7ce290c6719

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed c418309a447b7d916671ff4f5a0247352a1e9519 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] c418309

Verdict parsed from the review's SHA-scoped output markers for commit c418309a447b7d916671ff4f5a0247352a1e9519.

False positive or not applicable? A repository writer can comment:
/ai-review override fable c418309a447b7d916671ff4f5a0247352a1e9519 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of c418309a447b7d916671ff4f5a0247352a1e9519 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] c418309

False positive or not applicable? A repository writer can comment:
/ai-review override gpt c418309a447b7d916671ff4f5a0247352a1e9519 false-positive: <reason, 20 to 500 characters>

@iamwhatever
iamwhatever force-pushed the chore/test-docstrings-history-part2 branch from 2146bb4 to d60af90 Compare October 26, 2026 21:09
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Rebased onto main a3ee04f and pushed d60af90, to pick up #24531 (the test_telegram_dispatcher.py fix that shard 4 needed on the sibling PR). goal_scan.py astcheck a3ee04f574: files checked 42, code-changed 0, docstring-only 42.

@iamwhatever

iamwhatever commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Disposition: Backend Tests (Windows) (6) fails on six test/test_slack_team_id_env.py::TestSpawnEnv tests (FileNotFoundError: [WinError 2]). That file is not touched here; it arrived on main with #22380 (a3ee04f). Both docstring PRs fail the same six tests on the same shard, and main CI on a3ee04f has not finished that shard yet. No open fix PR found. No change on this branch.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 26, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Windows shard 6 red is main's: main CI on a3ee04f fails the same six test/test_slack_team_id_env.py::TestSpawnEnv tests with WinError 2. Tracked in #24612; open fixes #24609 and #24613. Waiting for one to merge, then rebasing. No change here.

Cut review-round and reviewer-found narration from test docstrings, keeping the rule each test pins. Docstrings only; test code is unchanged.
@iamwhatever
iamwhatever force-pushed the chore/test-docstrings-history-part2 branch from d60af90 to c418309 Compare October 27, 2026 01:17
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Rebased onto main 8a518e1, which carries #24609 (the fix for Windows shard 6, test/test_slack_team_id_env.py). New head c418309. goal_scan.py astcheck vs that merge-base: 42 files, 0 code changed.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 27, 2026
@chenmingwei23
chenmingwei23 merged commit 6d2ee77 into main Oct 27, 2026
107 checks passed
@chenmingwei23
chenmingwei23 deleted the chore/test-docstrings-history-part2 branch October 27, 2026 06:04
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants