Files
Trevin Chow 35ff6a200b fix(commit-push-pr): branch from fresh remote base to prevent stale-base contamination
Step 4 of ce-commit-push-pr now creates feature branches from `origin/<base>`
after a `git fetch`, instead of from local `<base>` directly. This prevents
new branches from silently inheriting unpushed local commits when another
session (Claude Code, Cursor, Codex, or a human) has advanced local
default beyond the remote — a real failure mode reported in #707 that
previously required force-push surgery to fix at PR review time.

Falls back to the prior `git checkout -b <name>` form if the fetch fails
(offline, restricted network, expired auth) and surfaces the fallback in
the user-facing summary so freshness is not silently assumed.

Also adds docs/solutions/workflow/stale-local-base-contamination.md
documenting the failure mode, the rejected detection approaches
(authorship-based misses same-user contamination; reachability-based
inverts under stacked PRs) and why prevention at branch creation
generalizes cleanly to stacked-PR workflows.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 13:53:00 -07:00
..