test: add TDD bug-capture test for #988 — ReactiveEventBus.emit swallows exceptions #1106
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.
Blocks
#1093 TDD: Write failing test for #988 — ReactiveEventBus.emit() swallows exception details
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core!1106
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "tdd/m5-event-bus-exception-swallow"
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
Add a TDD bug-capture Behave scenario that proves bug #988 exists:
ReactiveEventBus.emit()exception handler logs onlytype(exc).__name__(e.g., "ValueError") without the exception message (str(exc)) or traceback (exc_info=True). When a subscriber fails, the log contains zero diagnostic detail, making production debugging impossible.What was done
features/tdd_event_bus_exception_swallow.feature— tagged@tdd_expected_fail @tdd_bug @tdd_bug_988features/steps/tdd_event_bus_exception_swallow_steps.py— subscribes a handler that raisesValueError("detailed error message for debugging"), emits an event, captures the structlog warning viastructlog.testing.capture_logs(), and asserts:exc_infokey is present and truthy, confirming traceback logging (scenario 2)CHANGELOG.mdwith the new entryHow the test works
ReactiveEventBusis created with a subscriber that raisesValueErrorwith a distinctive messageemit()exception handler catches the error and logs a warning via structlogexc_info(traceback), per bug #988's acceptance criteria requiringexc_info=Truetype(exc).__name__— confirming the bug@tdd_expected_failtag inverts these failures to CI passesTest verification
nox -s unit_tests✅ passes (462 features, 12,232 scenarios passed, 0 failed)@tdd_bug_988has corresponding@tdd_bug, and@tdd_expected_failhas bothnox -s lint✅ passesnox -s typecheck✅ passes (0 errors on changed files)Review fixes applied
master(5f5ef891) to eliminate unrelateddocs/timeline.mdregression that was overwriting Day 42 data with stale Day 39 contentctx→contextacross all step functions to match project convention (97%+ of codebase usescontext)step_then_log_contains_tracebackstep that verifies theexc_info=Truerequirement from bug #988 acceptance criteria# type: ignore[import-untyped]on behave imports is the established project convention (106+ files); no change neededRobot test
N/A — this is a purely unit-level concern (testing a single class's internal error handling, no external services or IPC involved).
Closes #1093
Review: REQUEST CHANGES (minor)
Issue Found:
tdd/m5-event-bus-exception-swallowbut milestone v3.5.0 corresponds to M6 (Autonomy Hardening), not M5. Per thetdd/mN-naming convention, this should betdd/m6-event-bus-exception-swallow.Everything else is excellent:
@tdd_expected_fail @tdd_bug @tdd_bug_988all correctfeatures/andfeatures/steps/Closes #1093presentThis is otherwise an exemplary TDD PR. The only fix needed is the branch name prefix (
m5→m6).Day 43 Review — PR #1106
test: TDD for #988 — ReactiveEventBus.emit swallows exceptionsVerdict: APPROVED
TDD Verification
This is a TDD PR capturing bug #988. Standard TDD review checklist:
@tdd_bug,@tdd_bug_988,@tdd_expected_fail)test:prefixThe PR is mergeable with no conflicts. Once merged, the corresponding bug fix branch can be created from
master.@hamza.khyari — Please review and approve for second approval.
850f100a6420bbd995d0New commits pushed, approval review dismissed automatically according to repository settings
20bbd995d0eb9e8ba4feReview: APPROVED
TDD tags correct (
@tdd_bug @tdd_bug_988 @tdd_expected_fail). Behave steps fully implemented for ReactiveEventBus.emit exception swallowing bug. CHANGELOG entry present.Note
Missing Robot Framework integration tests. Consider adding in a follow-up for consistency.
New commits pushed, approval review dismissed automatically according to repository settings