Skip to content

fix: surface missing bugatti.config.toml instead of silent default (#45)#46

Merged
codesoda merged 3 commits into
mainfrom
fix/45-config-discovery
Apr 20, 2026
Merged

fix: surface missing bugatti.config.toml instead of silent default (#45)#46
codesoda merged 3 commits into
mainfrom
fix/45-config-discovery

Conversation

@codesoda
Copy link
Copy Markdown
Owner

Summary

  • Adds --config <PATH> flag on bugatti test; a missing file is a hard error (no silent fallback).
  • Promotes the cwd-fallback "no config file found, using defaults" log from INFO → stderr WARNING: so the behavior is visible in the terminal instead of only in diagnostics/harness_trace.jsonl.
  • Bumps version 0.4.10.4.2.

Fixes #45.

Behavior

Invocation Behavior
bugatti test … with bugatti.config.toml in cwd unchanged
bugatti test … with no config in cwd new: prints WARNING: no bugatti.config.toml found in <cwd> — running with defaults. to stderr, then runs with defaults
bugatti test --config path/to/config.toml … loads that file; hard error with exit code 2 if the file is missing

Test plan

  • cargo clippy -- -D warnings clean
  • cargo test — all 217 tests pass (3 new unit tests for load_config_from_file: arbitrary filename, missing-file hard error, invalid TOML)
  • bugatti test --help lists --config <PATH>
  • Manual: run bugatti test <file> from a directory without bugatti.config.toml and confirm the warning hits stderr
  • Manual: run bugatti test --config nope.toml <file> and confirm exit code 2 with a clear error

Add a `--config <PATH>` flag that hard-errors when the file is missing,
and promote the cwd fallback log from INFO to a stderr WARNING so the
silent "using defaults" behavior is visible in the terminal and run
report rather than buried in diagnostics/harness_trace.jsonl.

Bumps version to 0.4.2.
@codesoda codesoda marked this pull request as ready for review April 20, 2026 05:38
The previous commit accidentally swept in pre-existing refactors that
route provider initialization through bugatti::provider::initialize_session,
which doesn't yet exist on main. Restore ClaudeCodeAdapter::initialize so
the crate builds again and CI clippy passes.
The CI runner's clippy (1.95) treats collapsible_match as an error via
-D warnings, whereas 1.94 let it through. Fold the `if self.verbose`
checks for the "tool_use" and "thinking" arms into match guards so CI
builds cleanly without pinning the toolchain.
@codesoda codesoda merged commit 88aa7e7 into main Apr 20, 2026
1 check passed
@codesoda codesoda deleted the fix/45-config-discovery branch April 20, 2026 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Silent fallback to Config::default() when bugatti.config.toml is missing from cwd

1 participant