fix(constructs): make SSL/traceroute assertion builders emit backend-valid payloads [SIM-287]#1387
Closed
danielpaulus wants to merge 1 commit into
Closed
Conversation
…valid payloads [SIM-287] Several assertion builders synthesized payloads the backend rejects or could not express supported checks: - TracerouteAssertionBuilder.responseTime() emitted property:'' but the backend requires avg|min|max|stdDev; now defaults to 'avg' and adds avg/min/max/stdDev selectors (+ codegen preserves the property on round-trip). - SslBaselineSeverity 'warn' -> 'degrade' to match the backend enum. - Add greaterThanOrEqual and matches builders (backend needs GREATER_THAN_OR_EQUAL for KEY_SIZE_BITS/TLS_VERSION and MATCHES for CIPHER_SUITE/ISSUER_CN); wire both into codegen. - Add missing SSL sources OCSP_STAPLED, HANDSHAKE_TIME_MS, SAN_CONTAINS (+ codegen). - Add degraded<=max cross-field validation in the shared validateResponseTimes helper (accounts for the per-type default max when maxResponseTime is omitted). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NC9pESYE5wGqy5TKRzufyc
Contributor
Author
|
Superseded by #1391 (SIM-286 + SIM-287 combined into one PR). |
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.
SIM-287
Fixes CLI assertion builders that generated payloads the backend rejects, or couldn't express supported checks. Targets
feat/cli-pertype-result-rendering(#1362).responseTime()was unusable — it synthesizedproperty:'', but the backend requiresproperty ∈ {avg,min,max,stdDev}→ 400. Now defaults toavgand adds.avg()/.min()/.max()/.stdDev()selectors; codegen preserves the property on round-trip (was silently collapsing toavg).'warn'→'degrade'to match the backend enum (['fail','degrade','ignore']).greaterThanOrEqual(→GREATER_THAN_OR_EQUAL, needed forKEY_SIZE_BITS/TLS_VERSION) andmatches(→MATCHES, forCIPHER_SUITE/ISSUER_CN); wired both into codegen.OCSP_STAPLED,HANDSHAKE_TIME_MS,SAN_CONTAINS(builders + codegen).degraded ≤ maxvalidation — added once in the sharedvalidateResponseTimes; also guards the case wheremaxResponseTimeis omitted (compares against the per-type default).Codegen (
checkly import) was updated alongside so the new sources/operators/selectors round-trip instead of throwing or corrupting.Tests
New
ssl-assertion-codegen.spec.tsandtraceroute-assertion-codegen.spec.tsround-trip the new sources/operators and traceroute property preservation;ssl-monitor/traceroute-monitorspecs cover the new severity, selectors, and the degraded>max diagnostic.Verified live
TracerouteAssertionBuilder.responseTime().max().lessThan(…)now round-trips asmaxand evaluates:response time property "max" is less than target … Received: 6.8.Note
The
degraded ≤ maxcheck now applies to all monitor types (was SSL-only inline) — a small, intentional broadening.🤖 Generated with Claude Code
https://claude.ai/code/session_01NC9pESYE5wGqy5TKRzufyc