diff --git a/profiles/skill-manifest.json b/profiles/skill-manifest.json index c5348e9..b515bba 100644 --- a/profiles/skill-manifest.json +++ b/profiles/skill-manifest.json @@ -331,7 +331,7 @@ "upstream": "pstack", "source": "skills/poteto-mode/playbooks/shipping.md", "sourceDigest": "bf56339bdf7e0223bcff5abf4e8599e3f5b547b3fcc3b4ce9475e6e7dda14a9f", - "targetDigest": "6640b6c18a1c0cd8d6ea7db8109d7809215e8ad44dc1f4de34fe146f0f617878" + "targetDigest": "b51384b39dfc0c06b662a1c683670b9f93c9a90201d4e94cc36d1987cafa9644" }, "skills/meta-mode/playbooks/trace-forensics.md": { "upstream": "pstack", diff --git a/skills/meta-mode/playbooks/shipping.md b/skills/meta-mode/playbooks/shipping.md index 8b93856..bc0a38a 100644 --- a/skills/meta-mode/playbooks/shipping.md +++ b/skills/meta-mode/playbooks/shipping.md @@ -4,11 +4,11 @@ This is the half after `playbooks/babysit.md`. -1. **Resolve the forge, then verify every PR independently.** GitHub CLI (`gh`) is the default. If `command -v origin` succeeds and Origin can resolve the repository, use `origin pr ...` for PR view, watch, edit, and merge operations. Otherwise stay on `gh` and record the fallback. Never require Graphite (`gt`). Use one read-only worker per PR. Each worker runs in a configured environment and exercises the real surface with the active harness's runtime driver. Each returns `PASS`, `PASS+NOTES` or `FAIL` and records the verdict on its PR. A clean CI result is not a runtime verdict. Record the PR number, verdict, head SHA, base SHA, base branch, stable patch-id, verifier, and runtime receipt in the PR and durable decision trail. Evidence must describe a runtime or behavioral check, never CI alone. +1. **Resolve the forge, then verify every PR independently.** GitHub CLI (`gh`) is the default. If `command -v origin` succeeds and Origin can resolve the repository, use `origin pr ...` for PR view, watch, edit, and merge operations; step 5 decides which command merges. Otherwise stay on `gh` and record the fallback. When the user's or the repository's instructions name a merge gate command, disarm auto-merge on every PR you will land before anything else (`gh pr merge --disable-auto`, or the Origin equivalent), because a check that passes meanwhile would let the forge merge it without the gate; if you may not or cannot confirm it, stop and report. Never require Graphite (`gt`). Use one read-only worker per PR. Each worker runs in a configured environment and exercises the real surface with the active harness's runtime driver. Each returns `PASS`, `PASS+NOTES` or `FAIL` and records the verdict on its PR. A clean CI result is not a runtime verdict. Record the PR number, verdict, head SHA, base SHA, base branch, stable patch-id, verifier, and runtime receipt in the PR and durable decision trail. Evidence must describe a runtime or behavioral check, never CI alone. 2. **Land only the contiguous verified run rooted at the bottom.** Walk up from the lowest unmerged PR and stop at the first one without a passing verdict, where both `PASS` and `PASS+NOTES` pass. A verified PR sitting above an unverified one is not landable. Report the ceiling as a PR number and say what breaks the chain. 3. **Re-check that each verdict still describes the patch.** Record the verdict head SHA, base SHA, base branch, and stable `git patch-id` of that PR's base-to-head diff. Read back the recorded verdict and compare those fields against the live PR. A missing record or a stale head, base, branch, or patch identity is not verified. A rebase or base retarget rewrites SHAs and can silently invalidate a verdict without touching a check. Before landing a PR, compare the recorded patch-id with its current base-to-head patch-id. When the patch changed only in tests, docs, or lint config, check each lane under [the build-output reuse procedure](../references/build-output-reuse.md). Reuse only lanes whose compared build differences are all documented noise. Dev-server lanes and lanes with no saved build output must rerun. Re-verify any other changed patch. When the patch did not change, keep the code verdict but re-run mergeability and CI at the current head. Never use matching commit messages or a green check from an older SHA as a substitute. 4. **Prepare only the bottom PR.** Fetch current trunk. Rebase the lowest verified branch onto the exact trunk tip when needed, push it, and retarget only that PR to trunk with `origin pr edit --base ` or `gh pr edit --base `. Re-run step 3 after the push. Do not retarget, arm, or merge descendants yet. -5. **Land one PR at a time.** If the bottom PR is mergeable now, squash it with `origin pr merge --squash` or `gh pr merge --squash`. If requirements are still running and the user asked for merge-when-ready, arm only that PR with `origin pr merge --squash --auto` or `gh pr merge --squash --auto`. Origin's `--auto` is Origin merge-when-ready. GitHub's `--auto` is GitHub auto-merge. Wait for that PR to merge before preparing the next one. +5. **Land one PR at a time.** When the user's or the repository's instructions name a merge gate command, land the bottom PR only through that command and never arm `--auto`, because a gate checks the PR when it merges and merge-when-ready lands it later without the gate. If the gate refuses because checks are still running, wait for those checks to finish (`gh pr checks --watch` or `origin pr checks --watch`), not for step 8's merge, then re-run step 3 and run the gate again. Otherwise, if the bottom PR is mergeable now, squash it with `origin pr merge --squash` or `gh pr merge --squash`. If requirements are still running and the user asked for merge-when-ready, arm only that PR with `origin pr merge --squash --auto` or `gh pr merge --squash --auto`. Origin's `--auto` is Origin merge-when-ready. GitHub's `--auto` is GitHub auto-merge. Wait for that PR to merge before preparing the next one. 6. **Do not read GitHub `autoMergeRequest` as stack readiness.** At most it says GitHub auto-merge was requested for one GitHub PR. It does not prove Origin merge-when-ready is armed, that a descendant is queued, that a patch verdict is current, or that the contiguous stack is safe. Confirm the active forge's state for the current bottom PR, and say that the state is unknown if the active forge cannot report it. 7. **Recompute after every merge.** Fetch trunk, confirm the merged SHA is present, drop the merged PR from the frozen bottom-to-top list, and inspect the new bottom PR's base, head, checks, and patch-id. A host may retarget a child automatically, but do not assume it did. Repeat steps 3 through 6 for that one PR. Independent work stays outside this chain and ships on its own. 8. **Watch the current frontier until it merges or fails. Do not mutate the queue around it.** On a host with native pull request watching, read `../references/hosts/.md` before arming the watcher or waiting on the merge below. With Origin, use `origin pr view --checks --comments` and `origin pr checks --watch`, then re-read the PR until it reports merged or blocked. With GitHub, use `bun "/watch-pr/watch-pr" --queued-stack --stack-prs ` only as an event wake and poll `gh pr view --json state,mergedAt,mergeStateStatus,statusCheckRollup,autoMergeRequest` after each wake, ignoring `READY` until `mergedAt` is non-null or `state` is `MERGED`. Only then run step 7. Hard-fail only when `state` is `CLOSED` with no `mergedAt`, a required check concludes `FAILURE` or `CANCELLED` and blocks merge after auto-merge is no longer pending, or `mergeStateStatus` is `UNSTABLE` or `DIRTY` with no auto-merge pending. `BLOCKED` while checks are pending or auto-merge is armed is not failure. Do not use Babysit's queued `WAITING`/`merge-queue` stop condition here. Hold the watch under `/loop` in dynamic mode. Report each merge and the new ceiling. If the queue stalls, diagnose before mutating.