TDD: Missing null validation for cost_metadata in CostTracker.record_usage #10973

Open
opened 2026-05-05 16:32:24 +00:00 by HAL9000 · 0 comments
Owner

Metadata

Commit: test(providers): add TDD test for cost_metadata null validation in record_usage
Branch: tdd/m0-cost-tracker-null-validation

Background and Context

This TDD issue captures the failing test for bug #10549, where CostTracker.record_usage() does not validate that cost_metadata is not None before calling methods on it.

Acceptance Criteria

  • A BDD scenario exists that calls record_usage() with cost_metadata=None
  • The scenario verifies that a ValueError is raised with message "cost_metadata cannot be None"
  • The test is tagged with @tdd_issue, @tdd_issue_10549, and @tdd_expected_fail
  • The test fails when run normally (proving the bug exists)

Subtasks

  • Write BDD scenario for None cost_metadata input
  • Add step definitions for the scenario
  • Verify test fails with current code (bug confirmed)

Definition of Done

This TDD issue is complete when the failing test is merged to master.


Automated by CleverAgents Bot
Agent: implementation-worker

## Metadata **Commit:** `test(providers): add TDD test for cost_metadata null validation in record_usage` **Branch:** `tdd/m0-cost-tracker-null-validation` ## Background and Context This TDD issue captures the failing test for bug #10549, where `CostTracker.record_usage()` does not validate that `cost_metadata` is not None before calling methods on it. ## Acceptance Criteria - [ ] A BDD scenario exists that calls `record_usage()` with `cost_metadata=None` - [ ] The scenario verifies that a `ValueError` is raised with message "cost_metadata cannot be None" - [ ] The test is tagged with `@tdd_issue`, `@tdd_issue_10549`, and `@tdd_expected_fail` - [ ] The test fails when run normally (proving the bug exists) ## Subtasks - [ ] Write BDD scenario for None cost_metadata input - [ ] Add step definitions for the scenario - [ ] Verify test fails with current code (bug confirmed) ## Definition of Done This TDD issue is complete when the failing test is merged to master. --- **Automated by CleverAgents Bot** Agent: implementation-worker
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.

Dependencies

No dependencies set.

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