You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7fdd9be
Browse filesBrowse the repository at this point in the historyBrowse files
perf(cursor-review): drop the full-history clones from the review round's critical path (#433)
* perf(cursor-review): drop the full-history clones from the review round's critical path
Every round cloned the consumer's whole history (~2 min on a large
monorepo) in `diff-size`, every Cursor cell, `judge-direct` and
`consolidate`, though only `diff-size` reads any history.
- `diff-size`: depth-1 checkout plus the narrowed BASE/HEAD fetch and
merge-base trust ladder pr-size.yml already ships, now one shared
script (scripts/check-pr-size/fetch-history.sh) both workflows call.
The last-reviewed head and its recorded merge base ride along
best-effort so the incremental block's ancestry checks see a graph
that can vouch for them. The incremental step now also requires the
last-reviewed head to be an ancestor of this head, keeping the block
off force-pushed rounds now that a by-SHA fetch can still reach the
old head.
- `preflight`: needs gate + round-cap, not diff-size, so it runs
alongside the size check instead of after it.
- `review`, `judge-direct`, `consolidate`: fetch-depth 1.
- fetch-history-test.sh: local-upstream test, run by test-pr-size.yml.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cursor-review): address review round on the narrowed fetch
- preflight is gated on diff-size's within_cap again, so a catalog or
config failure cannot redden an over-cap pass-through run.
- walk_is_complete feeds grep from a here-string and treats only exit 1
as "no boundary": under pipefail a SIGPIPE'd printf no longer reads as
a complete walk.
- Only the BASE/HEAD merge base drives the deepen ladder and the
--unshallow fallback; the advisory extras get one bounded --deepen
after the merge base is settled, and no longer deepen on every rung.
- Extras are validated with a whole-string =~ and a rejected value is
never echoed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|| ! git merge-base --is-ancestor "$LAST_REVIEWED_SHA" "$HEAD_SHA" 2>/dev/null; then
2287
+
# The ancestor test keeps the block's old reach. Under the former
2288
+
# full-history clone a force-pushed-away head was simply absent; the
2289
+
# narrowed fetch asks for it BY SHA, and GitHub can still serve it, so
2290
+
# presence alone would now build a block (and widen approve_scope's
2291
+
# `delta`) on exactly the rounds that used to get none. "An ancestor
2292
+
# of this head" is what an un-rewritten branch's last round always is.
2293
+
echo "Last-reviewed SHA ${LAST_REVIEWED_SHA} is unreachable or no longer in this head's history (force-push or base-branch rewrite) — skipping the incremental diff block."
2259
2294
elif [ -z "$LAST_REVIEWED_MERGE_BASE" ]; then
2260
2295
# Fail CLOSED, and do NOT fall back to ${BASE_SHA}: that fallback IS the bug
2261
2296
# (BE-15598). Every live PR sees this once after rollout — the round it is
0 commit comments