altimate-code icon indicating copy to clipboard operation
altimate-code copied to clipboard

Marker Guard fails on main after squash-merging an upstream bridge merge PR

Open anandgupta42 opened this issue 7 months ago • 0 comments

Problem

After PR #757 (feat: bridge upstream v1.4.0 across history rewrite + 3 backports + adversarial test suite) was squash-merged to main, the Marker Guard CI job failed on the push-to-main run:

  • Run: https://github.com/AltimateAI/altimate-code/actions/runs/25264283463
  • Step: Check for missing altimate_change markers
  • Output: ⚠ Found 98 file(s) with unmarked custom code → --strict mode — failing CI

The check ran:

bun run script/upstream/analyze.ts --markers --base "${{ github.event.before }}" --strict

which compares the previous main SHA against the new HEAD. A bridge merge overlays hundreds of upstream files, so the diff legitimately shows huge swaths of upstream code as "new" — analyze.ts then flags every file in that diff that lacks an altimate_change block.

Why the existing guard didn't help

.github/workflows/ci.yml already has a non-strict path for upstream-merge PRs (head ref merge-upstream-* / upstream/merge-*). But once the PR is squash-merged, the push event has no head_ref / second-parent / branch-name signal — the merge lands as a single commit on main — so the workflow falls back to strict mode.

Fix

Detect bridge / upstream-merge commits in the pushed range by commit subject (grep -qiE '(bridge|merge) upstream') and downgrade strict → non-strict for those pushes. The PR-side review already gated marker integrity for that change, and the push-event run still surfaces warnings as job output.

anandgupta42 avatar May 02 '26 23:05 anandgupta42