Skip to content

fix(pr-review): handle large diffs and honor the configured app identity - #48

Open
deepld wants to merge 2 commits into
megaeth-labs:mainfrom
deepld:codex/fix-large-pr-diff
Open

deepld wants to merge 2 commits into
megaeth-labs:mainfrom
deepld:codex/fix-large-pr-diff

Conversation

@deepld

@deepld deepld commented Sep 28, 2026 •

Copy link
Copy Markdown

Claude reviews now prepare complete diffs above GitHub's 300-file limit and run model analysis with the configured GitHub App identity. Consumers can pin the action fix in a PR without the default OIDC workflow check skipping model analysis.

The diff fallback applies only to the file-limit HTTP 406 and retains frozen revisions, renames, and binary changes. Other API failures remain errors. Model analysis and retry use the existing optional identity token through the upstream custom App interface; callers without that token retain OIDC. The consumer workflow will be pinned to this commit while the shared action change is reviewed.

Related: megaeth-labs/mega-reth#2413

Validation: the pipeline suite ran 110 tests: 109 passed and one existing test was skipped. The new 302-file shallow-clone test covers an independently advanced base, renames, and binary changes. The fallback also returned all 1190 files in the related PR, byte-for-byte equal to its frozen local Git diff.

An HTTPS depth-one checkout with its credential helper cleared also fetched the missing PR head using only environment-provided GH_TOKEN.

Remote Prepare completed successfully after the diff fix. The existing identity configuration test now guards both model steps; it failed before token forwarding and passed afterward. Generated action documentation is up to date.


Compound Engineering

Fall back to a Git diff of the frozen merge base and head when GitHub
rejects the diff endpoint's 300-file limit. Fetch missing snapshots with
the gh credential helper for depth-one checkouts without persisted tokens.

Cover normal responses, unrelated API errors, frozen refs, and complete
shallow-clone diffs with renames and binary changes.
Forward the optional GitHub identity token to both Claude model steps.
The supplied app identity can analyze PR workflow changes without the
default OIDC workflow-content validation skipping the review.

Keep OIDC for callers without an identity token, cover both model steps
in the existing configuration test, and regenerate input documentation.
@deepld deepld changed the title fix(pr-review): prepare complete diffs for large pull requests fix(pr-review): handle large diffs and honor the configured app identity Sep 28, 2026
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.

1 participant