fix(ce-babysit-pr): restore managed-stack propagation after gh-stack atomic push fix

Open
#1,182 1 comment 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@tmchow is already working on this.

Since Jul 18, 2026.

Assessment

This issue has not been assessed yet.

Description

Problem

ce-babysit-pr currently treats gh stack push as an atomic, all-or-nothing update of rewritten dependent branches.

The installed gh-stack v0.0.8 uses explicit per-branch --force-with-lease values, but its push command passes atomic=false even though its help and documentation promise --atomic. A rejected multi-branch push can therefore leave only part of the remote stack updated.

Upstream report: https://github.com/github/gh-stack/issues/216

Interim behavior

Until an upstream release provides the documented atomic guarantee, babysitting should fail closed at the managed-stack mutation boundary:

  • Continue watching and reporting review, CI, and branch state.
  • Before any target-head push that would require upstack propagation, verify that the stack push path has the required atomic capability.
  • If that capability is absent or cannot be proven, do not push the target or begin the dependent rebase. Surface a concise blocked-external / stack-sync residual that links the upstream dependency.
  • Ordinary non-stack PR maintenance and manual dependency chains keep their existing behavior.

This avoids making the target move when the skill cannot safely propagate every dependent branch as one transaction.

Follow-up after the upstream fix

  • Identify the first gh-stack release containing the fix for github/gh-stack#216.
  • Add a version or capability gate that proves gh stack push supplies both explicit expected-OID leases and an atomic multi-ref update.
  • Re-enable autonomous manager-owned upstack propagation only when that gate passes.
  • Keep the active target excluded from the cascading rebase and force update.
  • Abort and surface semantic rebase conflicts rather than resolving another PR layer's intent.
  • After the push, verify every affected remote dependent matches its intended local OID before resuming the watch.
  • Update SKILL.md, references/watch-loop.md, the public skill page, and contract tests so the documented failure semantics match the executable dependency.

Acceptance criteria

  • Older, unknown, or affected gh-stack versions stop before the first target mutation that would require dependent propagation.
  • A fixed and verified version can rebase dependents and push them with exact leases in one atomic transaction.
  • A rejected transaction is treated as updating no remote dependent refs.
  • Tests cover the capability gate, target exclusion, exact-lease requirement, atomic requirement, and blocked-external fallback.
Dominant language
TypeScript
Stars
25.6k
Forks
2.1k
Avg merge
3h 57m
Merged PRs (30d)
170

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from EveryInc/compound-engineering-plugin

All issues in EveryInc/compound-engineering-plugin

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.