test(e2e): TDD failing tests for E2E mock-only coverage (bug #658) #738
No reviewers
Labels
No labels
auto/needs-reevaluation
controller-managed
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cleveragents/cleveragents-core!738
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "tdd/m6-e2e-mock-only-coverage"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
TDD counterpart for bug #658. Adds failing tests that demonstrate M1-M6 E2E verification suites use mocked
CliRunnerinvocations instead of realsubprocess.runcalls against theagentsCLI binary.Closes #697
Refs: #658
Test Coverage
Behave (3 scenarios)
features/tdd_e2e_mock_only_coverage.feature— 3 scenarios tagged@tdd_bug @tdd_bug_658 @tdd_expected_fail:helper_m1_e2e_verification.pylooking forsubprocess.runcallsRobot Framework (3 test cases)
robot/tdd_e2e_mock_only_coverage.robot— 3 test cases taggedtdd_bug,tdd_bug_658,tdd_expected_fail:Detection Method
Both Behave step definitions and Robot helper use AST analysis to parse the Python helper files and detect:
subprocess.run(...)calls withagentsin argumentsrun_cli(...)calls (the shared helper fromhelper_e2e_common.py)All 6 tests are tagged
@tdd_expected_failand are expected to fail on the currentmasterbranch. The companion bugfix PR #784 removes the@tdd_expected_failtags after converting the helpers to use real subprocess invocations.TDD Workflow
Per CONTRIBUTING.md: this TDD branch must merge to master first, then the bugfix branch (#784) implements the fix and removes
@tdd_expected_fail.Review — PR #738: test(e2e): TDD failing tests for E2E mock-only coverage (bug #658)
Diff Summary
features/tdd_e2e_mock_only_coverage.feature(new, 37 lines)features/steps/tdd_e2e_mock_only_coverage_steps.py(new, 257 lines)robot/tdd_e2e_mock_only_coverage.robot(new, 44 lines)robot/helper_tdd_e2e_mock_only_coverage.py(new, 254 lines)Commit Message Compliance
test(e2e): TDD failing tests for E2E mock-only coverage (bug #658)Closes Keyword
Closes #658keyword anywhere. The title referencesbug #658but that is not a recognized auto-close syntax.Label Compliance
Type/TestingPriority/CriticalMoSCoW/Must have)PR Body
Test Coverage
.featurefile with step definitions — good..robotfile with helper — good.@tdd_expected_fail/tdd_expected_failtagging pattern correctly handles the TDD inversion (tests pass CI while the bug exists, fail once fixed).Code Quality
FunctionAnalysisdataclass and helper functions (_is_cli_runner_invoke,_is_patch_call, etc.) are clean and well-documented.features/steps/tdd_e2e_mock_only_coverage_steps.pyandrobot/helper_tdd_e2e_mock_only_coverage.py— theFunctionAnalysisdataclass,_analyze_helper(), and all AST utility functions are copy-pasted. Consider extracting the shared analysis logic into a common module (e.g.,cleveragents/testing/e2e_mock_audit.py) and importing from both the Behave steps and the Robot helper. This reduces maintenance burden and prevents the two copies from diverging._SERVICE_MOCK_INDICATORSfrozenset is identical in both files — another reason to share code.Required Changes
Closes #658(or appropriate keyword) to the PR body.MoSCoW/Must havelabel to the PR.Suggestion (non-blocking)
brent.edwards referenced this pull request2026-03-12 20:42:43 +00:00
Response to Review #2172 (@freemo)
All 3 required changes addressed:
Closeskeyword: PR body now includesCloses #697(the TDD tracking issue) andRefs: #658(the parent bug). Per TDD workflow, it's PR #784 (the fix) thatCloses #658— this PR closes the TDD issue #697.MoSCoW/Must havelabel: Already present on the PR.Re: suggestion #4 (extract duplicated AST analysis code) — acknowledged. This is a valid DRY improvement. Given this is a TDD diagnostic PR with a short lifespan (will be superseded by #784's fix removing
@tdd_expected_fail), I'd prefer to address it as a follow-up to keep this PR focused on the TDD tests. The duplication is between the Behave steps and Robot helper, which are in different test frameworks with different import paths — a shared module is the right approach but adds complexity to the build for what are disposable diagnostic tests.