refactor(testing): rename tdd_bug/tdd_bug_N tags to tdd_issue/tdd_issue_N #1169

Merged
hurui200320 merged 1 commit from refactor/m3-tdd-tag-rename into master 2026-03-27 06:18:56 +00:00
Member

Summary

Renames the TDD tag system from tdd_bug/tdd_bug_<N> to tdd_issue/tdd_issue_<N> across the entire codebase. The @tdd_expected_fail tag is unchanged.

The TDD expected-failure workflow is not limited to bug fixes — it applies equally to any issue type (features, tasks, refactors). The _bug suffix was misleading and artificially narrowed the perceived scope. The new _issue suffix accurately reflects that the TDD tagging system applies to any Forgejo issue.

Closes #965

Changes

Infrastructure Code (tag validation + result inversion)

  • features/environment.py: validate_tdd_tags(), should_invert_result(), apply_tdd_inversion() — regex pattern _TDD_BUG_N_RE_TDD_ISSUE_N_RE, variable names, error messages, comments, and docstrings all updated
  • robot/tdd_expected_fail_listener.py: _validate_tdd_tags(), _should_invert_result(), start_test(), end_test() — same scope of changes as the Behave counterpart

Tagged Test Files (62 files)

  • 33 Behave .feature files: All @tdd_bug@tdd_issue and @tdd_bug_<N>@tdd_issue_<N> tags renamed
  • 29 Robot .robot files: All tdd_bugtdd_issue and tdd_bug_<N>tdd_issue_<N> tags renamed
  • Feature/suite documentation headers updated ("TDD Bug #NNN" → "TDD Issue #NNN")

Tag Validation Test Infrastructure

  • features/testing/tdd_tag_validation.feature: All tag references and test data updated
  • features/steps/tdd_tag_validation_steps.py: Mock scenario tags updated
  • robot/tdd_tag_validation.robot: Test names, commands, expected outputs updated
  • robot/helper_tdd_tag_validation.py: Function names, command dispatch keys, fixture references, output strings updated

Robot Fixture Files (renamed + content updated)

  • tdd_bug_alone.robottdd_issue_alone.robot
  • tdd_missing_tdd_bug.robottdd_missing_tdd_issue.robot
  • tdd_expected_fail_missing_bug_n.robottdd_expected_fail_missing_issue_n.robot

Documentation

  • CONTRIBUTING.md: Section "TDD Bug Test Tags" → "TDD Issue Test Tags"; all tag references, examples, and validation rules updated
  • noxfile.py: Comment references updated

Also Updated

  • Step definition files, mock helpers, and benchmark files: docstring references updated

Verification

  • All 11 nox sessions pass (lint, format, typecheck, security_scan, dead_code, unit_tests, integration_tests, docs, build, benchmark, coverage_report)
  • 480 features, 12,565 Behave scenarios, 48,061 steps: All pass
  • 1,775 Robot integration tests: All pass
  • 55 E2E tests: All pass
  • Coverage: 98% (threshold: 97%)
  • Zero remaining tdd_bug references in code/tests/docs (only CHANGELOG.md and timeline.md retain historical references)
## Summary Renames the TDD tag system from `tdd_bug`/`tdd_bug_<N>` to `tdd_issue`/`tdd_issue_<N>` across the entire codebase. The `@tdd_expected_fail` tag is unchanged. The TDD expected-failure workflow is not limited to bug fixes — it applies equally to any issue type (features, tasks, refactors). The `_bug` suffix was misleading and artificially narrowed the perceived scope. The new `_issue` suffix accurately reflects that the TDD tagging system applies to **any** Forgejo issue. Closes #965 ## Changes ### Infrastructure Code (tag validation + result inversion) - **`features/environment.py`**: `validate_tdd_tags()`, `should_invert_result()`, `apply_tdd_inversion()` — regex pattern `_TDD_BUG_N_RE` → `_TDD_ISSUE_N_RE`, variable names, error messages, comments, and docstrings all updated - **`robot/tdd_expected_fail_listener.py`**: `_validate_tdd_tags()`, `_should_invert_result()`, `start_test()`, `end_test()` — same scope of changes as the Behave counterpart ### Tagged Test Files (62 files) - **33 Behave `.feature` files**: All `@tdd_bug` → `@tdd_issue` and `@tdd_bug_<N>` → `@tdd_issue_<N>` tags renamed - **29 Robot `.robot` files**: All `tdd_bug` → `tdd_issue` and `tdd_bug_<N>` → `tdd_issue_<N>` tags renamed - Feature/suite documentation headers updated ("TDD Bug #NNN" → "TDD Issue #NNN") ### Tag Validation Test Infrastructure - `features/testing/tdd_tag_validation.feature`: All tag references and test data updated - `features/steps/tdd_tag_validation_steps.py`: Mock scenario tags updated - `robot/tdd_tag_validation.robot`: Test names, commands, expected outputs updated - `robot/helper_tdd_tag_validation.py`: Function names, command dispatch keys, fixture references, output strings updated ### Robot Fixture Files (renamed + content updated) - `tdd_bug_alone.robot` → `tdd_issue_alone.robot` - `tdd_missing_tdd_bug.robot` → `tdd_missing_tdd_issue.robot` - `tdd_expected_fail_missing_bug_n.robot` → `tdd_expected_fail_missing_issue_n.robot` ### Documentation - **`CONTRIBUTING.md`**: Section "TDD Bug Test Tags" → "TDD Issue Test Tags"; all tag references, examples, and validation rules updated - **`noxfile.py`**: Comment references updated ### Also Updated - Step definition files, mock helpers, and benchmark files: docstring references updated ## Verification - **All 11 nox sessions pass** (lint, format, typecheck, security_scan, dead_code, unit_tests, integration_tests, docs, build, benchmark, coverage_report) - **480 features, 12,565 Behave scenarios, 48,061 steps**: All pass - **1,775 Robot integration tests**: All pass - **55 E2E tests**: All pass - **Coverage: 98%** (threshold: 97%) - **Zero remaining `tdd_bug` references** in code/tests/docs (only CHANGELOG.md and timeline.md retain historical references)
refactor(testing): rename tdd_bug/tdd_bug_N tags to tdd_issue/tdd_issue_N
All checks were successful
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 25s
CI / lint (pull_request) Successful in 3m19s
CI / typecheck (pull_request) Successful in 3m56s
CI / security (pull_request) Successful in 4m6s
CI / quality (pull_request) Successful in 4m10s
CI / integration_tests (pull_request) Successful in 7m20s
CI / unit_tests (pull_request) Successful in 7m44s
CI / docker (pull_request) Successful in 1m8s
CI / e2e_tests (pull_request) Successful in 13m1s
CI / coverage (pull_request) Successful in 12m25s
CI / status-check (pull_request) Successful in 1s
CI / build (push) Successful in 26s
CI / lint (push) Successful in 3m31s
CI / quality (push) Successful in 3m40s
CI / typecheck (push) Successful in 3m57s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 4m1s
CI / integration_tests (push) Successful in 8m55s
CI / unit_tests (push) Successful in 9m14s
CI / docker (push) Successful in 9s
CI / e2e_tests (push) Successful in 11m42s
CI / coverage (push) Successful in 11m37s
CI / status-check (push) Successful in 4s
CI / benchmark-publish (push) Successful in 29m25s
CI / benchmark-regression (pull_request) Successful in 54m8s
1878998b7a
Rename the TDD tag system from tdd_bug/tdd_bug_<N> to tdd_issue/tdd_issue_<N>
across the entire codebase. The tdd_expected_fail tag is unchanged.

The TDD expected-failure workflow is not limited to bug fixes — it applies
equally to any issue type (features, tasks, refactors). The _bug suffix was
misleading and narrowed the perceived scope. The new _issue suffix accurately
reflects that the TDD tagging system applies to any Forgejo issue.

Changes span 92 files:
- features/environment.py: validate_tdd_tags(), should_invert_result(), and
  apply_tdd_inversion() updated — regex, variables, error messages
- robot/tdd_expected_fail_listener.py: _validate_tdd_tags(), _should_invert_result(),
  start_test(), end_test() updated consistently
- 33 Behave .feature files: all @tdd_bug/@tdd_bug_<N> tags renamed
- 29 Robot .robot files: all tdd_bug/tdd_bug_<N> tags renamed
- 3 Robot fixture files renamed (tdd_bug_alone, tdd_missing_tdd_bug,
  tdd_expected_fail_missing_bug_n) with content and references updated
- Tag validation tests and helpers updated (function names, command dispatch
  keys, output strings, fixture references)
- CONTRIBUTING.md: section renamed from 'TDD Bug Test Tags' to
  'TDD Issue Test Tags', all tag references and examples updated
- noxfile.py: comment references updated
- Step definition files, mock helpers, and benchmark files: docstring
  references updated

ISSUES CLOSED: #965
hurui200320 added this to the v3.2.0 milestone 2026-03-27 05:59:23 +00:00
Author
Member

Self-QA Review: Approved (YOLO)

Verdict: Approve — simple mechanical rename, safe to merge without external review.

Review summary (0C/0M/0m/2n):
Reviewed across 5 focus areas (spec compliance, bug detection, test coverage, performance/security, code quality). All 12 acceptance criteria from ticket #965 are met. Zero critical, major, or minor issues found. Two informational nits noted (optional multi-tag test scenario, pre-existing Type/Bug terminology in unchanged lines) — neither affects correctness.

Rationale for YOLO: Every change across all 93 files is an identical mechanical string rename (tdd_bugtdd_issue). No logic, control flow, or architecture was modified. All quality gates pass with 98% coverage. The breadth of files touched does not introduce complexity since each substitution is trivially verifiable.

## Self-QA Review: ✅ Approved (YOLO) **Verdict:** Approve — simple mechanical rename, safe to merge without external review. **Review summary (0C/0M/0m/2n):** Reviewed across 5 focus areas (spec compliance, bug detection, test coverage, performance/security, code quality). All 12 acceptance criteria from ticket #965 are met. Zero critical, major, or minor issues found. Two informational nits noted (optional multi-tag test scenario, pre-existing `Type/Bug` terminology in unchanged lines) — neither affects correctness. **Rationale for YOLO:** Every change across all 93 files is an identical mechanical string rename (`tdd_bug` → `tdd_issue`). No logic, control flow, or architecture was modified. All quality gates pass with 98% coverage. The breadth of files touched does not introduce complexity since each substitution is trivially verifiable.
Author
Member

According to Jeff's PR review and merge policy, I think this PR is really simple, which only contains mechanical string rename. As my AI agent said, there is no logic change in the PR. And I'm pretty confident that the change won't break or affect anything. So I'll just YOLO it (after pipeline checks pass).

According to Jeff's PR review and merge policy, I think this PR is really simple, which only contains mechanical string rename. As my AI agent said, there is no logic change in the PR. And I'm pretty confident that the change won't break or affect anything. So I'll just YOLO it (after pipeline checks pass).
hurui200320 deleted branch refactor/m3-tdd-tag-rename 2026-03-27 06:18:56 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core!1169
No description provided.