Repository navigation
fix(ci): stop the release workflow re-asserting HCL the test suite already owns - #34
Merged
Merged
Conversation
…ready owns The v0.1.1 release failed at test-wheel on all three Pythons, published nothing, and surfaced a workflow that had been broken for five weeks. release.yml asserted `publicly_accessible = false` with a single space. create_db_subnet_group is 22 characters and joined that block in #13, so terraform fmt realigned the attribute to four spaces and the assertion has been false since 2026-07-31. Nothing noticed because the workflow runs only on a tag push, and no tag was cut in that window. The generated output was correct throughout: the database is private, and prod deletion_protection is true. The assertions should not have been there. tests/test_stackmason.py already covers both properties, and covers them whitespace-tolerantly, and the step directly above runs that suite against the installed package with the source tree deleted. The workflow copy was strictly worse duplication: no feedback loop between releases, so it drifted silently while the copy next to the code was kept correct. - release.yml: drop the HCL content assertions. What remains is what the suite genuinely cannot see, because it is about the artifact rather than the source: the entry point resolves from the wheel, a real `stackmason new` writes real files, the published build still refuses an 0.0.0.0/0 database and writes nothing when it blocks, and the output carries no literal credential. Added outputs.tf to the file list, since #29 made it part of every environment. - A comment states why there are no content assertions there, with the #13 alignment story, so the next person does not add one back. - tests: made the deletion_protection assertion whitespace-tolerant, matching the regex style already used two functions below it for publicly_accessible. Demonstrated both directions rather than assuming: realigned the attribute to one space -> test passes set prod deletion_protection = false -> test fails Verified: pytest 91 passed, coverage 90.90% against the 88% floor, ruff clean. Closes #33 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012fMM2HhoJ2XzDkfMR2HwSa
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.
The
v0.1.1release failed attest-wheelon 3.10, 3.11 and 3.12 and published nothing, which is the gating working. Run 33878757670.It was never a regression in the generated output
The database is private and prod
deletion_protectionistrue. The workflow asserted single-space alignment:create_db_subnet_groupis 22 characters and joined that block in #13, soterraform fmtrealigned the attribute to four spaces:The release workflow has been red since 2026-07-31. Five weeks, undetected, because it runs only on a tag push and no tag was cut in between. The whitespace is incidental; the absence of a feedback loop is the finding.
The assertions should not have existed
tests/test_stackmason.py:252already owns the property, correctly:and
release.yml:140already runs that suite against the installed package with the source tree deleted. The workflow copy was duplication with no feedback loop, so it drifted while the copy next to the code stayed correct. That is the whole mechanism.What this PR does
release.ymloutputs.tfto the expected-files list, since #29 made it part of every environmenttests/deletion_protectionassertion whitespace-tolerant, matching the regex style two functions below itWhat stays in the smoke test is what is genuinely about the artifact: the entry point resolves from the wheel, a real
stackmason newwrites real files, the published build still refuses an0.0.0.0/0database and writes nothing when it blocks, and no literal credential appears in generated output.Demonstrated in both directions
Acceptance criterion was that the alignment case must stop failing and a real regression must still fail. Both checked rather than assumed:
Verification
Closes #33
🤖 Generated with Claude Code
https://claude.ai/code/session_012fMM2HhoJ2XzDkfMR2HwSa