Conversation
There was a problem hiding this comment.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| ) -> None: | ||
| """Initialize the local configuration file with credentials and defaults.""" | ||
| manager = ConfigManager() | ||
| config = BrainAlphaConfig(api_key=api_key, base_url=base_url, storage_path=storage_path) |
There was a problem hiding this comment.
Bug: None value bypasses default factory, corrupts storage path
When users run brainalpha config init without specifying --storage-path, the storage_path parameter is None and gets passed explicitly to BrainAlphaConfig. The dataclass's default_factory only triggers when the argument is omitted entirely, not when None is passed. This causes to_dict() to serialize storage_path as the string "None", and when reloaded via from_dict(), it creates Path("None") - a literal path named "None" instead of the intended default storage location.
Summary
Testing
Codex Task
Note
Introduce project scaffolding with a Typer CLI (version, config init/show), YAML-backed config manager, rich logging, HTTP client with retries, packaging, and sample config.
src/brainalpha/cli/__init__.pywithversionandconfigsubcommands.brainalpha config init|showinsrc/brainalpha/cli/config.py.BrainAlphaConfigandConfigManagerinsrc/brainalpha/config/manager.pywith YAML persistence to~/.brainalpha/config.yml.BrainHttpClientinsrc/brainalpha/infra/http.pywith base URL handling and retry/backoff.configure_loggingusingrich.logginginsrc/brainalpha/logging.py.pyproject.tomlwith dependencies and console scriptbrainalpha = "brainalpha.cli:run".src/brainalpha/__init__.py.README.mdand example pipeline configconfigs/sample.yml..gitignoreto exclude.brainalpha/local data.Written by Cursor Bugbot for commit 17aa566. This will update automatically on new commits. Configure here.