TDD: session list missing database handling (bug #680) #683

Closed
opened 2026-03-11 18:10:15 +00:00 by freemo · 1 comment
Owner

Background and Context

Bug #680 (fix(cli): handle missing database in session list command) identifies a defect where the CLI session list command fails when no database exists. Per the mandatory TDD bug-fix workflow (CONTRIBUTING.md §Bug Fix Workflow), a failing test must be written before the fix is implemented.

This issue tracks the TDD test-writing phase for bug #680.

Current Behavior

No test exists that exercises the session list command when the database file is missing or uninitialized.

Expected Behavior

A Behave BDD scenario and/or Robot Framework test tagged with @tdd_expected_fail, @tdd_bug, and @tdd_bug_680 should exist that:

  1. Invokes the session list CLI command when no database is present
  2. Asserts the expected graceful handling (empty list or informative error)
  3. Currently fails (proving the bug exists), but passes CI via the @tdd_expected_fail inversion

Acceptance Criteria

  • At least one Behave scenario in a new features/tdd_session_list_missing_db.feature file
  • Scenario tagged with @tdd_expected_fail @tdd_bug @tdd_bug_680
  • At least one Robot Framework test in robot/tdd_session_list_missing_db.robot
  • Test tagged with tdd_expected_fail, tdd_bug, tdd_bug_680
  • Full test suite passes (nox -s unit_tests integration_tests)
  • ruff check and ruff format pass

Metadata

  • Commit message: test(cli): TDD failing tests for session list missing database (bug #680)
  • Branch name: tdd/session-list-missing-db

Subtasks

  • Write Behave scenario exercising session list with no DB
  • Write Robot Framework test exercising same scenario
  • Apply @tdd_expected_fail tags
  • Verify tests fail (bug present) but CI passes (inversion working)

Definition of Done

  • TDD tests exist and are tagged correctly
  • Tests demonstrate the bug (fail without @tdd_expected_fail)
  • Full CI suite passes with the inversion
  • PR merged to master
## Background and Context Bug #680 (`fix(cli): handle missing database in session list command`) identifies a defect where the CLI `session list` command fails when no database exists. Per the mandatory TDD bug-fix workflow (CONTRIBUTING.md §Bug Fix Workflow), a failing test must be written **before** the fix is implemented. This issue tracks the TDD test-writing phase for bug #680. ## Current Behavior No test exists that exercises the `session list` command when the database file is missing or uninitialized. ## Expected Behavior A Behave BDD scenario and/or Robot Framework test tagged with `@tdd_expected_fail`, `@tdd_bug`, and `@tdd_bug_680` should exist that: 1. Invokes the `session list` CLI command when no database is present 2. Asserts the expected graceful handling (empty list or informative error) 3. Currently **fails** (proving the bug exists), but passes CI via the `@tdd_expected_fail` inversion ## Acceptance Criteria - [ ] At least one Behave scenario in a new `features/tdd_session_list_missing_db.feature` file - [ ] Scenario tagged with `@tdd_expected_fail @tdd_bug @tdd_bug_680` - [ ] At least one Robot Framework test in `robot/tdd_session_list_missing_db.robot` - [ ] Test tagged with `tdd_expected_fail`, `tdd_bug`, `tdd_bug_680` - [ ] Full test suite passes (`nox -s unit_tests integration_tests`) - [ ] `ruff check` and `ruff format` pass ## Metadata - **Commit message**: `test(cli): TDD failing tests for session list missing database (bug #680)` - **Branch name**: `tdd/session-list-missing-db` ## Subtasks - [ ] Write Behave scenario exercising session list with no DB - [ ] Write Robot Framework test exercising same scenario - [ ] Apply `@tdd_expected_fail` tags - [ ] Verify tests fail (bug present) but CI passes (inversion working) ## Definition of Done - TDD tests exist and are tagged correctly - Tests demonstrate the bug (fail without `@tdd_expected_fail`) - Full CI suite passes with the inversion - PR merged to `master`
freemo added this to the v3.2.0 milestone 2026-03-11 18:13:18 +00:00
Member

TDD tests implemented and merged via PR #702.

  • 3 Behave scenarios in features/tdd_session_list_missing_db.feature
  • 2 Robot Framework tests in robot/tdd_session_list_missing_db.robot
  • All tagged @tdd_expected_fail @tdd_bug @tdd_bug_680
  • Tests fail on master (Container has no db provider) but pass CI via tag inversion

The bugfix PR will remove @tdd_expected_fail and make these permanent regression tests.

TDD tests implemented and merged via PR #702. - 3 Behave scenarios in `features/tdd_session_list_missing_db.feature` - 2 Robot Framework tests in `robot/tdd_session_list_missing_db.robot` - All tagged `@tdd_expected_fail @tdd_bug @tdd_bug_680` - Tests fail on master (Container has no `db` provider) but pass CI via tag inversion The bugfix PR will remove `@tdd_expected_fail` and make these permanent regression tests.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#683
No description provided.