Skip to content

Run check-merge-drops, failing on a merge that drops content - #164

Open
d-morrison wants to merge 1 commit into
mainfrom
claude/project-thread-1trh17
Open

d-morrison wants to merge 1 commit into
mainfrom
claude/project-thread-1trh17

Conversation

@d-morrison

Copy link
Copy Markdown
Contributor

Requested by Ezra · project thread

Part of Morrison-Lab/ai-config#5408.

Why

Resolving a merge conflict by keeping one side of a whole file has silently dropped definitions, citations and code from the notes before.
gha's check-merge-drops (Morrison-Lab/gha#958) flags a merge commit whose tree lacks lines either parent added since the merge base, but on 2026-11-12 none of the notes repos (lds, mds, pds, sds, mcs, psw, psc) called it.

What changes

One new file, .github/workflows/check-merge-drops.yml: the consumer from gha's examples/check-merge-drops.yml, pinned at @v3, with two changes:

  • fail: true, so a merge that drops content fails CI instead of only writing a warning to the job summary.
  • permissions: contents: read on the calling job, which is what the reusable workflow requests and what check-caller-permissions expects.

On a pull request it checks only the merges the PR adds (such as a merge of main into the branch); on a push to main, the merges the push brought in.
A PR with no merge commits passes trivially.

Expected effect

A dry run of the checker (default globs, min-length and similarity) over the last 300 commits on lds main (281 merges) flagged 3 merges, each dropping one line.
At least one was deliberate: a bullet removed on a branch that converted bullets to prose.
So with fail: true, a deliberate drop will fail this check about once in a hundred merges, and needs a "merge anyway" from Ezra.

Making it a required status check is a branch-ruleset setting, which this PR does not change.

Not done

  • Merging this changes a workflow file on main, which marks the repo's other open PRs stale for the runner's checker; merge it after the content PRs in the queue.

Generated by Claude Code

A conflict resolved by keeping one side of a whole file has silently
dropped definitions, citations and code from the notes before. gha's
check-merge-drops (gha#958) catches that, but no notes repo called it.
This adds the consumer workflow from gha's example, with fail: true.

Part of Morrison-Lab/ai-config#5408.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019xfc9rEXHYxA5DCp2TL1oG
@d-morrison d-morrison self-assigned this Nov 12, 2026
Copilot AI balanced review requested due to automatic review settings November 12, 2026 12:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions

Copy link
Copy Markdown
Contributor

Claude finished review — View run


I fetched PR #164 live just now. It is open, not a draft, and not merged, and its head is still 93726044cc2145f9d09da38c5fb052cdb84aa42b, the commit I reviewed. The review stands.

Verdict

Ready for merge

Structured Review Data (JSON)
{
  "schema_version": "1.1",
  "reviewer": "claude",
  "commit_sha": "93726044cc2145f9d09da38c5fb052cdb84aa42b",
  "verdict": "CLEAN",
  "findings": [],
  "detailed_assessment": "The new check-merge-drops.yml caller matches the gha example, uses the existing fail input, and pins @v3 like sibling workflows.",
  "holistic_assessment": "A single-file CI addition with explicit read-only permissions and no content, math, or dependency changes, so regression risk is minimal."
}

Reviewed commit: 9372604

@github-actions

Copy link
Copy Markdown
Contributor

💰 Cost: $0.2088 (review) — run

@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.2
🚀 Preview available at: https://Morrison-Lab.github.io/mcs/pr-preview/pr-164/

Built to branch gh-pages at 2026-11-12 12:15 UTC.

This branch has not been deployed

No deployments
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.

3 participants