fix(test): remove lingering @tdd_expected_fail tags for closed bugs #821 and #932 #1206

Closed
opened 2026-03-30 05:16:14 +00:00 by freemo · 5 comments
Owner

Metadata

  • Commit Message: fix(test): remove lingering @tdd_expected_fail tags for closed bugs #821 and #932
  • Branch: feature/m3-tdd-tag-cleanup-821-932

Background and Context

During the Day 50 planning audit, it was discovered that bugs #821 (ACMS context tier runtime) and #932 (plan apply --yes flag) have been fixed and closed on Forgejo, but their @tdd_expected_fail tags were not removed from the test files during the bug fix process. This violates the TDD workflow defined in CONTRIBUTING.md:

The fix is implemented and the @tdd_expected_fail tag is removed from the test (leaving @tdd_bug and @tdd_bug_<N> in place as permanent references).

These lingering tags cause the tests to run in inverted mode — they "pass" CI by expecting the underlying assertion to fail, but since the bugs are now fixed, the assertions actually pass, causing the inverted result to be a failure. If CI is not currently failing, it means these tests are either being skipped or the tag inversion mechanism has a gap.

Expected Behavior

After this fix:

  1. @tdd_expected_fail is removed from features/tdd_context_tier_runtime.feature (bug #821).
  2. @tdd_expected_fail is removed from features/tdd_plan_apply_yes_flag.feature (bug #932).
  3. @tdd_bug and @tdd_bug_821 / @tdd_bug_932 tags remain as permanent regression markers.
  4. The tests run normally (without inversion) and pass because the bugs are fixed.

Acceptance Criteria

  • @tdd_expected_fail tag removed from features/tdd_context_tier_runtime.feature.
  • @tdd_expected_fail tag removed from features/tdd_plan_apply_yes_flag.feature.
  • @tdd_bug and @tdd_bug_821 / @tdd_bug_932 tags remain in place.
  • All tests pass without the @tdd_expected_fail tag (confirming the bugs are fixed).
  • CI passes.

Definition of Done

This issue is complete when:

  • All subtasks below are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.

Subtasks

  • Code: Remove @tdd_expected_fail from features/tdd_context_tier_runtime.feature (line 1 or feature-level tag).
  • Code: Remove @tdd_expected_fail from features/tdd_plan_apply_yes_flag.feature (line 1 or feature-level tag).
  • Code: Verify @tdd_bug and @tdd_bug_821 / @tdd_bug_932 remain in the files.
  • Quality: Run nox -s unit_tests and verify the tests pass without the @tdd_expected_fail tag.
  • Quality: Run nox (all default sessions), fix any errors if needed ensuring nox passes across entire code base, do not ignore any failure even if it seems unrelated to this commit, fix it.
## Metadata - **Commit Message**: `fix(test): remove lingering @tdd_expected_fail tags for closed bugs #821 and #932` - **Branch**: `feature/m3-tdd-tag-cleanup-821-932` ## Background and Context During the Day 50 planning audit, it was discovered that bugs #821 (ACMS context tier runtime) and #932 (plan apply --yes flag) have been **fixed and closed** on Forgejo, but their `@tdd_expected_fail` tags were **not removed** from the test files during the bug fix process. This violates the TDD workflow defined in `CONTRIBUTING.md`: > The fix is implemented and the `@tdd_expected_fail` tag is removed from the test (leaving `@tdd_bug` and `@tdd_bug_<N>` in place as permanent references). These lingering tags cause the tests to run in inverted mode — they "pass" CI by expecting the underlying assertion to fail, but since the bugs are now fixed, the assertions actually pass, causing the inverted result to be a failure. If CI is not currently failing, it means these tests are either being skipped or the tag inversion mechanism has a gap. ## Expected Behavior After this fix: 1. `@tdd_expected_fail` is removed from `features/tdd_context_tier_runtime.feature` (bug #821). 2. `@tdd_expected_fail` is removed from `features/tdd_plan_apply_yes_flag.feature` (bug #932). 3. `@tdd_bug` and `@tdd_bug_821` / `@tdd_bug_932` tags remain as permanent regression markers. 4. The tests run normally (without inversion) and pass because the bugs are fixed. ## Acceptance Criteria - [x] `@tdd_expected_fail` tag removed from `features/tdd_context_tier_runtime.feature`. - [x] `@tdd_expected_fail` tag removed from `features/tdd_plan_apply_yes_flag.feature`. - [x] `@tdd_bug` and `@tdd_bug_821` / `@tdd_bug_932` tags remain in place. - [x] All tests pass without the `@tdd_expected_fail` tag (confirming the bugs are fixed). - [x] CI passes. ## Definition of Done This issue is complete when: - All subtasks below are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. ## Subtasks - [x] Code: Remove `@tdd_expected_fail` from `features/tdd_context_tier_runtime.feature` (line 1 or feature-level tag). - [x] Code: Remove `@tdd_expected_fail` from `features/tdd_plan_apply_yes_flag.feature` (line 1 or feature-level tag). - [x] Code: Verify `@tdd_bug` and `@tdd_bug_821` / `@tdd_bug_932` remain in the files. - [x] Quality: Run `nox -s unit_tests` and verify the tests pass without the `@tdd_expected_fail` tag. - [x] Quality: Run `nox` (all default sessions), fix any errors if needed ensuring nox passes across **entire** code base, do not ignore any failure even if it seems unrelated to this commit, fix it.
freemo added this to the v3.2.0 milestone 2026-03-30 05:16:20 +00:00
Member

Implementation Notes — Initial Investigation

Current state of files on master

features/tdd_context_tier_runtime.feature (bug #821):

  • Tag line: @tdd_issue @tdd_issue_821 @mock_only
  • The @tdd_expected_fail tag is already absent from the tag line.
  • However, the feature description (lines 19–21) still references @tdd_expected_fail:

    "These tests assert the expected runtime behaviour and will FAIL until the bug is fixed. The @tdd_expected_fail tag inverts the result so CI passes."

  • This description is stale — bug #821 is fixed (closed 2026-03-25) and the @tdd_expected_fail tag is not present.

features/steps/tdd_context_tier_runtime_steps.py (step definitions for #821):

  • Module docstring (lines 18–20) also references @tdd_expected_fail:

    "The assertions in these steps will fail until the bug is fixed, proving the bug exists. The @tdd_expected_fail tag inverts the result so CI passes."

  • This is also stale.

features/tdd_plan_apply_yes_flag.feature (bug #932):

  • Tag line: @tdd_issue @tdd_issue_932
  • The @tdd_expected_fail tag is already absent.
  • No stale references to @tdd_expected_fail in the description.

features/steps/tdd_plan_apply_yes_flag_steps.py (step definitions for #932):

  • No references to @tdd_expected_fail.

Tag naming convention

The issue acceptance criteria reference @tdd_bug / @tdd_bug_<N> as permanent tags. However, per CONTRIBUTING.md (TDD Issue Test Tags section), the correct permanent tags are @tdd_issue / @tdd_issue_<N>. Both files already use the correct @tdd_issue naming. No tag rename is needed.

Plan

  1. Update the stale description in features/tdd_context_tier_runtime.feature to reflect that the bug is fixed and the test now runs normally as a regression guard.
  2. Update the stale docstring in features/steps/tdd_context_tier_runtime_steps.py similarly.
  3. Verify all tests pass without @tdd_expected_fail (since it's already absent, tests should already run normally).
  4. Run full nox suite to confirm CI passes.
## Implementation Notes — Initial Investigation ### Current state of files on `master` **`features/tdd_context_tier_runtime.feature`** (bug #821): - Tag line: `@tdd_issue @tdd_issue_821 @mock_only` - The `@tdd_expected_fail` tag is **already absent** from the tag line. - However, the feature description (lines 19–21) still references `@tdd_expected_fail`: > "These tests assert the expected runtime behaviour and will FAIL until the bug is fixed. The @tdd_expected_fail tag inverts the result so CI passes." - This description is **stale** — bug #821 is fixed (closed 2026-03-25) and the `@tdd_expected_fail` tag is not present. **`features/steps/tdd_context_tier_runtime_steps.py`** (step definitions for #821): - Module docstring (lines 18–20) also references `@tdd_expected_fail`: > "The assertions in these steps will **fail** until the bug is fixed, proving the bug exists. The ``@tdd_expected_fail`` tag inverts the result so CI passes." - This is also **stale**. **`features/tdd_plan_apply_yes_flag.feature`** (bug #932): - Tag line: `@tdd_issue @tdd_issue_932` - The `@tdd_expected_fail` tag is **already absent**. - No stale references to `@tdd_expected_fail` in the description. **`features/steps/tdd_plan_apply_yes_flag_steps.py`** (step definitions for #932): - No references to `@tdd_expected_fail`. ### Tag naming convention The issue acceptance criteria reference `@tdd_bug` / `@tdd_bug_<N>` as permanent tags. However, per CONTRIBUTING.md (TDD Issue Test Tags section), the correct permanent tags are `@tdd_issue` / `@tdd_issue_<N>`. Both files already use the correct `@tdd_issue` naming. No tag rename is needed. ### Plan 1. Update the stale description in `features/tdd_context_tier_runtime.feature` to reflect that the bug is fixed and the test now runs normally as a regression guard. 2. Update the stale docstring in `features/steps/tdd_context_tier_runtime_steps.py` similarly. 3. Verify all tests pass without `@tdd_expected_fail` (since it's already absent, tests should already run normally). 4. Run full `nox` suite to confirm CI passes.
Member

Quality Gate Results

All nox sessions passed (run individually due to timeout on full suite):

Session Result
lint PASS
format PASS
typecheck PASS
security_scan PASS
dead_code PASS
unit_tests-3.13 PASS (508 features, 12985 scenarios, 0 failures)
integration_tests-3.13 PASS
docs PASS
build-3.13 PASS
benchmark PASS
coverage_report PASS (97%, meets ≥97% threshold)

Changes made

  1. features/tdd_context_tier_runtime.feature: Updated stale feature description that referenced @tdd_expected_fail tag and described the bug as unfixed. The @tdd_expected_fail tag was already absent from the tag line; the tag line retains the correct permanent tags @tdd_issue @tdd_issue_821 @mock_only.

  2. features/steps/tdd_context_tier_runtime_steps.py: Updated stale module docstring that referenced @tdd_expected_fail tag and described the bug as unfixed.

  3. features/tdd_plan_apply_yes_flag.feature: No changes needed — the @tdd_expected_fail tag was already absent and no stale descriptions existed. The tag line retains the correct permanent tags @tdd_issue @tdd_issue_932.

Note on tag naming

The issue acceptance criteria reference @tdd_bug / @tdd_bug_<N> as permanent tags. Per CONTRIBUTING.md (TDD Issue Test Tags section), the correct permanent tag naming is @tdd_issue / @tdd_issue_<N>. Both files already use the correct naming convention.

## Quality Gate Results All nox sessions passed (run individually due to timeout on full suite): | Session | Result | |---------|--------| | `lint` | ✅ PASS | | `format` | ✅ PASS | | `typecheck` | ✅ PASS | | `security_scan` | ✅ PASS | | `dead_code` | ✅ PASS | | `unit_tests-3.13` | ✅ PASS (508 features, 12985 scenarios, 0 failures) | | `integration_tests-3.13` | ✅ PASS | | `docs` | ✅ PASS | | `build-3.13` | ✅ PASS | | `benchmark` | ✅ PASS | | `coverage_report` | ✅ PASS (97%, meets ≥97% threshold) | ### Changes made 1. **`features/tdd_context_tier_runtime.feature`**: Updated stale feature description that referenced `@tdd_expected_fail` tag and described the bug as unfixed. The `@tdd_expected_fail` tag was already absent from the tag line; the tag line retains the correct permanent tags `@tdd_issue @tdd_issue_821 @mock_only`. 2. **`features/steps/tdd_context_tier_runtime_steps.py`**: Updated stale module docstring that referenced `@tdd_expected_fail` tag and described the bug as unfixed. 3. **`features/tdd_plan_apply_yes_flag.feature`**: No changes needed — the `@tdd_expected_fail` tag was already absent and no stale descriptions existed. The tag line retains the correct permanent tags `@tdd_issue @tdd_issue_932`. ### Note on tag naming The issue acceptance criteria reference `@tdd_bug` / `@tdd_bug_<N>` as permanent tags. Per CONTRIBUTING.md (TDD Issue Test Tags section), the correct permanent tag naming is `@tdd_issue` / `@tdd_issue_<N>`. Both files already use the correct naming convention.
Author
Owner

PR #1229 reviewed, approved, and merged.

PR #1229 reviewed, approved, and merged.
freemo self-assigned this 2026-04-02 06:13:48 +00:00
Author
Owner

PR #1229 reviewed, approved, and merged.

Review summary: Verified both bugs #821 and #932 are closed. The @tdd_expected_fail tag was already absent from the actual Behave tag lines — the PR correctly cleaned up stale descriptive text that still referenced the tag and described the bugs as unfixed. Permanent @tdd_issue / @tdd_issue_<N> tags remain in place per CONTRIBUTING.md. All quality gates reported passing.

Note: Pre-existing # type: ignore[arg-type] found in features/steps/tdd_context_tier_runtime_steps.py line 48 — not introduced by this PR, should be tracked separately.

PR #1229 reviewed, approved, and merged. **Review summary**: Verified both bugs #821 and #932 are closed. The `@tdd_expected_fail` tag was already absent from the actual Behave tag lines — the PR correctly cleaned up stale descriptive text that still referenced the tag and described the bugs as unfixed. Permanent `@tdd_issue` / `@tdd_issue_<N>` tags remain in place per CONTRIBUTING.md. All quality gates reported passing. **Note**: Pre-existing `# type: ignore[arg-type]` found in `features/steps/tdd_context_tier_runtime_steps.py` line 48 — not introduced by this PR, should be tracked separately.
Author
Owner

PR #1229 reviewed, approved, and merged.

All acceptance criteria verified:

  • @tdd_expected_fail stale references removed from features/tdd_context_tier_runtime.feature description
  • @tdd_expected_fail stale references removed from features/steps/tdd_context_tier_runtime_steps.py docstring
  • features/tdd_plan_apply_yes_flag.feature confirmed clean (no changes needed)
  • Permanent @tdd_issue / @tdd_issue_821 / @tdd_issue_932 tags retained
  • All quality gates passing (508 features, 12985 scenarios, 97% coverage)
PR #1229 reviewed, approved, and merged. All acceptance criteria verified: - ✅ `@tdd_expected_fail` stale references removed from `features/tdd_context_tier_runtime.feature` description - ✅ `@tdd_expected_fail` stale references removed from `features/steps/tdd_context_tier_runtime_steps.py` docstring - ✅ `features/tdd_plan_apply_yes_flag.feature` confirmed clean (no changes needed) - ✅ Permanent `@tdd_issue` / `@tdd_issue_821` / `@tdd_issue_932` tags retained - ✅ All quality gates passing (508 features, 12985 scenarios, 97% coverage)
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#1206
No description provided.