Skip to content

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

Merged
d-morrison merged 1 commit into
mainfrom
claude/project-thread-1trh17
Nov 12, 2026
Merged

d-morrison merged 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
@github-actions

Copy link
Copy Markdown
Contributor

Claude finished review — View run


I reviewed the single added file, .github/workflows/check-merge-drops.yml, against gha's examples/check-merge-drops.yml and the reusable workflow. I found nothing to fix.

  • Matches the upstream example. The triggers (push to main, pull_request, workflow_dispatch) and the @v3 reference are the same as in the example. The v3 tag exists in gha.
  • Inputs are valid. The reusable workflow declares fail as a boolean input that defaults to false, so fail: true is accepted and does what the PR says.
  • Permissions are fine. permissions: contents: read on the calling job matches the permission the reusable workflow requests. Other callers in this repo (for example check-bibliography-dois.yml) use the same @v3 convention.
  • Scope is right. The PR adds one file and touches no generated artifacts, bibliography, or R code. I checked no math, definitions, or prose rules, because the diff has none.
  • Residual risk (not a defect). With fail: true, a deliberate drop will fail CI and need a manual override. The PR description states this openly and says that making it a required check is left to the branch ruleset.

I did not run the workflow. I read the YAML and compared it with the reference repo.

Verdict

Ready for merge

Structured Review Data (JSON)
{
  "schema_version": "1.1",
  "reviewer": "claude",
  "commit_sha": "76477d72c945d2bd071ffc34d434a49d773980f9",
  "verdict": "CLEAN",
  "findings": [],
  "detailed_assessment": "The added check-merge-drops.yml matches gha's example caller, uses the valid boolean fail input, pins the existing v3 tag, and sets contents read permission as the reusable workflow requires.",
  "holistic_assessment": "The change is correctly scoped to one workflow file, consistent with other gha callers in this repo, and carries no regression risk beyond the deliberately documented fail-on-drop behavior."
}

Reviewed commit: 76477d7

@github-actions

Copy link
Copy Markdown
Contributor

💰 Cost: $0.1909 (review) — run

@github-actions

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

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

@d-morrison

Copy link
Copy Markdown
Contributor Author

🤖 Antigravity agent report

Cross-harness review (psc#179 at 76477d7), by comparison with the reviewed caller

The added lines of this PR (.github/workflows/check-merge-drops.yml, +22/-0) are identical to those of rme#1495, which Gemini 3.8 Flash (Medium) via Antigravity agy reviewed read-only as CLEAN (comment); I compared the two diffs' added and removed lines and they match, so I did not run a separate Flash pass on this copy.

Verdict: CLEAN, on that basis: a boolean fail: true matching the reusable workflow's declared input, permissions: contents: read, the default pull_request types, and ordinary merges of main unaffected.
This repository has no other open pull request that a new workflow on main would mark stale.

Posted by Claude Code (AI agent) --- not written by a human.

@d-morrison
d-morrison merged commit f777ed8 into main Nov 12, 2026
21 checks passed
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.

2 participants