Skip to content

Control Plane template: integer-shape validation for numeric inputs (round-3) - #393

Merged
fheikens merged 1 commit into
mainfrom
391-cp-intval
Aug 20, 2026
Merged

Control Plane template: integer-shape validation for numeric inputs (round-3)#393
fheikens merged 1 commit into
mainfrom
391-cp-intval

Conversation

@fheikens

Copy link
Copy Markdown
Contributor

Round-3 external review verdict was GO-WITH-FIXES. This closes the one substantive gap plus the two lows.

Fix (the must-fix)

Sprig int silently coerces non-integer types, so postgres.port=true/=5432.5, storage.capacity=10.5, and collection.retentionDays=true/=1.5 rendered instead of failing fast. The fractional port was the worst: SIGNALS_TARGET_PORT="5432.5" while the firewall emitted 5432. Now the digits-only string form is validated before int conversion for postgres.port, storage.capacity, and collection.retentionDays.

Lows

  • collection.pollInterval grammar widened to match Go's time.ParseDuration — it previously false-rejected valid positive forms (.5s, 1.s, +5m, 1µs/1μs).
  • Acceptance suite strengthened: boolean/fractional negatives for port/capacity/retention; a positive Go-duration matrix; the egress assertion now inspects the outboundAllowPort block (number: 5432 + overridden-port propagation); an exact fail-closed token-sentinel assertion.

Validation

  • helm lint 0 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

…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
@fheikens
fheikens merged commit 6ae9a70 into main Aug 20, 2026
12 checks passed
@fheikens
fheikens deleted the 391-cp-intval branch August 20, 2026 22:53
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.

Control Plane template: integer-shape validation for numeric inputs (round-3 fix)

1 participant