Repository navigation
feat(upstream): explain why a PR cannot be planned early - #437
Merged
Merged
Conversation
When a selected PR's patch does not apply at the reconciled upstream boundary, `early` stopped with "cannot be applied at the upstream boundary" and nothing to act on. That happens when the PR builds on upstream work the fork has not taken in. Report the files that conflict at the boundary and the earlier pending upstream PRs and direct commits that change them, in upstream order. Text output lists the first 20; `--json` lists every source. The intake runbook describes the report.
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.
When the PR selected for
earlydoes not apply at the reconciled upstream boundary, the command stopped with a single line that gave nothing to act on:That happens when the PR builds on upstream work the fork has not taken in yet, and the planner only looks for dependencies in the changes it replays after a successful apply.
The command now reports which of the PR's files conflict at the boundary and which earlier pending upstream PRs and direct commits change those files, in upstream order. Text output lists the first 20 and says how many remain;
--jsonincludes every source with its SHA, PR, and title. A plan that succeeds prints as before. The intake runbook'searlyparagraph describes the report.Validation
A new test in
scripts/upstream-early.test.tschecks which sources the report lists: pending sources after the boundary and before the blocked PR whose files overlap the conflicting paths, including direct commits and directory prefixes, and not recorded or later sources.scripts/upstream-early.test.tsandscripts/upstream-queue.test.tspass (21 tests); lint, formatting, and the scripts typecheck are clean.Against fetched fork
main(495b7cfd5) and upstreammain(b2b43bef7), the same command now prints:--jsonreturns the same 16 paths and all 110 sources.early 5521 --through upstream/main, which plans successfully, prints the same summary as before.Written by an agent (Claude Code, claude-opus-5-5).