Skip to content

chore(cpan-reports): refresh + AGENTS.md rebase --ours/--theirs warning#601

Merged
fglock merged 4 commits intomasterfrom
chore/cpan-reports-refresh-20260429
Apr 29, 2026
Merged

chore(cpan-reports): refresh + AGENTS.md rebase --ours/--theirs warning#601
fglock merged 4 commits intomasterfrom
chore/cpan-reports-refresh-20260429

Conversation

@fglock
Copy link
Copy Markdown
Owner

@fglock fglock commented Apr 29, 2026

Summary

Two related changes from the same session:

1. CPAN compatibility report refresh

Refresh from the background random tester:

  • Pass: 1062 → 1220 modules (+158)
  • Fail: 3089 → 3458 modules (+369)

Files: dev/cpan-reports/cpan-compatibility-{pass,fail}.dat, dev/cpan-reports/cpan-compatibility.md.

2. AGENTS.md: rebase --ours/--theirs are swapped

While preparing this PR I hit a near-miss: resolving a rebase conflict with git checkout --ours <file> silently took the upstream version, made the replayed commit empty, and rebase dropped it. Recovered via reflog. Then GitHub auto-closed this PR because the force-push had momentarily set the branch to master's HEAD.

AGENTS.md now documents:

  • Merge vs rebase semantics (with the official git-rebase(1) quote: "the sides are swapped" — https://git-scm.com/docs/git-rebase).
  • Safe pattern: use --theirs to keep your work during a rebase conflict.
  • Verification step after git rebase --continue: git log --oneline <upstream>..HEAD (empty = your commit was dropped).
  • Reflog recovery instructions.
  • Inspecting both sides via git show :2:<file> / git show :3:<file>.
  • The GitHub side-effect: a force-push that equals the base branch's HEAD auto-closes the PR; you must gh pr reopen <n>.
  • Incident-log row for the 2026-04-29 near-miss.

Test plan

  • Data + docs only; no code touched

@fglock fglock closed this Apr 29, 2026
@fglock fglock force-pushed the chore/cpan-reports-refresh-20260429 branch from 4a72824 to 4d19735 Compare April 29, 2026 07:00
Pass: 1062 → 1220 modules
Fail: 3089 → 3458 modules
@fglock fglock reopened this Apr 29, 2026
fglock added a commit that referenced this pull request Apr 29, 2026
If a broken rebase drops your commit and you force-push the branch to
a SHA that equals master's HEAD, GitHub auto-CLOSES the PR. Pushing
the corrected SHA back does NOT reopen it — `gh pr reopen <n>` is
required. Add a verification step to check `gh pr view --json
state,files` after any force-push.

This actually happened on PR #601 during the cpan-reports refresh.
fglock added 3 commits April 29, 2026 09:07
During rebase, `--ours` refers to the upstream target (not the branch
being rebased), which is the opposite of merge. Using `git checkout
--ours <file>` to "keep our work" during a rebase conflict silently
takes the upstream version, makes the replayed commit empty, and
rebase drops it without error.

Adds:
- A warning block with merge vs rebase semantics, the safe pattern
  (`--theirs` to keep your work during rebase), a verification step
  (`git log --oneline <upstream>..HEAD`), and reflog recovery.
- An incident-log row for the 2026-04-29 near-miss on the
  cpan-reports refresh PR.
Add the official quote from git-rebase(1) and a link to the docs so
future agents (and humans) can confirm this isn't folklore.
If a broken rebase drops your commit and you force-push the branch to
a SHA that equals master's HEAD, GitHub auto-CLOSES the PR. Pushing
the corrected SHA back does NOT reopen it — `gh pr reopen <n>` is
required. Add a verification step to check `gh pr view --json
state,files` after any force-push.

This actually happened on PR #601 during the cpan-reports refresh.
@fglock fglock changed the title chore(cpan-reports): refresh from background random tester chore(cpan-reports): refresh + AGENTS.md rebase --ours/--theirs warning Apr 29, 2026
@fglock fglock merged commit 82e5e45 into master Apr 29, 2026
2 checks passed
@fglock fglock deleted the chore/cpan-reports-refresh-20260429 branch April 29, 2026 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant