Test: large diff (15k endpoints) to exercise ARG_MAX fixes - #59
Open
oasdiff-test wants to merge 3 commits into
Open
Test: large diff (15k endpoints) to exercise ARG_MAX fixes#59oasdiff-test wants to merge 3 commits into
oasdiff-test wants to merge 3 commits into
Conversation
Adds 15,000 GET endpoints to simple.yaml to force the changelog/payload into the multi-MB range. The resulting payload (~3.75 MB) comfortably exceeds Linux ARG_MAX (~2 MB) so the pr-comment action will fail without #118 (jq) and #119 (curl) fixes, succeed with them. Mirrors the customer scenario that surfaced both ARG_MAX bugs: the real spec produced a ~4 MB changelog and tripped first `jq` and then (post-#118) `curl` with `Argument list too long`. This PR is the end-to-end test we lacked: real Docker action, real api.oasdiff.com service, real GitHub PR-comment posting, all under multi-MB payload pressure. CI unit tests in oasdiff-action validate the shell-level behavior; this validates the full pipeline. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
reuvenharrison
added a commit
to oasdiff/oasdiff-action
that referenced
this pull request
May 22, 2026
The free review URL builder runs the base/revision inputs through
sed 's/.*://'
intending to strip the git-ref prefix in "origin/main:openapi.yaml"
so the /review page receives just "openapi.yaml". For URL-shaped
inputs like "https://raw.githubusercontent.com/o/r/main/foo.yaml",
the same sed strips "https:" too and leaves a broken
"//raw.githubusercontent.com/..." in the base_file= parameter.
The /review page then tries to GET the broken URL, the fetch fails,
and the access-denied screen renders — which misreports the cause
as authorization ("@owner doesn't have access to o/r") even though
the real problem is the malformed URL the page received.
Surfaced via oasdiff-test/test#59, whose workflow uses a URL-shaped
base. (Workflows using the git-ref form are unaffected — that path
still works correctly.)
Fix: wrap the strip in a case-branch helper that passes http:// and
https:// inputs through unchanged, only running the sed on inputs
that look like a git ref.
Two regression tests cover both branches:
- pr_comment_free_review_url_preserves_https_base
- pr_comment_free_review_url_strips_git_ref_prefix
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
oasdiff API Change Report🟢 15000 info This change set is too large to render inline (GitHub caps issue comment bodies at 64 KB). View the full list and review each change on oasdiff: Compared at |
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.
Purpose
End-to-end validation of #118 (
jqARG_MAX fix) and #119 (curlARG_MAX fix) at multi-MB payload scale. CI unit tests inoasdiff-actionalready validate the shell-level behavior with a synthetic 4 MB body; this PR closes the gap by running the real Docker action against realapi.oasdiff.comwith a real multi-MB diff.How
simple.yamlgrows from 67 lines to 180,067 lines: 15,000 newGET /api/v1.0/items_NNNNNoperations, each referencing the existingGroupViewschema. Resulting changelog should be approximately 15,000 entries × ~250 bytes = ~3.75 MB JSON payload to oasdiff-service — comfortably above Linux ARG_MAX (~2 MB) and below Cloud Run's 32 MB request limit.What success looks like
Argument list too longfromjqline 89, noArgument list too longfromcurlline 124)oasdiff[bot]posts a comment with a/review/{token}linkWhat failure looks like
If anything downstream of the action (Cloud Run body limit, JSON parser, DB column size, comment-rendering truncation) fails at this scale, this PR surfaces it before re-engaging the customer. That's the point.
Not for merge
This PR is a one-shot validation; do not merge. Close after the workflow completes (success or otherwise).
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
Generated with Claude Code