8ea00f5185
CI / unit_tests (push) Has been cancelled
CI / benchmark-publish (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / typecheck (push) Has been cancelled
CI / security (push) Has been cancelled
CI / quality (push) Has been cancelled
CI / integration_tests (push) Has been cancelled
CI / e2e_tests (push) Has been cancelled
CI / coverage (push) Has been cancelled
CI / benchmark-regression (push) Has been cancelled
CI / build (push) Has been cancelled
CI / push-validation (push) Has been cancelled
CI / status-check (push) Has been cancelled
CI / docker (push) Has been cancelled
CI / helm (push) Has been cancelled
Co-authored-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me> Co-committed-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
40 lines
2.1 KiB
Gherkin
40 lines
2.1 KiB
Gherkin
@tdd_issue @tdd_issue_1023
|
|
Feature: TDD Bug #1023 — CLI commands should succeed without explicit init
|
|
As a developer
|
|
I want to verify that CLI commands that touch the database succeed
|
|
without requiring an explicit `agents init` invocation first
|
|
So that the bug is captured and will be caught by a regression test
|
|
|
|
Bug #1023 reports that running any DB-dependent CLI command (e.g.,
|
|
`resource add`, `project create`) in a fresh environment fails with
|
|
`sqlite3.OperationalError: unable to open database file` even when
|
|
`CLEVERAGENTS_AUTO_APPLY_MIGRATIONS=true` is set. The specification
|
|
implies that initialization should happen implicitly.
|
|
|
|
The root cause is that `CLEVERAGENTS_AUTO_APPLY_MIGRATIONS=true`
|
|
triggers schema migrations on an existing database but does NOT create
|
|
the database file or its parent directory structure. A manual
|
|
`agents init --yes --force` is required first.
|
|
|
|
These tests assert the expected behaviour (implicit init) and will
|
|
fail until the bug is fixed. The @tag inverts the
|
|
result so CI remains green while the defect is open.
|
|
|
|
# @tdd_issue @tdd_issue_4280 @tdd_expected_fail @skip
|
|
@skip
|
|
Scenario: Resource add succeeds in a fresh environment without explicit init
|
|
Given a fresh isolated environment for tdd-implicit-init
|
|
And CLEVERAGENTS_AUTO_APPLY_MIGRATIONS is set to true
|
|
When I run the CLI command "resource add git-checkout local/tdd-test-resource --path . --branch main" without prior init
|
|
Then the tdd-implicit-init command should exit with code 0
|
|
And the tdd-implicit-init command output should contain "tdd-test-resource"
|
|
|
|
# @tdd_issue @tdd_issue_4280 @tdd_expected_fail @skip
|
|
@skip
|
|
Scenario: Project create succeeds in a fresh environment without explicit init
|
|
Given a fresh isolated environment for tdd-implicit-init
|
|
And CLEVERAGENTS_AUTO_APPLY_MIGRATIONS is set to true
|
|
When I run the CLI command "project create local/tdd-test-project" without prior init
|
|
Then the tdd-implicit-init command should exit with code 0
|
|
And the tdd-implicit-init command output should contain "tdd-test-project"
|