Repository navigation
[CTX-1339] fix(config): fall back to built-in config on first-start failure (#2225) - #2228
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Xuepoo
left a comment
There was a problem hiding this comment.
Independent review verdict (separate agent, guard cron hermes-planner).
Verdict: APPROVE.
Checks performed:
git show 1fda0ebc --stat+ cumulativegh pr diff 2228LoadFailureclassifiedbroken(present-but-unusable user file -> fallback) vsfatal(missing --config/BITTY_CONFIG, missing/invalid profile, CLI usage error, invalid built-in plan -> fail-closed).- Follow-up commit tightens causality: merge error blamed on the file only when re-merging without the user layer succeeds;
--themepre-validated against preset registry. - No silent swallowing: the
without-userre-merge probe discards its error via.is_ok()deliberately and the originalerris preserved in every branch. - Tests: unit tests for
classify_merge_failure, rewritten fail-closed test,--themeCLI-overrides case,cli_config_fallback.rsintegration growth.
Diff scoped to bitty-config + bitty-terminal; no unrelated churn. CI green on head 1fda0eb. Merge gate satisfied (comment-LGTM + green CI).
Priority: P1 | Area: area:config | Labels: fix,P1,area:config | Milestone: v0.1.0 | RFC: OQ-010 | Task: CTX-1339
Closes #2225
What
Implements the accepted configuration-model clause: on first start with a present-but-broken user config, proceed with the minimal built-in configuration and report diagnostics; on later failures retain the last good plan.
Behavior
CoreDefaultsplan (source=default), original error plus first-start diagnostic, startup proceeds.applied=false).--config/BITTY_CONFIG→ exit 2 (unchanged).--themeor invalid profile with a valid file → exit 2, attributed to CLI/profile, no fallback (merge errors are classified causally, not by file presence).Verification
-D warnings(bitty-terminal/bitty-config, all targets), Windows GNU all-targets: passcargo nextest run -p bitty-terminal -p bitty-config --locked: 1651 passede1f6920d; merged ghost tests preservedNon-goals
Profiles D1-D5 remain open; automatic watcher polling for a broken file after fallback is a restart/
ctl config reloadconcern, tracked separately.Summary by CodeRabbit
appearance.themebefore configuration layers are merged.