Skip to content

ci(nightly): fail source_ref runs when the stack is missing patches from main #94

Closed

Description

@incognitojam

Context

A source_ref dispatch (#91) promotes a maintainer-resolved patch stack through the verified pipeline. The promotion's lease and moved-main check guard against main moving during the run, but nothing verifies the provided stack already contained everything on main when it was cut.

This bit us on 2026-08-11: the conflict resolution was cut before #87/#90/#91/#92 merged, and promoting it silently rolled main's workflow files back to the pre-merge state. #93 restored the dropped commits by cherry-pick. Until this guard exists, the operational rule is: refresh the resolution from current main immediately before dispatching.

Proposal

In prepare, when source_ref is set, compare patch-ids: every commit reachable from main but not from upstream must have a patch-id-equivalent commit in the candidate (git cherry / git patch-id machinery). If any are missing, fail the run loudly, listing the missing commits, before anything is verified or promoted.

Patch-id equivalence is imperfect — a resolution that legitimately reshapes a patch (conflict resolution changed its hunks) will look "missing". The check should therefore report clearly rather than guess, and may need an explicit override input (or acceptance that reshaped patches produce false positives the maintainer confirms by re-dispatching with an override). Design for loud-and-clear over clever.

Acceptance sketch

  • A source_ref stack cut from a stale main fails prepare with the dropped commits listed by subject.
  • A fresh resolution (all main patches present, possibly reshaped by conflict resolution) can still be promoted, via whatever override/confirmation shape review settles on.
  • Normal scheduled runs (no source_ref) are unaffected.

Activity

  1. added a commit that references this issue on Aug 12, 2026
    9d444db
  2. added 6 commits that reference this issue on Aug 12, 2026
    81eef20
    2798131
    08a1449
    cd6aa46
    92f1b2b
    70c3970
  3. added 4 commits that reference this issue on Aug 14, 2026
    383c7d7
    ed85a0c
  4. 16 remaining items

  5. added 3 commits that reference this issue on Aug 19, 2026
    f94b5c0
    a2aa1fe
    d86f1d2
  6. added 6 commits that reference this issue on Aug 20, 2026
    bba60dc
    61571e0
    0469177
    41e0746
    e023d10
    a394fb2
  7. added 6 commits that reference this issue on Aug 27, 2026
    31c25f2
    4ceb9ec
    f53e5e5
    b164ab1
    d5e8dfa
    3ba9083
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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions