Skip to content

feat: add stateless changeset merge and propagation - #43

Merged
shaug merged 1 commit into
mainfrom
scott/33-stateless-merge-propagate
Jul 22, 2026
Merged

feat: add stateless changeset merge and propagation#43
shaug merged 1 commit into
mainfrom
scott/33-stateless-merge-propagate

Conversation

@shaug

@shaug shaug commented Jul 22, 2026

Copy link
Copy Markdown
Owner

TL;DR

Adds stateless, resumable merge-and-propagate commands for carved changeset chains, with explicit mutation authority and fresh GitHub safety checks before every remote update.

Summary

  • Add dry-run-by-default propagate and merge-propagate commands that select an exact PR or changeset index and rehydrate state from git and GitHub rather than local plan/state files.
  • Support rebase and cherry-pick propagation, resume partial propagation from a fresh clone, and rehydrate a deleted merged branch from verified PR metadata.
  • Fence every mutation with fresh PR identity, ownership, base, remote-head, and merge-lineage checks; constrain force-with-lease pushes to downstream changeset branches.
  • Verify the exact merged PR and commit on remote main before propagation, update downstream PR bases and (i of N) titles by explicit PR number, and skip already-completed updates safely.
  • Consolidate GitHub PR payload decoding while preserving source-branch filtering and exact-number verification.

Safety

  • Remote mutation requires both --no-dry-run and --ack-merge-and-propagate.
  • Base, source, and merged upstream branches are never force-pushed.
  • Downstream pushes use exact leases and are immediately reauthorized against live GitHub and remote state.
  • Merge targets must be open, same-repository, exact-head candidates based on mainline, with every preceding changeset already verified on mainline.

Validation and review

  • Exact candidate: 925affa807c203824127a0fe5e0fb084f14f378d
  • Base: 2c82f2ed6c7ca10f1797656938325df18d7e6f96
  • just format: passed; candidate remained unchanged.
  • just test: passed, including 84 carve-changesets tests.
  • git diff --check: passed.
  • Repository-owned aggregate review: schema-valid clean result with zero findings for this exact candidate and base.
  • Frozen skills/prepare-changesets/: zero diff.

Authorized lint exception

just lint reaches skill validation and stops only because skills/carve-changesets/SKILL.md is intentionally absent pending the packaging child (#35):

Validation failed for skills/carve-changesets:
  - Missing required file: SKILL.md

This exact limitation is authorized for #33; all preceding lint checks pass. No other lint failure is waived.

Tickets

Fixes #33

## Summary
- Add dry-run-first merge and propagation commands that rehydrate from live git and GitHub evidence
- Verify merged mainline state, exact downstream branch identities, and explicit PR edits before continuing
- Cover rebase and cherry-pick propagation from a state-free local bare-remote fixture

## Why
- Make Phase 2 resumable from a fresh clone without plan or state files
- Keep merge authority explicit and prevent base, source, or upstream force pushes
@shaug
shaug merged commit 0bf347b into main Jul 22, 2026
1 check failed
@shaug
shaug deleted the scott/33-stateless-merge-propagate branch July 22, 2026 00:59
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.

Build carve-changesets merge and propagation on rehydrated GitHub state

1 participant