Repository navigation
feat: profiles.d/ per-machine profile overrides - #32
Merged
Merged
Conversation
Phase 2 of ADR 0008. Any *.toml file dropped in ~/.config/llm-secrets/profiles.d/ layers on top of profiles.toml: a profile name defined there fully replaces the same-named entry (or adds a new machine-local profile). Unlike extends, this is a config-precedence question, not a security boundary, so there's no narrowing constraint. The same name in two different profiles.d files is rejected as ambiguous. profiles.toml is now optional if profiles.d/ alone defines at least one profile.
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.
Closes #21.
Summary
~/.config/llm-secrets/profiles.d/*.tomlis now read (if present) and layered on top ofprofiles.tomlprofiles.dfile fully replaces the same-named entry fromprofiles.toml, or adds a new machine-local profile if the name doesn't exist thereextends, this is a config-loading precedence question, not a security boundary — no narrowing constraint, the override simply winsprofiles.dfiles is rejected as ambiguous rather than silently resolved by sort orderprofiles.tomlis now optional ifprofiles.d/alone defines at least one profile (previously required to exist even if empty)Caveat, macaroon format, orextendsbehaviourTest plan
cargo fmt && cargo clippy --all-targets -- -D warnings && cargo test --all— all pass (31 unit + 28 CLI integration)profile::tests::file_system_load_paths: full override of a base profile, new machine-local profile, duplicate-name-across-files rejected, profiles.d alone (no profiles.toml) works, neither present still errors clearly