Skip to content

fix(config): Skip unreadable discovered configs with warning - #21

Merged
Xuepoo merged 1 commit into
mainfrom
carryctx/ctx-0038
Aug 24, 2026
Merged

fix(config): Skip unreadable discovered configs with warning#21
Xuepoo merged 1 commit into
mainfrom
carryctx/ctx-0038

Conversation

@Xuepoo

@Xuepoo Xuepoo commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Summary

An unreadable or broken auto-discovered config layer (XDG user config, project-local config.toml) made every command hard-fail. Discovered layers now route through a tolerant merge path: read/parse failures (including deny_unknown_fields key errors) print one deterministic stderr warning — warning: ignoring invalid config at <path>: <reason> — and execution continues with remaining layers. Explicit --config stays fail-hard byte-for-byte. Precedence and stdout contracts unchanged.

Closes CTX-0038.

Testing

  • New CLI tests: broken XDG / project configs skipped with warning (stdout identical to clean run); explicit broken --config still fails hard; unknown-key variants of both paths.
  • Gates: fmt / clippy -D warnings / full cargo test green (250 tests).

@Xuepoo
Xuepoo force-pushed the carryctx/ctx-0038 branch from 107e403 to a5e0459 Compare August 24, 2026 11:21
@Xuepoo
Xuepoo merged commit 5f90964 into main Aug 24, 2026
11 checks passed
@Xuepoo Xuepoo mentioned this pull request Aug 24, 2026
3 tasks
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.

1 participant