Control Plane template: integer-shape validation for numeric inputs (round-3) - #393
Merged
Conversation
…und-3) Round-3 external review (GO-WITH-FIXES). Sprig int silently coerces non-integer types, so postgres.port=true/5432.5, storage.capacity=10.5 and retentionDays=true/1.5 rendered instead of failing fast (the fractional port even produced an inconsistent SIGNALS_TARGET_PORT vs firewall port). Validate the digits-only string form before int conversion for postgres.port, storage.capacity, and collection.retentionDays. Also: - Widen collection.pollInterval grammar to Go's time.ParseDuration (accept .5s, 1.s, +5m, µs/μs) — previously false-rejected valid positive durations. - Acceptance suite: add boolean/fractional negatives for port/capacity/retention, a positive Go-duration matrix, a stronger egress assertion (outboundAllowPort block with number 5432 + overridden-port propagation), and an exact fail-closed token sentinel assertion. closes #391
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.
Round-3 external review verdict was GO-WITH-FIXES. This closes the one substantive gap plus the two lows.
Fix (the must-fix)
Sprig
intsilently coerces non-integer types, sopostgres.port=true/=5432.5,storage.capacity=10.5, andcollection.retentionDays=true/=1.5rendered instead of failing fast. The fractional port was the worst:SIGNALS_TARGET_PORT="5432.5"while the firewall emitted5432. Now the digits-only string form is validated beforeintconversion forpostgres.port,storage.capacity, andcollection.retentionDays.Lows
collection.pollIntervalgrammar widened to match Go'stime.ParseDuration— it previously false-rejected valid positive forms (.5s,1.s,+5m,1µs/1μs).outboundAllowPortblock (number: 5432+ overridden-port propagation); an exact fail-closed token-sentinel assertion.Validation
helm lint0 failures; integer bypasses now rejected; previously-rejected valid durations accepted; acceptance suite ALL PASS; shellcheck clean (default severity).Out of scope, tracked separately in #392: historical AI-tool-name strings in old CHANGELOG/test-name/PR bodies (no history rewrite).
closes #391