Skip to content

fix(upstream): plan early intake before anything is reconciled - #434

Merged
incognitojam merged 1 commit into
mainfrom
fix/upstream-early-baseline
Sep 24, 2026
Merged

incognitojam merged 1 commit into
mainfrom
fix/upstream-early-baseline

Conversation

@incognitojam

@incognitojam incognitojam commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

After an intake baseline advance, node scripts/upstream-queue.ts early <PR> --through upstream/main failed with "Reconciled boundary is outside the upstream target". When nothing after the baseline has been recorded yet, the reconciled boundary is the baseline commit itself, and the early planner looked for that commit among the pending entries, which start after the baseline. The current baseline (d28077e585) is in that state, so early could not plan anything.

The planner now receives the baseline and treats it as the position before the first entry. A boundary that is neither the baseline nor a pending entry still fails with the same error.

Validation

  • New test in scripts/upstream-early.test.ts plans from a baseline boundary for both the replay selection and the file-overlap screen, and checks that an unknown boundary is still rejected. It fails without the fix.

  • scripts/upstream-early.test.ts and scripts/upstream-queue.test.ts pass (20 tests); lint, formatting, and the scripts typecheck are clean.

  • Ran both early modes against fetched fork main (074a69c69) and upstream main (b2b43bef7), with the baseline at d28077e585 and nothing after it recorded yet. On main, each stops at the boundary:

    $ node scripts/upstream-queue.ts early 5521 --through upstream/main
    Reconciled boundary is outside the upstream target.
    $ node scripts/upstream-queue.ts early --count 10 --through upstream/main
    Reconciled boundary is outside the upstream target.

    On this branch, the plan replays the pending upstream changes before the selected PR, and the screen lists the next candidates:

    $ node scripts/upstream-queue.ts early 5521 --through upstream/main
    Fork 074a69c69; reconciled through d28077e58
    Requested: #5521
    Earlier conflicting PRs to include: none
    Earlier direct commits to include: none
    1 selected commits apply cleanly to fork main; 3 upstream integrations replay without conflicts.
    Review semantic dependencies and validate behavior before importing.
    $ node scripts/upstream-queue.ts early --count 10 --through upstream/main
    Fork 074a69c69; reconciled through d28077e58; target b2b43bef7
    [file-disjoint] #9859: 0 earlier pending PRs; no earlier pending file overlap; applies cleanly now
    [file-disjoint] #9870: 1 earlier pending PRs; no earlier pending file overlap; applies cleanly now
    [file-disjoint] #5521: 2 earlier pending PRs; no earlier pending file overlap; applies cleanly now
    [review] #4685: 3 earlier pending PRs; no earlier pending file overlap; conflicts now
    [review] #9860: 4 earlier pending PRs; no earlier pending file overlap; conflicts now
    [review] #9861: 5 earlier pending PRs; overlap: apps/web/src/components/usage/UsagePage.tsx, docs/user/usage.md; conflicts now
    [review] #9876: 6 earlier pending PRs; no earlier pending file overlap; conflicts now
    [review] #9594: 7 earlier pending PRs; no earlier pending file overlap; conflicts now
    [review] #9878: 8 earlier pending PRs; no earlier pending file overlap; conflicts now
    [review] #9877: 9 earlier pending PRs; no earlier pending file overlap; conflicts now
    Use early <PR> to replay intermediate integrations for a selected PR.

Written by an agent (Claude Code, claude-opus-5-5).

When no upstream integration after the baseline is recorded yet, the
reconciled boundary is the baseline commit itself. The early planner
looked for that commit among the pending entries, which start after the
baseline, and failed with "Reconciled boundary is outside the upstream
target", so `early` stopped working right after every baseline advance.

Pass the baseline to the planner and treat it as the position before
the first entry.
@incognitojam
incognitojam merged commit 495b7cf into main Sep 24, 2026
17 checks passed
@incognitojam
incognitojam deleted the fix/upstream-early-baseline branch September 24, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant