Skip to content

Test: large diff (15k endpoints) to exercise ARG_MAX fixes - #59

Open
oasdiff-test wants to merge 3 commits into
mainfrom
test-large-diff
Open

Test: large diff (15k endpoints) to exercise ARG_MAX fixes#59
oasdiff-test wants to merge 3 commits into
mainfrom
test-large-diff

Conversation

@oasdiff-test

Copy link
Copy Markdown
Owner

Purpose

End-to-end validation of #118 (jq ARG_MAX fix) and #119 (curl ARG_MAX fix) at multi-MB payload scale. CI unit tests in oasdiff-action already validate the shell-level behavior with a synthetic 4 MB body; this PR closes the gap by running the real Docker action against real api.oasdiff.com with a real multi-MB diff.

How

simple.yaml grows from 67 lines to 180,067 lines: 15,000 new GET /api/v1.0/items_NNNNN operations, each referencing the existing GroupView schema. 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

  • Workflow exits clean (no Argument list too long from jq line 89, no Argument list too long from curl line 124)
  • oasdiff[bot] posts a comment with a /review/{token} link
  • The review page renders (will be huge — possibly the trigger for the large-spec rendering work tracked separately)

What 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

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

oasdiff Bot commented May 22, 2026

Copy link
Copy Markdown

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:

📋 View the full change report


Compared at 0a0c879 · 📋 Review & approve changes

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.

2 participants