fix(org-migration): fail on a bad baseline path, and route the runbook to the transfer steps - #83
Merged
Conversation
added 2 commits
September 4, 2026 12:17
…k to the transfer steps Running the runbook straight through (D -> E -> F) hits `verify.sh` before any repo has moved, and with a baseline path that does not exist. Neither failure announced itself: - `verify.sh` validated the after-dir but never the baseline dir. A wrong path meant every repo simply missed its baseline file, so the comparison loop printed "missing snapshot" for the whole move list -- 31 lines that read as catastrophic drift rather than as one typo. Now it fails on the path and names it. An existing-but-empty baseline dir is the same class of mistake and is checked too. - The runbook's Part F cited `docs/data/org-migration/baseline`; the directory is dated, `2026-09-04-baseline`. - Parts A-E cover design Step 2 only, but Part F verifies a transfer that no part of the runbook performs -- Steps 3 and 4 live in the design doc and were never linked. Add a stop block before Part F with the transfer commands and the pointer, so the document no longer reads as complete start-to-finish. Part G additionally notes that a shell opened before the rename holds a stale sourced `gh` wrapper, which fails closed trying to switch to `smartwatermelon`; `exec bash -l` clears it. This bit on ASIAGO. Tests: two cases in test-verify.sh, both confirmed failing against the unpatched script before the fix. Claude-Session: https://claude.ai/code/session_01P7jGdvXTTzxwxjpf34qUbM
The prior runs failed at workflow resolution (0s, no jobs): Actions does not follow owner redirects for reusable workflow references, and smartwatermelon/github-workflows did not literally exist between the org creation and the transfer. Nothing in the tree changed. Claude-Session: https://claude.ai/code/session_01P7jGdvXTTzxwxjpf34qUbM
|
Validation improvements for baseline directory handling. The new baseline checks in VERDICT: PASS |
twistedmelonman
deleted the
claude/fix-org-migration-runbook-7fba3b9a
branch
September 4, 2026 19:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What happened
Following
docs/runbooks/org-migration-rename.mdstraight through — D → E → F,no steps skipped — produces 31 lines of
missing snapshotat Part F. Nothing isactually wrong: the repos have not been transferred yet, and the baseline path in
the runbook does not exist. Neither condition announced itself.
Three fixes
verify.shnever validated the baseline dir. It guards the after-dircarefully, but a wrong baseline path was not an error — every repo just missed
its baseline file, and the comparison loop reported
missing snapshotfor theentire move list. That reads as catastrophic drift rather than as one typo. It
now fails on the path and names it, and treats an existing-but-empty baseline dir
as the same class of mistake.
Part F cited the wrong path —
docs/data/org-migration/baselinevs. theactual dated
docs/data/org-migration/2026-09-04-baseline.The runbook never mentions the transfer. Parts A–E cover design Step 2 only,
but Part F verifies a transfer that no part of the document performs — Steps 3
and 4 live in
docs/superpowers/specs/2026-09-03-org-migration-design.mdandwere never linked. A stop block before Part F now carries the transfer commands
and the pointer, so the runbook stops reading as a complete start-to-finish
procedure.
Part G also gains a note that a shell opened before the rename holds a stale
sourced
ghwrapper, which fails closed trying to switch tosmartwatermelon;exec bash -lclears it.which gh/hash -t ghreveal it,command -vdoesnot. This bit on ASIAGO during the live run.
Tests
Two cases in
test-verify.sh, both confirmed failing against the unpatchedscript before the fix — the failure output reproduces the
missing snapshotnoise exactly. Full suite green, shellcheck clean at
-S info.Not a defect
An earlier read of this suggested
.githubwas missing from the baseline (30files vs. 31 move-list entries). It is not: the snapshot is
.github.json, adotfile, invisible to a
*.jsonglob. The tooling iterates the move list ratherthan globbing, so it was always handled correctly. No change needed.
https://claude.ai/code/session_01P7jGdvXTTzxwxjpf34qUbM