Skip to content

Lab: port drift: does an upstream-PR branch still carry every hunk of its fork commits #97

Backlog

Description

@mareklangiewicz

Lab issue (neospector lua/myemmylab*.lua in myvi; nearest code: M.fork_touch_lines in myemmylab.lua, fork in myemmylabcli.lua). Part of #17. From the 2026-11-26 retro.

Problem

A fix ported upstream by hand can drop a hunk of the fork commit and still pass its tests. Upstream 1359 did: the port 480f6dd lost the fork's is_value_list guard on the any fallback. Nothing showed it until the mini.icons corpus line was read and traced back to it (#14 comments 7196565503, 7199113155), and the fix was 97ce97c. The question "does the PR branch still carry every hunk of fork commit(s) X?" has no command. gndx emmylua fork answers it per patch (does upstream have the whole patch) but not per hunk, against one branch.

Want

  • gndx emmylua port drift BRANCH FORK_COMMIT…: for each hunk of the fork commits (fork-only paths left out: AGENTS.md, docs/agents/), say whether BRANCH carries it: same, changed (the hunk's context is found but its added lines differ: print both), or missing.
  • The verdict matches by added-line text near the hunk's context, so upstream's moved or reformatted code shows changed, not missing.
  • Exit non-zero on any missing, so it can run before a PR goes ready (measuring.md § Porting).

Notes

  • Control: on 480f6dd vs the fork commit it ported, missing must name the is_value_list hunk; on 97ce97c it must not. (unprobed)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions