ci+docs(wrappers): detect and fix variable metadata drift (closes #18)#40
Merged
Merged
Conversation
The wrapper-forwarding job only checked that wrappers expose the same variable NAMES as their core modules; descriptions/types/defaults could silently diverge, shipping truncated or wrong docs (and even a factual error: schema_version_ endpoint_path said "ASM API" when it applies to SAT too). Fix the drift: sync every wrapper variable's description to its core module's verbatim across all 12 wrappers (430 descriptions updated, including the 8 asm-aws-ha mismatches and the schema_version_endpoint_path correction). After this, descriptions, types, and defaults all match core. Add detection: a new, dependency-free .github/scripts/wrapper_drift_check.py (brace-aware parser, handles validation blocks) compares each forwarded variable's description/type/default against core and emits ::warning:: annotations. Wired into the wrapper-forwarding job as a NON-BLOCKING step so future drift surfaces in the PR without breaking the build. Reports 0 warnings on the current tree. terraform fmt, validate, and tflint pass on the wrappers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AFfgnPaoyGhp52vQL2PVU3
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.
Implements issue #18.
Fix the drift
Synced every wrapper variable's
descriptionto its core module's verbatim — 430 descriptions updated across all 12 wrappers. This covers the 8asm-aws-hamismatches called out in the issue and corrects the factual error inschema_version_endpoint_path(now "Path on the SAT/ASM API…"). After this, descriptions, types, and defaults all match core.Detect future drift
New, dependency-free
.github/scripts/wrapper_drift_check.py:validation { }blocks).description/type/defaultagainst the core module.::warning::annotations and always exits 0 — wired into the existingwrapper-forwardingjob as a non-blocking step, per the issue's "start as warnings" guidance. Reports 0 warnings on this tree.So the existing name-forwarding check stays a hard gate, while metadata drift now surfaces in the PR file view without breaking CI.
Verification (local)
terraform fmt -check,validate, andtflintpass on the wrappers;wrapper_drift_check.py→0 warning(s).🤖 Generated with Claude Code
https://claude.ai/code/session_01AFfgnPaoyGhp52vQL2PVU3
Generated by Claude Code