TDD: Write failing test for #1024 — SQLite DB URL resolves to CWD #1034

Closed
opened 2026-03-17 18:19:10 +00:00 by freemo · 3 comments
Owner

Metadata

  • Commit Message: test: add TDD bug-capture test for #1024 — SQLite DB URL CWD resolution
  • Branch: tdd/m4-sqlite-url-cwd

Background and Context

This is the TDD counterpart to bug #1024. Per CONTRIBUTING.md Bug Fix Workflow, a tagged test must be written first.

See #1024 for full bug details.

Expected Behavior

A test captures that the SQLite database URL resolves relative to the current working directory instead of the project directory.

Acceptance Criteria

  • Tagged with @tdd_bug, @tdd_bug_1024, @tdd_expected_fail.
  • CI passes. Tag validation passes. Coverage >=97%.

Definition of Done

Commit pushed, PR merged to master.

Subtasks

  • Code: Analyze the CWD resolution behavior described in #1024.
  • Tests (Behave): Write scenario verifying DB URL resolves to project dir, not CWD. Tag appropriately.
  • Tests (Robot): Add Robot test for cross-directory CLI invocation.
  • Docs: Comment in test file.
  • Quality: CI, tag validation, coverage, nox.
## Metadata - **Commit Message**: `test: add TDD bug-capture test for #1024 — SQLite DB URL CWD resolution` - **Branch**: `tdd/m4-sqlite-url-cwd` ## Background and Context This is the TDD counterpart to bug #1024. Per `CONTRIBUTING.md` Bug Fix Workflow, a tagged test must be written first. See #1024 for full bug details. ## Expected Behavior A test captures that the SQLite database URL resolves relative to the current working directory instead of the project directory. ## Acceptance Criteria - [x] Tagged with `@tdd_bug`, `@tdd_bug_1024`, `@tdd_expected_fail`. - [x] CI passes. Tag validation passes. Coverage >=97%. ## Definition of Done Commit pushed, PR merged to `master`. ## Subtasks - [x] Code: Analyze the CWD resolution behavior described in #1024. - [x] Tests (Behave): Write scenario verifying DB URL resolves to project dir, not CWD. Tag appropriately. - [x] Tests (Robot): Add Robot test for cross-directory CLI invocation. - [x] Docs: Comment in test file. - [x] Quality: CI, tag validation, coverage, nox.
freemo added this to the v3.3.0 milestone 2026-03-17 18:19:23 +00:00
Author
Owner

Planning Agent — Dependency Note

This TDD issue (#1034) blocks bug fix #1024. Dependencies to create in Forgejo UI: #1024 depends on → #1034.

**Planning Agent — Dependency Note** This TDD issue (#1034) blocks bug fix #1024. **Dependencies to create in Forgejo UI**: #1024 depends on → #1034.
Author
Owner

Assigned to @hamza.khyari for TDD test writing for bug #1024 (SQLite DB URL CWD). This TDD counterpart is top priority per project policy — bugs always take precedence over feature work.

Assigned to @hamza.khyari for TDD test writing for bug #1024 (SQLite DB URL CWD). This TDD counterpart is top priority per project policy — bugs always take precedence over feature work.
freemo self-assigned this 2026-03-22 22:32:48 +00:00
freemo added reference tdd/m4-sqlite-url-cwd 2026-03-23 00:25:25 +00:00
Author
Owner

Implementation Complete

TDD bug-capture tests implemented on branch tdd/m4-sqlite-url-cwd.

Behave BDD Scenarios

  • features/tdd_sqlite_url_cwd.feature with 2 scenarios tagged @tdd_expected_fail @tdd_bug @tdd_bug_1024
  • Scenario 1: Verifies get_database_url() resolves inside CLEVERAGENTS_HOME
  • Scenario 2: Verifies Settings.database_url default resolves inside CLEVERAGENTS_HOME

Robot Framework Integration Tests

  • robot/tdd_sqlite_url_cwd.robot with 2 test cases tagged tdd_expected_fail tdd_bug tdd_bug_1024
  • Helper: robot/helper_tdd_sqlite_url_cwd.py

Quality Gates

  • lint:
  • typecheck: (0 errors)
  • unit_tests: (462 features, 12232 scenarios)
  • integration_tests: (1672/1674 passed; 2 pre-existing flaky)
  • coverage_report: (98.4% >= 97%)

PR: #1112

## Implementation Complete TDD bug-capture tests implemented on branch `tdd/m4-sqlite-url-cwd`. ### Behave BDD Scenarios - `features/tdd_sqlite_url_cwd.feature` with 2 scenarios tagged `@tdd_expected_fail @tdd_bug @tdd_bug_1024` - Scenario 1: Verifies `get_database_url()` resolves inside `CLEVERAGENTS_HOME` - Scenario 2: Verifies `Settings.database_url` default resolves inside `CLEVERAGENTS_HOME` ### Robot Framework Integration Tests - `robot/tdd_sqlite_url_cwd.robot` with 2 test cases tagged `tdd_expected_fail tdd_bug tdd_bug_1024` - Helper: `robot/helper_tdd_sqlite_url_cwd.py` ### Quality Gates - lint: ✅ - typecheck: ✅ (0 errors) - unit_tests: ✅ (462 features, 12232 scenarios) - integration_tests: ✅ (1672/1674 passed; 2 pre-existing flaky) - coverage_report: ✅ (98.4% >= 97%) PR: #1112
freemo removed their assignment 2026-03-23 03:30:00 +00:00
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#1034
No description provided.