@tdd_issue @tdd_issue_1024
Feature: TDD Issue #1024 — SQLite DB URL resolves to CWD instead of CLEVERAGENTS_HOME
  As a developer
  I want to verify that the SQLite database file is created inside
  CLEVERAGENTS_HOME (not the current working directory)
  So that test isolation is maintained across CLI invocations

  The default ``database_url`` in ``Settings`` is ``sqlite:///cleveragents.db``
  — a relative path.  When E2E tests (or any CLI invocation) run with
  ``CLEVERAGENTS_HOME`` set to a different directory, the DB file is still
  created relative to CWD, NOT inside ``CLEVERAGENTS_HOME``.  This breaks
  test isolation: data persists across runs, causing UNIQUE constraint
  failures.

  Bug: https://git.cleverthis.com/cleveragents/cleveragents-core/issues/1024
  TDD: https://git.cleverthis.com/cleveragents/cleveragents-core/issues/1034

  Scenario: Default database_url resolves inside CLEVERAGENTS_HOME not CWD
    Given a fresh CLEVERAGENTS_HOME temp directory for DB URL testing
    When I resolve the effective database URL from Settings
    Then the resolved database path should be inside CLEVERAGENTS_HOME
    And the resolved database path should not be inside the original CWD

  Scenario: Settings database_url default resolves inside CLEVERAGENTS_HOME
    Given a fresh CLEVERAGENTS_HOME temp directory for DB URL testing
    When I resolve the Settings database_url default
    Then the settings database path should be inside CLEVERAGENTS_HOME
