:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(devex): explain duplicate stack push runs in the stacking skill (#106895)
Julian Bez2308e354a55b
diff --git a/.agents/skills/stacking-prs/SKILL.md b/.agents/skills/stacking-prs/SKILL.mdindex c121ade23e5e..cb7debc5f7a7 100644--- a/.agents/skills/stacking-prs/SKILL.md+++ b/.agents/skills/stacking-prs/SKILL.md@@ -82,6 +82,8 @@ gh stack sync --prune # also delete local branches for merged PRs- `gh stack view --short` shows status (`--json` for scripting); a `⚠` means that layer needs a rebase, which blocks merging. `gh stack checkout <stack-number|PR|URL>` pulls down and tracks a stack you don't have locally, including a teammate's.- `gh stack modify` interactively reorders, folds, drops, or renames layers. `gh stack unstack` removes the stack on GitHub (`--local` to only drop local tracking).- Batch work before syncing. Each sync force-pushes and re-runs a full CI matrix for every rebased layer, so sync when you need the rebase, not to track master.+- A push that moves a layer and its base in one go sends that layer two `synchronize` events, one per moved ref (the same behavior [git-spice#966](https://github.com/abhinav/git-spice/issues/966) reports). Every workflow then starts twice, and a workflow with a concurrency group cancels the older run, so a `cancelled` row next to a passing one is this duplicate, not a test failure. To avoid it, push the layers one at a time, bottom first, about a minute apart: each layer then gets the extra run on its old head, and its own push supersedes that run cleanly.+- A cancelled duplicate still blocks the merge, because GitHub keeps its checks next to the newer green ones. Rerun it with the "Cancelled runs on the head" recipe in `/merging-prs` instead of pushing again. When `Django Tests Pass` fails because Depot cancelled its run for the event, its log lists the retry steps: retry the Depot run, then `gh run rerun <run id> --failed` relays the new result.- Layer branches move without you: ReviewHog and other bots push fix commits straight onto PR branches. `gh stack sync` fetches first and pushes with `--force-with-lease`, so it refuses when a branch moved; treat that refusal as "someone committed here, go read it", not "retry". Before any manual `git push` or rebase of a layer, `git fetch origin` and fast-forward onto the remote head. Never plain force-push a layer branch.- The `ci:preflight` pre-push hook runs on these pushes like any other; never bypass it.