7 Commits

Author SHA1 Message Date
freemo c8b66c8294 fix(config): align Settings and alembic/env.py database_url defaults to spec-required ~/.cleveragents/cleveragents.db
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
CI / security (push) Waiting to run
CI / quality (push) Waiting to run
CI / unit_tests (push) Waiting to run
CI / integration_tests (push) Waiting to run
CI / e2e_tests (push) Waiting to run
CI / coverage (push) Blocked by required conditions
CI / benchmark-regression (push) Blocked by required conditions
CI / benchmark-publish (push) Waiting to run
CI / build (push) Waiting to run
CI / docker (push) Blocked by required conditions
CI / helm (push) Waiting to run
CI / status-check (push) Blocked by required conditions
Reviewed and APPROVED. Closes #2871.
2026-04-05 21:11:53 +00:00
freemo 0d4a47f3c0 fix(config): align Settings and alembic/env.py database_url defaults to spec-required ~/.cleveragents/cleveragents.db
CI / lint (pull_request) Successful in 20s
CI / typecheck (pull_request) Successful in 46s
CI / quality (pull_request) Successful in 44s
CI / security (pull_request) Successful in 52s
CI / build (pull_request) Successful in 24s
CI / helm (pull_request) Successful in 22s
CI / unit_tests (pull_request) Successful in 6m37s
CI / e2e_tests (pull_request) Successful in 17m48s
CI / integration_tests (pull_request) Successful in 22m31s
CI / docker (pull_request) Successful in 1m24s
CI / coverage (pull_request) Successful in 10m26s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 56m45s
- Fix Settings.database_url default from relative 'sqlite:///cleveragents.db'
  to absolute 'sqlite:////home/<user>/.cleveragents/cleveragents.db' using
  Path.home() / '.cleveragents' / 'cleveragents.db'
- Fix test_database_url default similarly to use ~/.cleveragents/cleveragents_test.db
- Fix alembic/env.py fallback default from Path.cwd() / '.cleveragents' / 'db.sqlite'
  to Path.home() / '.cleveragents' / 'cleveragents.db' (matching Settings)
- Both Settings and alembic/env.py now resolve to the same absolute path
- CLEVERAGENTS_DATABASE_URL env var override still works correctly in both
- Update coverage_boost_steps.py assertions to match new correct defaults
- Add 3 new Behave scenarios covering correct database_url default and env var override

ISSUES CLOSED: #2871
2026-04-05 10:17:24 +00:00
freemo e4966021e9 fix(config): correct Settings.data_dir default from Path("data") to Path.home() / ".cleveragents"
CI / lint (pull_request) Successful in 26s
CI / typecheck (pull_request) Successful in 48s
CI / security (pull_request) Successful in 1m0s
CI / quality (pull_request) Successful in 35s
CI / build (pull_request) Successful in 18s
CI / helm (pull_request) Successful in 23s
CI / unit_tests (pull_request) Successful in 6m42s
CI / e2e_tests (pull_request) Successful in 16m55s
CI / integration_tests (pull_request) Successful in 23m3s
CI / coverage (pull_request) Successful in 10m44s
CI / docker (pull_request) Successful in 1m42s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 58m29s
The Settings class had data_dir defaulting to Path("data") — a relative
path — but the specification requires the default data directory to be
~/.cleveragents. This inconsistency caused any code reading Settings().data_dir
without setting CLEVERAGENTS_DATA_DIR to use a relative 'data/' directory
instead of the spec-required ~/.cleveragents, affecting log storage, database
location, cache, backups, and all persistent state.

Changes:
- Fix data_dir default_factory from Path("data") to Path.home() / ".cleveragents"
- Add Behave scenario: 'data_dir default is the spec-required home directory path'
- Add Behave scenario: 'data_dir env var override takes precedence over default'
- Add step definition: 'the data directory should equal the home cleveragents path'

Settings.data_dir is now consistent with ConfigService core.data-dir default
(~/.cleveragents). The CLEVERAGENTS_DATA_DIR env var override continues to work.

ISSUES CLOSED: #2851
2026-04-05 07:33:40 +00:00
aditya 36c36bc0ee test(cli): add regression-guard tests for Container.resolve() crash
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 18s
CI / lint (pull_request) Successful in 3m19s
CI / quality (pull_request) Successful in 3m41s
CI / typecheck (pull_request) Successful in 3m54s
CI / security (pull_request) Successful in 4m2s
CI / integration_tests (pull_request) Successful in 6m41s
CI / unit_tests (pull_request) Successful in 6m49s
CI / docker (pull_request) Successful in 1m9s
CI / e2e_tests (pull_request) Successful in 9m19s
CI / coverage (pull_request) Successful in 11m17s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Successful in 50m38s
Add Behave and Robot Framework regression tests for bug #647, where
plan tree, plan explain, and plan correct CLI commands crashed with
AttributeError when resolving DecisionService from the DI container.

Tests use a real DI container with seeded decisions (not MagicMock)
to catch the exact class of bug that existing M3 tests missed.
Assertions verify successful execution and command-specific output
content. Includes Settings.reset() classmethod for robust singleton
cleanup in test teardown.

Review feedback addressed (hurui200320 Round 5):
- Fixed Behave step engine leak by capturing UoW in cleanup closure
- Removed dead @then decorator; renamed to private _assert_command_succeeded
- Strengthened plan correct assertions with revert/dry-run content checks
- Updated misleading get_container() comment to reflect singleton warming
- Added test-only warning to Settings.reset() docstring
- Added type annotations to 4 settings step functions
- Fixed CONTRIBUTORS.md alphabetical ordering and removed duplicate entry
- Replaced glob.glob with pathlib suffix iteration in Robot helper
- Fixed feature description line break for readability
- Removed redundant TYPE_CHECKING import for Decision

ISSUES CLOSED: #648
2026-03-24 08:46:58 +00:00
freemo 0296e7c3b7 Feat connected settings to the providers so they no longer provide mock providers 2025-12-10 12:39:07 -05:00
freemo 2eb4e08c54 Test: Added another 1% test coverage 2025-12-06 18:36:29 -05:00
freemo 641f7c09d9 Fix: Added streaming to context commands 2025-11-26 23:24:46 -05:00