UAT: PR #2629 incomplete — 6 step files still missing use_step_matcher('parse') reset #2781

Closed
opened 2026-04-04 19:26:34 +00:00 by freemo · 2 comments
Owner

Metadata

  • Branch: fix/uat-2629-step-matcher-reset-missing
  • Commit Message: fix(ci): add missing use_step_matcher('parse') reset to 6 step files
  • Milestone: v3.2.0
  • Parent Epic: #1678

Background and Context

PR #2629 (fix/master-ci-quality-gates) was submitted to restore all CI quality gates to passing on master. Its description explicitly states:

"All step files using use_step_matcher('re') now reset to 'parse' at end to prevent global matcher state leaking"

UAT testing of this PR found that this claim is incomplete — 6 step files that are part of the PR's changed files still use use_step_matcher("re") without a subsequent use_step_matcher("parse") reset at the end of the file.

Current Behavior (if applicable)

The following 6 files use use_step_matcher("re") but do NOT reset to use_step_matcher("parse") at the end:

  1. features/steps/a2a_facade_coverage_boost_steps.py (line 29)
  2. features/steps/a2a_facade_coverage_steps.py (line 48)
  3. features/steps/a2a_facade_steps.py (line 33)
  4. features/steps/a2a_facade_wiring_steps.py (line 32)
  5. features/steps/postgresql_analyzer_coverage_boost_steps.py (line 18)
  6. features/steps/server_client_stubs_steps.py (line 23)

When behave loads step files in parallel or in sequence, a use_step_matcher("re") call at module level changes the global step matcher state. If the file does not reset to use_step_matcher("parse") at the end, all subsequently loaded step files will use the re matcher instead of the default parse matcher. This causes:

  • Step definitions in other files that use parse-style patterns (e.g., "{variable}") to fail to match
  • Intermittent test failures depending on step file load order
  • Parallel test interference (the root cause this PR was supposed to fix)

Expected Behavior

Per the PR's own stated fix, ALL step files that use use_step_matcher("re") should reset to use_step_matcher("parse") at the end of the file. The correct pattern (already applied to a2a_jsonrpc_wire_format_steps.py) is:

use_step_matcher("re")
# ... step definitions using regex patterns ...
# Reset step matcher to parse (default) so subsequent step files are not affected
use_step_matcher("parse")

Acceptance Criteria

  • a2a_facade_coverage_boost_steps.py ends with use_step_matcher("parse") and explanatory comment
  • a2a_facade_coverage_steps.py ends with use_step_matcher("parse") and explanatory comment
  • a2a_facade_steps.py ends with use_step_matcher("parse") and explanatory comment
  • a2a_facade_wiring_steps.py ends with use_step_matcher("parse") and explanatory comment
  • postgresql_analyzer_coverage_boost_steps.py ends with use_step_matcher("parse") and explanatory comment
  • server_client_stubs_steps.py ends with use_step_matcher("parse") and explanatory comment
  • grep -rn "use_step_matcher" features/steps/*.py confirms every use_step_matcher("re") is followed by a use_step_matcher("parse") reset in the same file
  • All nox stages pass after the fix

Supporting Information

  • Blocking PR: #2629 (fix/master-ci-quality-gates)
  • Parent Epic: #1678 (CI Execution Time Optimization — Timeouts, Concurrency, and Coverage Artifact Sharing)
  • Reference file with correct pattern: features/steps/a2a_jsonrpc_wire_format_steps.py

Steps to Reproduce:

grep -rn "use_step_matcher" features/steps/*.py | grep -v ".pyc"

Compare files that have use_step_matcher("re") against those that also have a subsequent use_step_matcher("parse").


Subtasks

  • Add use_step_matcher("parse") + reset comment to a2a_facade_coverage_boost_steps.py
  • Add use_step_matcher("parse") + reset comment to a2a_facade_coverage_steps.py
  • Add use_step_matcher("parse") + reset comment to a2a_facade_steps.py
  • Add use_step_matcher("parse") + reset comment to a2a_facade_wiring_steps.py
  • Add use_step_matcher("parse") + reset comment to postgresql_analyzer_coverage_boost_steps.py
  • Add use_step_matcher("parse") + reset comment to server_client_stubs_steps.py
  • Verify with grep that no step files remain without the reset
  • Run nox (all default sessions), fix any errors
  • Verify coverage >= 97% via nox -s coverage_report

Definition of Done

This issue is complete when:

  • All subtasks above 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.
  • All nox stages pass
  • Coverage >= 97%

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-new-issue-creator

## Metadata - **Branch**: `fix/uat-2629-step-matcher-reset-missing` - **Commit Message**: `fix(ci): add missing use_step_matcher('parse') reset to 6 step files` - **Milestone**: v3.2.0 - **Parent Epic**: #1678 --- ### Background and Context PR #2629 (`fix/master-ci-quality-gates`) was submitted to restore all CI quality gates to passing on master. Its description explicitly states: > "All step files using `use_step_matcher('re')` now reset to `'parse'` at end to prevent global matcher state leaking" UAT testing of this PR found that this claim is **incomplete** — 6 step files that are part of the PR's changed files still use `use_step_matcher("re")` without a subsequent `use_step_matcher("parse")` reset at the end of the file. ### Current Behavior (if applicable) The following 6 files use `use_step_matcher("re")` but do **NOT** reset to `use_step_matcher("parse")` at the end: 1. `features/steps/a2a_facade_coverage_boost_steps.py` (line 29) 2. `features/steps/a2a_facade_coverage_steps.py` (line 48) 3. `features/steps/a2a_facade_steps.py` (line 33) 4. `features/steps/a2a_facade_wiring_steps.py` (line 32) 5. `features/steps/postgresql_analyzer_coverage_boost_steps.py` (line 18) 6. `features/steps/server_client_stubs_steps.py` (line 23) When behave loads step files in parallel or in sequence, a `use_step_matcher("re")` call at module level changes the **global** step matcher state. If the file does not reset to `use_step_matcher("parse")` at the end, all subsequently loaded step files will use the `re` matcher instead of the default `parse` matcher. This causes: - Step definitions in other files that use `parse`-style patterns (e.g., `"{variable}"`) to fail to match - Intermittent test failures depending on step file load order - Parallel test interference (the root cause this PR was supposed to fix) ### Expected Behavior Per the PR's own stated fix, ALL step files that use `use_step_matcher("re")` should reset to `use_step_matcher("parse")` at the end of the file. The correct pattern (already applied to `a2a_jsonrpc_wire_format_steps.py`) is: ```python use_step_matcher("re") # ... step definitions using regex patterns ... # Reset step matcher to parse (default) so subsequent step files are not affected use_step_matcher("parse") ``` ### Acceptance Criteria - [ ] `a2a_facade_coverage_boost_steps.py` ends with `use_step_matcher("parse")` and explanatory comment - [ ] `a2a_facade_coverage_steps.py` ends with `use_step_matcher("parse")` and explanatory comment - [ ] `a2a_facade_steps.py` ends with `use_step_matcher("parse")` and explanatory comment - [ ] `a2a_facade_wiring_steps.py` ends with `use_step_matcher("parse")` and explanatory comment - [ ] `postgresql_analyzer_coverage_boost_steps.py` ends with `use_step_matcher("parse")` and explanatory comment - [ ] `server_client_stubs_steps.py` ends with `use_step_matcher("parse")` and explanatory comment - [ ] `grep -rn "use_step_matcher" features/steps/*.py` confirms every `use_step_matcher("re")` is followed by a `use_step_matcher("parse")` reset in the same file - [ ] All nox stages pass after the fix ### Supporting Information - Blocking PR: #2629 (`fix/master-ci-quality-gates`) - Parent Epic: #1678 (CI Execution Time Optimization — Timeouts, Concurrency, and Coverage Artifact Sharing) - Reference file with correct pattern: `features/steps/a2a_jsonrpc_wire_format_steps.py` **Steps to Reproduce:** ```bash grep -rn "use_step_matcher" features/steps/*.py | grep -v ".pyc" ``` Compare files that have `use_step_matcher("re")` against those that also have a subsequent `use_step_matcher("parse")`. --- ## Subtasks - [ ] Add `use_step_matcher("parse")` + reset comment to `a2a_facade_coverage_boost_steps.py` - [ ] Add `use_step_matcher("parse")` + reset comment to `a2a_facade_coverage_steps.py` - [ ] Add `use_step_matcher("parse")` + reset comment to `a2a_facade_steps.py` - [ ] Add `use_step_matcher("parse")` + reset comment to `a2a_facade_wiring_steps.py` - [ ] Add `use_step_matcher("parse")` + reset comment to `postgresql_analyzer_coverage_boost_steps.py` - [ ] Add `use_step_matcher("parse")` + reset comment to `server_client_stubs_steps.py` - [ ] Verify with `grep` that no step files remain without the reset - [ ] Run `nox` (all default sessions), fix any errors - [ ] Verify coverage >= 97% via `nox -s coverage_report` --- ## Definition of Done This issue is complete when: - All subtasks above 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. - All nox stages pass - Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.2.0 milestone 2026-04-04 19:26:40 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: High — Missing use_step_matcher("parse") resets cause intermittent test failures due to global matcher state leaking between step files. This is a CI stability issue.
  • Milestone: v3.2.0 (already set)
  • MoSCoW: Should Have — PR #2629 explicitly claimed to fix this pattern but missed 6 files. The fix is straightforward (add one line to each file) and prevents flaky test failures.
  • Parent Epic: #1678 (CI Execution Time Optimization)

This should be addressed as part of the PR #2629 follow-up work. Low effort, high impact for CI stability.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: High — Missing `use_step_matcher("parse")` resets cause intermittent test failures due to global matcher state leaking between step files. This is a CI stability issue. - **Milestone**: v3.2.0 (already set) - **MoSCoW**: Should Have — PR #2629 explicitly claimed to fix this pattern but missed 6 files. The fix is straightforward (add one line to each file) and prevents flaky test failures. - **Parent Epic**: #1678 (CI Execution Time Optimization) This should be addressed as part of the PR #2629 follow-up work. Low effort, high impact for CI stability. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Author
Owner

State label reconciliation:

  • Previous state: State/Verified
  • Corrected to: State/Completed
  • Reason: Issue is closed but had a non-terminal state label. Per CONTRIBUTING.md, closed issues must have State/Completed or State/Wont Do.

Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: ca-backlog-groomer

State label reconciliation: - Previous state: `State/Verified` - Corrected to: `State/Completed` - Reason: Issue is closed but had a non-terminal state label. Per CONTRIBUTING.md, closed issues must have `State/Completed` or `State/Wont Do`. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: ca-backlog-groomer
Sign in to join this conversation.
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#2781
No description provided.