Skip to content

add automated config drift detection - #801

Open
canicefavour wants to merge 3 commits into
Core-Foundry:mainfrom
canicefavour:core1
Open

canicefavour wants to merge 3 commits into
Core-Foundry:mainfrom
canicefavour:core1

Conversation

@canicefavour

Copy link
Copy Markdown
Contributor

Implemented an automated configuration audit tool to detect documented environment variables that are no longer consumed by the application codebase.

Implementation
Added a lightweight configuration audit CLI under scripts/ to analyze documented configuration sources such as .env.example and configuration documentation.
Implemented extraction of documented environment variable names along with their source file and line information.
Added source-code scanning to identify actual usage of documented variables across the application.
Covered common environment-variable access patterns, including direct environment lookups, bracket notation, destructured environment objects, and configuration mappings.
Added reporting for documented variables with no detected application references.
Added an allowlist/exemption mechanism for variables intentionally consumed outside the application codebase.
Documented allowlisted variables and their exemption reasons to reduce false positives.
Integrated the audit into the project command workflow so it can be run consistently during local development and CI.
Implemented exit-code enforcement so unreferenced, non-allowlisted configuration variables cause the check to fail.
Added validation demonstrating that intentionally unused configuration variables are detected correctly.
Tested the audit against the existing repository configuration and accounted for known external/runtime configuration dependencies.
Result

The project now has a reproducible configuration drift check that helps keep environment documentation synchronized with actual application usage, while providing controlled exemptions for legitimate externally consumed variables.

Closes #722

@drips-wave

drips-wave Bot commented Sep 25, 2026

Copy link
Copy Markdown

@canicefavour Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Add Automated Stale Configuration Detection

1 participant