v0.2.1 hotfix: fix #7 _template_path leak + pre-commit hooks#8
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… _template_path leak
…cked by repo rule, but the tag is orphaned)
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.
Summary
dashboard apply fails: "_template_path" leaks into Humio payload (+ design Q: metadata namespace)** #7:_template_path(and any_-prefixed tool-internal key) no longer leaks into the Humio dashboard YAML payload.DashboardProvider._prepare_yaml_payloadand_normalize_for_hashnow route through a new sharedcore/template_sanitizerhelper that strips the universally-IaC reserved set{resource_id, type, dependencies, metadata}plus any_-prefixed key. Dashboard-specific transforms (tags → labelsrename,descriptionstrip) are preserved unchanged..pre-commit-config.yamlwith ruff hooks (ruff-format,ruff) mirroring the CI lint gate, pluspre-commit>=3.7in dev deps. Also documents the install step inCLAUDE.mdunder a new Installing pre-commit hooks section.detection_provider.py/test_detection_provider.pythat caused the PR Add metadata: block validator and ADS path-ref extension #6 merge commit'slintCI job to go red.CHANGELOG.mdwith av0.2.1 — 2026-04-16entry covering the above. Notes that the malformedv.0.2.0tag is orphaned on the remote (a GitHub repo rule blocks tag deletion, but hatchling cannot parse it, so no release will ever be cut from it).Test plan
pytest tests/→ 456 passed (17 new intest_template_sanitizer.py, 6 new intest_dashboard_provider.py::TestIssue7Regression)ruff format --check src/ tests/ --exclude src/talonctl/_version.py→ cleanruff check src/ tests/ --exclude src/talonctl/_version.py→ cleanpre-commit run --all-files→ clean (both hooks Passed)dashboard apply fails: "_template_path" leaks into Humio payload (+ design Q: metadata namespace)** #7 direct regression:pytest tests/unit/test_template_sanitizer.py::TestIssue7Regression tests/test_dashboard_provider.py::TestIssue7Regression -v→ 7 passeddescriptionandtagsexplicitly to keep hash input identical to pre-helper behavior;metadatais newly excluded from the hash, which is the intentional design direction — editing metadata will no longer replan)Out of scope for v0.2.1 (handled by v0.3.0 namespace redesign)
metadata.maturityvalidation universallymetadata.adson detections from top-level tometadata.adsads:/ flatmetadata:shapesCloses #7.
🤖 Generated with Claude Code