Commit Graph

7 Commits

Author SHA1 Message Date
freemo e4966021e9 fix(config): correct Settings.data_dir default from Path("data") to Path.home() / ".cleveragents"
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
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
freemo 4f05e8a016 feat(cli): Wrote core CLI commands and tests 2025-11-06 23:51:03 -05:00
CleverAgents Dev fb6f559780 feat(architecture): Added skeleton for phase 1 2025-11-05 15:11:03 -05:00