TDD: agents session list DI container missing db provider test #630

Closed
opened 2026-03-07 23:02:25 +00:00 by freemo · 1 comment
Owner

Metadata

  • Commit Message: test(session): add TDD failing tests for session list DI error
  • Branch: tdd/session-list-di-error

Parent

Bug: #554agents session list causes an error

Background and Context

Per CONTRIBUTING.md TDD Bug Fix Workflow, every Type/Bug issue requires a Type/Testing counterpart with intentionally-failing tests that reproduce the bug. The bug fix (#554) depends on this TDD issue being completed first.

Bug #554 root cause: _get_session_service() at session.py:65-66 calls container.db(), but the Container class has no db provider. All session CLI commands fail with AttributeError: 'DynamicContainer' object has no attribute 'db'.

Note: TDD tests already exist in PR #596 (opened by @brent.edwards). This issue is the formal tracking counterpart required by CONTRIBUTING.md.

Acceptance Criteria

  • Behave BDD scenarios tagged @tdd_bug @tdd_bug_554 @tdd_expected_fail that exercise the real _get_session_service() DI path
  • Robot Framework integration smoke tests for session list lifecycle
  • ASV benchmark with session list performance tracker
  • Tests fail (as expected) until bug #554 is fixed
  • Tests use file-based SQLite with fresh session factory per CLI invocation

Subtasks

  • Implement @tdd_expected_fail tag handling in Behave environment.py (infrastructure needed for all TDD issues)
  • Write Behave BDD scenarios for session list DI error
  • Write Robot Framework integration smoke tests
  • Write ASV benchmark for session list performance
  • Verify coverage >=97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

Dependencies

  • Blocked by: #627 (Behave TDD tag handler), #628 (Robot TDD tag handler) — TDD infrastructure
    • Resolution: Implementing @tdd_expected_fail infrastructure as a subtask within this issue
  • Blocks: #554 (bug fix should not merge until TDD tests exist)

Definition of Done

This issue is complete when TDD tests that reproduce bug #554 are merged to master. The tests should fail when the bug is present and pass when the fix is applied.

## Metadata - **Commit Message**: `test(session): add TDD failing tests for session list DI error` - **Branch**: `tdd/session-list-di-error` ## Parent Bug: #554 — `agents session list` causes an error ## Background and Context Per CONTRIBUTING.md TDD Bug Fix Workflow, every Type/Bug issue requires a Type/Testing counterpart with intentionally-failing tests that reproduce the bug. The bug fix (#554) depends on this TDD issue being completed first. Bug #554 root cause: `_get_session_service()` at `session.py:65-66` calls `container.db()`, but the `Container` class has no `db` provider. All session CLI commands fail with `AttributeError: 'DynamicContainer' object has no attribute 'db'`. **Note**: TDD tests already exist in PR #596 (opened by @brent.edwards). This issue is the formal tracking counterpart required by CONTRIBUTING.md. ## Acceptance Criteria - [ ] Behave BDD scenarios tagged `@tdd_bug @tdd_bug_554 @tdd_expected_fail` that exercise the real `_get_session_service()` DI path - [ ] Robot Framework integration smoke tests for session list lifecycle - [ ] ASV benchmark with session list performance tracker - [ ] Tests fail (as expected) until bug #554 is fixed - [ ] Tests use file-based SQLite with fresh session factory per CLI invocation ## Subtasks - [ ] Implement @tdd_expected_fail tag handling in Behave environment.py (infrastructure needed for all TDD issues) - [ ] Write Behave BDD scenarios for session list DI error - [ ] Write Robot Framework integration smoke tests - [ ] Write ASV benchmark for session list performance - [ ] Verify coverage >=97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions), fix any errors ## Dependencies - Blocked by: #627 (Behave TDD tag handler), #628 (Robot TDD tag handler) — TDD infrastructure - **Resolution**: Implementing @tdd_expected_fail infrastructure as a subtask within this issue - Blocks: #554 (bug fix should not merge until TDD tests exist) ## Definition of Done This issue is complete when TDD tests that reproduce bug #554 are merged to master. The tests should fail when the bug is present and pass when the fix is applied.
freemo added this to the v3.2.0 milestone 2026-03-07 23:04:58 +00:00
Author
Owner

PM Note (Day 29) — Status

TDD failing test for #554 (session list DI bug). Assigned to @brent.edwards who has the active branch and PR #596. Same root cause as #570/#631 — _get_session_service() missing db provider.

Dependencies: Transitively blocked by #627/#628 (TDD infrastructure). Use @wip tag as interim workaround until @tdd_expected_fail is available.

**PM Note (Day 29) — Status** TDD failing test for #554 (session list DI bug). Assigned to @brent.edwards who has the active branch and PR #596. Same root cause as #570/#631 — `_get_session_service()` missing `db` provider. **Dependencies:** Transitively blocked by #627/#628 (TDD infrastructure). Use `@wip` tag as interim workaround until `@tdd_expected_fail` is available.
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.

Blocks
#554 agents session list causes an error.
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#630
No description provided.