Skip to content

feat(config): support safe local configuration discovery and initialization - #76

Merged
benbenbang merged 1 commit into
mainfrom
feature/28-config-files
Oct 9, 2026
Merged

benbenbang merged 1 commit into
mainfrom
feature/28-config-files

Conversation

@benbenbang

Copy link
Copy Markdown
Member

Enable predictable, secure configuration setup while preserving explicit path and precedence behavior.

  • Configuration discovery

    • Load jevwise.toml from the current directory before XDG or home configuration.
    • Treat local configuration as a replacement and reject unsafe files without ancestor or global fallback.
    • Limit local reads to 1 MiB and document the resolution behavior.
  • Safe configuration management

    • Stage templates with restrictive permissions and publish them atomically without overwriting existing files.
    • Create trusted parent directories, clean staging files, and verify file context.
    • Validate configuration values consistently and provide redacted, environment-independent views.
  • Documentation and coverage

    • Add path-resolution and file-helper tests.
    • Update configuration examples and command documentation.

@benbenbang
benbenbang enabled auto-merge (rebase) October 9, 2026 08:18
Add file helpers that stage templates with 0600 permissions, create new
parents with 0700 permissions, publish through hardlinks without replacing
existing entries, clean their own staging files, and verify context.

Use shared pure configuration validation to reject unsafe URL fields and
invalid types. View ignores environment overrides, comments, and unknown
keys while redacting only api_key. Parent storage must be trusted because
mode bits do not enforce ACL privacy.

Add helper tests and update the example configuration and command plan.
@benbenbang
benbenbang force-pushed the feature/28-config-files branch from 406556f to fb20667 Compare October 9, 2026 08:30
@github-actions github-actions Bot added documentation Improvements or additions to documentation triage labels Oct 9, 2026
@benbenbang
benbenbang merged commit 008eef2 into main Oct 9, 2026
5 checks passed
@benbenbang
benbenbang deleted the feature/28-config-files branch October 9, 2026 08:32
@ptah-bw-technical-app

Copy link
Copy Markdown

🎉 This PR is included in version 1.4.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation released triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant