fix(config): report a corrupt profile config instead of defaults - #2820
Merged
Merged
Conversation
A torn or unreadable profile config.toml was read through parse_or_warn_default: one process-deduplicated stderr line, then every entry became its default. A stored dashboard or memory-injection opt-out silently turned back on, the tracked hosts and pending upload count vanished, and the GitHub review sources registered nothing. UserConfig::load is now the one strict reader (a missing file is still defaults); the lenient loader, load_strict, parse_or_warn_default and its warn-once set are deleted. `tracedecay doctor` reports a corrupt profile config, or unusable github_review_sources, as an issue naming the file, the parse error and its repair. Commands that cannot read the config say so and skip the counter flush; lifecycle passes refuse; an MCP shutdown that cannot save the counter delta records it in its shutdown failures.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Recovered from the audit-leftovers/warn-drop lane, which died in the 2026-10-01 restart; re-verified after rebasing on d363101. Covers the session-memory
user_configwarn-and-drop item. The lane's other items (activation failed mount, privacy-withheld reason, #2332 trim results) were not started.Root cause
A torn or unreadable profile
config.tomlwas read throughparse_or_warn_default: one process-deduplicated stderr line, then every entry became its default. A stored dashboard or memory-injection opt-out silently turned back on, tracked hosts and the pending upload count vanished, and GitHub review sources registered nothing. A review source withos_keyringaccess but no keyring service/account was also skipped silently.Change
UserConfig::loadis the one strict reader (a missing file is still defaults). The lenient loader,load_strict,parse_or_warn_defaultand its warn-once set are deleted.tracedecay doctorreports a corrupt profile config, and each unregistered GitHub review source, as an issue naming the file, the error and the repair.Evidence
tracedecay, isolated profile, real profile daemon):host_journeys_suite ... doctor_fails_a_corrupt_profile_config_with_its_repairasserts exit 1 with the literal lineProfile config is unusable: config file <path> is corrupt at line 2: TOML parse error at line 2, column 6 ... Fix it, or delete it to regenerate defaults, exit 0 after repair, and exit 1 namingGitHub review source ScriptedAlchemy/keyring-unnamed uses os_keyring access without keyring_service and keyring_account, so it is not registered; .... On master the lenient loader makes doctor exit 0 for the same file.doctor|ledger|connection57, agent-hosts 485, application 483, session-memory 303, configuration 37 (all pass).-D warnings(six touched crates,--all-targets, test features),cargo fmt --all -- --check: clean. Windows cross-check (cargo check --workspace --all-targets --target x86_64-pc-windows-gnu ...): exit 0.