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
Prevent stale-base signed replay from synthesizing unrelated changes; enforce policy on GraphQL payload (#36937)
* Initial plan
* Plan fix for signed-commit stale-base replay
Co-authored-by: dsyme <7204669+dsyme@users.noreply.github.com>
* Fix signed commit stale-base replay and payload safeguards
Co-authored-by: dsyme <7204669+dsyme@users.noreply.github.com>
* Replace --unshallow with iterative --deepen against base ref
Single 'git fetch --unshallow origin' is disastrous on high-churn
monorepos. Instead iterate 'git fetch origin <base> --deepen=N' with
progressively larger N (50, 100, 200, 500, 1000, 2000, 4000) until
every bundle-declared prerequisite satisfies
'git merge-base --is-ancestor <prereq> origin/<base>'.
Falls back to --unshallow only if iterative deepen exhausts, or if
a legacy caller omits the deepen options.
* Apply formatter to push_signed_commits.cjs
* Update shallow-checkout tests to assert --deepen instead of --unshallow
The two tests that asserted 'git fetch --unshallow' was called on a
shallow checkout were written against the old single-unshallow path.
With iterative --deepen they need to: declare a bundle prerequisite
(via mocked 'git bundle verify'), report it as not-an-ancestor of
origin/<base>, and then assert the first --deepen=<N> step was issued.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: dsyme <7204669+dsyme@users.noreply.github.com>
Co-authored-by: Don Syme <dsyme@github.com>
Co-authored-by: Don Syme <dsyme@users.noreply.github.com>
core.info(`Bundle prerequisites reachable after --deepen=${depth}`);
387
+
return;
388
+
}
389
+
}
390
+
391
+
core.warning(`Bundle prerequisites still not reachable after iterative deepen (${missing.length} remaining); attempting --unshallow as a last resort`);
0 commit comments