Skip to content

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

@anandgupta42

Description

@anandgupta42

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:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions