Conversation
11b6bd9 to
c5a3fd2
Compare
|
Hey We are cleaning up the codebase and improving the project structure for better onboarding. As part of this effort, PR #826 reorganizes No logic changes — only file moves and import path updates. What you need to doRebase your branch on git fetch origin && git rebase origin/developGit detects renames automatically. If you get import conflicts, update the paths: use crate::git; // now: use crate::cmds::git::git;
use crate::tracking; // now: use crate::core::tracking;
use crate::config; // now: use crate::core::config;
use crate::init; // now: use crate::hooks::init;
use crate::gain; // now: use crate::analytics::gain;Need help rebasing? Tag @aeppling |
… parse failure When users specify a partial [tee] section in config.toml (e.g. omitting max_file_size), the entire Config fails to deserialize. Because Config::load() errors are silently swallowed by unwrap_or_default() at call sites, all user settings (including hooks.exclude_commands) are silently ignored with no warning. Add #[serde(default = "...")] to every TeeConfig field so partial [tee] sections work correctly. Add tests for partial and empty deserialization. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
c5a3fd2 to
0806844
Compare
|
Rebased on Verification:
The fix and tests remain functionally identical — only the file location changed. |
- Add [Unreleased] Bug Fix entry in CHANGELOG.md for rtk-ai#843 - Clarify in src/core/README.md that all [tee] fields are optional Required by CONTRIBUTING.md: bug fixes must be logged in CHANGELOG, core infrastructure changes must update src/core/README.md. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
This pull request has been automatically marked as stale due to 90 days of inactivity. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. Your contribution is very much appreciated — we're sorry we haven't been able to review it yet. |
|
Thanks for digging into this one. The [tee] section was reworked by #3278, merged 2026-09-09, which moved recovery settings to [retriever] and kept [tee] as a legacy section parsed into a struct where every field is optional and the struct carries serde(default), so a partial [tee] block no longer fails the whole config load. The regression case you added is covered on develop by test_legacy_tee_disabled_maps_to_disabled_mode and test_legacy_tee_never_mode_maps_to_disabled_mode, both of which parse a [tee] section with a single field. Closing as already fixed, but please comment or reopen if you find a config shape that still parses badly. |
Summary
TeeConfigfields lack#[serde(default)], causing the entireConfigdeserialization to fail when users specify a[tee]section inconfig.tomlbut omit some fields (e.g.max_file_size)Config::load().map(...).unwrap_or_default()to silently handle errors, all user settings (includinghooks.exclude_commands) are silently ignored with no warning#[serde(default = "...")]to everyTeeConfigfield so partial[tee]sections deserialize correctlyReproduction
When
rtk configis not called directly,Config::load()fails silently and falls back to defaults — all user settings are ignored without any warning.Test plan
cargo fmt --all --check— passedcargo clippy --all-targets— no new warningscargo test --all— 1116 passed, 3 ignoredtest_tee_config_partial_deserialize— verifies omittingmax_file_sizedoes not failtest_tee_config_empty_deserialize— verifies a completely empty[tee]section uses defaults🤖 Generated with Claude Code