Record a replayable HAR corpus from the compliance run - #5456
Open
sethboyles wants to merge 1 commit into
Open
sethboyles wants to merge 1 commit into
sethboyles wants to merge 1 commit into
Conversation
The compliance suite needs a live foundation and about an hour to answer
"does the API match the spec?". Capture the traffic once and later spec
changes can be replayed against the recording in seconds.
Adds:
- bin/har-recorder.js, a dependency-free HAR 1.2 writer that deduplicates
on (method, normalised path, sorted query, status). Query values are kept
because ?include=space returns an `included` block that ?include=org does
not, and collapsing them would lose that coverage. GUIDs are masked and
sensitive headers redacted.
- bin/summarize-violations.js, which separates schema render failures from
real non-compliance. Without that split the headline count is dominated
by spec defects that mean nothing was validated at all.
- bin/render-check.sh, a six-request probe answering "do the schemas
render?" in about 30 seconds rather than a full suite run.
test-compliance.js replaces http-proxy with a forwarder that buffers request
bodies, which is what makes HAR capture possible and also lets it bypass
wiretap for /v2 and multipart uploads and retry wiretap's "cannot rewind
body" 500s directly against the API. It gains env-gated HAR capture and a
suite profile table, so TEST_SUITE selects capi-bara-tests or
cf-acceptance-tests; only the repo and config keys differ between the two.
It no longer pins capi-bara-tests to a branch, and no longer writes a
`protocol` config key that the suite never had a field for.
wiretap moves to 0.7.3: 0.4.7 segfaults on --har-validate.
ai-assisted=yes
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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 compliance suite needs a live foundation and about an hour to answer "does the API match the spec?". Capture the traffic once and later spec changes can be replayed against the recording in seconds.
Adds:
bin/har-recorder.js, a dependency-free HAR 1.2 writer that deduplicates on (method, normalised path, sorted query, status). Query values are kept because ?include=space returns an
includedblock that ?include=org does not, and collapsing them would lose that coverage. GUIDs are masked and sensitive headers redacted.bin/summarize-violations.js, which separates schema render failures from real non-compliance. Without that split the headline count is dominated by spec defects that mean nothing was validated at all.
bin/render-check.sh, a six-request probe answering "do the schemas render?" in about 30 seconds rather than a full suite run.
test-compliance.js replaces http-proxy with a forwarder that buffers request bodies, which is what makes HAR capture possible and also lets it bypass wiretap for /v2 and multipart uploads and retry wiretap's "cannot rewind body" 500s directly against the API. It gains env-gated HAR capture and a suite profile table, so TEST_SUITE selects capi-bara-tests or cf-acceptance-tests; only the repo and config keys differ between the two. It no longer pins capi-bara-tests to a branch, and no longer writes a
protocolconfig key that the suite never had a field for.wiretap moves to 0.7.3: 0.4.7 segfaults on --har-validate.
ai-assisted=yes
Thanks for contributing to cloud_controller_ng. To speed up the process of reviewing your pull request please provide us with:
A short explanation of the proposed change:
An explanation of the use cases your change solves
Links to any other associated PRs
I have reviewed the contributing guide
I have viewed, signed, and submitted the Contributor License Agreement
I have made this pull request to the
mainbranchI have run all the unit tests using
bundle exec rakeI have run CF Acceptance Tests