fix(test): remove retry masking and output filtering in database integration test #898

Closed
opened 2026-03-13 23:47:16 +00:00 by freemo · 0 comments
Owner

Metadata

  • Commit Message: fix(test): remove retry masking and output filtering in database integration test
  • Branch: fix/integration-db-retry-masking

Background

The database integration test (robot/database_integration.robot, 795 lines) contains two failure-masking patterns in its Run Python Script keyword (lines 760–795).

Problems Identified

  1. Retry masking (lines 766–771): When a script produces empty stdout and a non-zero return code, the keyword silently retries once. This masks intermittent bugs — a flaky test that sometimes fails will appear to always pass. The retry hides the first failure without logging it or raising a warning.

  2. Output filtering (line 785): Before returning stdout, the keyword filters out lines containing [debug, [info, [warning, [error prefixes. While the intent is to strip log noise, this also discards lines that contain the literal strings [error or [warning in actual output — potentially hiding error indicators from assertions.

Acceptance Criteria

  • Lines 766–771: Silent retry is removed — a non-zero RC on first attempt should fail immediately with a clear error
  • Line 785: Output filtering either removed entirely or narrowed to only strip lines that are clearly log framework noise (not application output containing those substrings)
  • If the retry was masking a real intermittent issue, that issue should be documented as a separate bug rather than hidden
  • nox -s integration_tests passes

Subtasks

  • Remove the silent retry logic (lines 766–771) from Run Python Script
  • Evaluate output filtering on line 785 — remove or narrow the filter to avoid discarding meaningful output
  • Run nox -s integration_tests and verify the test suite passes
  • If any tests fail after removing retry, document the root cause and file a separate bug if needed
  • 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.
## Metadata - **Commit Message**: `fix(test): remove retry masking and output filtering in database integration test` - **Branch**: `fix/integration-db-retry-masking` ## Background The database integration test (`robot/database_integration.robot`, 795 lines) contains two failure-masking patterns in its `Run Python Script` keyword (lines 760–795). ### Problems Identified 1. **Retry masking** (lines 766–771): When a script produces empty stdout and a non-zero return code, the keyword silently retries once. This masks intermittent bugs — a flaky test that sometimes fails will appear to always pass. The retry hides the first failure without logging it or raising a warning. 2. **Output filtering** (line 785): Before returning stdout, the keyword filters out lines containing `[debug`, `[info`, `[warning`, `[error` prefixes. While the intent is to strip log noise, this also discards lines that contain the literal strings `[error` or `[warning` in actual output — potentially hiding error indicators from assertions. ## Acceptance Criteria - [ ] Lines 766–771: Silent retry is removed — a non-zero RC on first attempt should fail immediately with a clear error - [ ] Line 785: Output filtering either removed entirely or narrowed to only strip lines that are clearly log framework noise (not application output containing those substrings) - [ ] If the retry was masking a real intermittent issue, that issue should be documented as a separate bug rather than hidden - [ ] `nox -s integration_tests` passes ## Subtasks - [ ] Remove the silent retry logic (lines 766–771) from `Run Python Script` - [ ] Evaluate output filtering on line 785 — remove or narrow the filter to avoid discarding meaningful output - [ ] Run `nox -s integration_tests` and verify the test suite passes - [ ] If any tests fail after removing retry, document the root cause and file a separate bug if needed - [ ] 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.
freemo added this to the v3.2.0 milestone 2026-03-13 23:47:16 +00:00
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#898
No description provided.