feat: dch-config init - #2
Conversation
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe PR adds workspace dependencies and replaces the ChangesConfiguration support
Sequence Diagram(s)sequenceDiagram
participant DchConfig
participant ConfigDirectory
participant TomlParser
participant LoopConfig
DchConfig->>ConfigDirectory: resolve ~/.dch
DchConfig->>ConfigDirectory: select config.local.toml or config.toml
ConfigDirectory->>TomlParser: parse selected TOML
TomlParser-->>DchConfig: return configuration values
DchConfig->>LoopConfig: map configuration fields
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
crates/dch-config/src/lib.rs (1)
221-233: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low valueConfirm intended
config.local.tomlprecedence: full replacement, not field merge.When
config.local.tomlexists, it is parsed alone andconfig.tomlis ignored entirely, so a local file that sets onlyapi.modeldiscards every other value defined inconfig.toml(falling back toDefault, not to the main file). This is consistent with the doc comment andtest_local_overrides_main, but.localoverlays commonly imply per-field overrides. Please verify this whole-file semantic is intended.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/dch-config/src/lib.rs` around lines 221 - 233, The config loader’s local-file behavior needs confirmation and explicit documentation or adjustment: inspect load_from_dir and its related doc comment and test_local_overrides_main, then either preserve the current full-replacement semantics and update naming/documentation to make that contract clear, or implement field-level merging where config.local.toml overrides values from config.toml while retaining unspecified fields.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@crates/dch-config/src/lib.rs`:
- Around line 221-233: The config loader’s local-file behavior needs
confirmation and explicit documentation or adjustment: inspect load_from_dir and
its related doc comment and test_local_overrides_main, then either preserve the
current full-replacement semantics and update naming/documentation to make that
contract clear, or implement field-level merging where config.local.toml
overrides values from config.toml while retaining unspecified fields.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: a52b8adc-8646-44f0-bd78-606c06fb22fc
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (3)
Cargo.tomlcrates/dch-config/Cargo.tomlcrates/dch-config/src/lib.rs
No description provided.