stale-base-pr-silently-reverts-upstream-content

Detect and recover content silently reverted by stale-base sibling PR merges.

3|Updated May 8, 2026
One-click install
npx skills add https://github.com/wan-huiyan/agent-traffic-control --skill stale-base-pr-silently-reverts-upstream-content-wan-huiyan
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: stale-base-pr-silently-reverts-upstream-content
Source: https://github.com/wan-huiyan/agent-traffic-control/tree/main/plugins/agent-traffic-control/skills/stale-base-pr-silently-reverts-upstream-content
Command: npx skills add https://github.com/wan-huiyan/agent-traffic-control --skill stale-base-pr-silently-reverts-upstream-content-wan-huiyan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When two parallel PRs touch the same file — one refreshing values, the other rewriting copy — git's 3-way merge can silently take the stale-base PR's version, reverting the first PR's changes with no conflict, no CI failure, and no visible signal. This Skill detects that silent regression and recovers the lost content without destroying the second PR's legitimate work. ## Core Features & Use Cases - Content-level detection: Grep post-merge main for the upstream PR's distinctive anchored strings and compare against its merge commit to confirm which lines regressed. - Targeted recovery: Re-apply the lost values inside the sibling PR's rewritten text via targeted edits, instead of reverting the whole merge or checking out the old file. - Complete-file revert variant: Handle the severe case where a wholesale template rewrite is fully restored to its pre-PR state, using git checkout <merge-commit> -- <file> plus re-layering the sibling's genuine fixes. - Use Case: PR A refreshes dashboard numbers in a template and merges; PR B, based on pre-A main, polishes the same copy and merges four minutes later claiming "all numbers preserved." The live page now shows stale values while backend constants are correct — this Skill walks you through confirming the regression, inventorying lost lines, and shipping a recovery PR. ## Quick Start Audit the most recent merge by grepping origin/main for the upstream PR's distinctive new values and comparing against its merge commit, then follow the recovery steps to restore any missing content.

Frequently Asked Questions about stale-base-pr-silently-reverts-upstream-content

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect if a merge silently reverted another PR's changes?▼

Grep post-merge origin/main for distinctive strings the earlier PR introduced, then compare against that PR's merge commit. If the merge commit has N matches and current main has fewer, the missing matches are reverted lines.

Why did git merge without a conflict but still lose my changes?▼

Git's 3-way merge resolves textual overlap silently when one branch's edit is value-only and the other's is structure-plus-value; it treats the broader edit as winning. No conflict is raised because the merge is textually resolvable, even though semantically wrong.

How do I recover reverted content without losing the other PR's work?▼

Make targeted edits that restore the lost values inside the sibling PR's rewritten text, keeping its voice and structure. Do not revert the merge commit or check out the old file, since both destroy the sibling's legitimate changes.

Can a PR body claiming "all numbers preserved" still cause a regression?▼

Yes. The claim is true against that PR's base, but if the base predates another PR's merge, the preserved values are the stale ones. Always content-audit recent value-touching merges against current main after a sibling merges.

What if an entire file was reverted, not just a few lines?▼

For complete-file reverts where the sibling's version equals the pre-rewrite file, restore the upstream PR's file wholesale with git checkout <merge-commit> -- <file>, then layer the sibling's genuine fixes on top. Targeted line edits do not scale to hundreds of missing lines.