Skip to content

fix(org-migration): fail on a bad baseline path, and route the runbook to the transfer steps - #83

Merged
twistedmelonman merged 2 commits into
mainfrom
claude/fix-org-migration-runbook-7fba3b9a
Sep 4, 2026
Merged

fix(org-migration): fail on a bad baseline path, and route the runbook to the transfer steps#83
twistedmelonman merged 2 commits into
mainfrom
claude/fix-org-migration-runbook-7fba3b9a

Conversation

@twistedmelonman

Copy link
Copy Markdown
Member

What happened

Following docs/runbooks/org-migration-rename.md straight through — D → E → F,
no steps skipped — produces 31 lines of missing snapshot at Part F. Nothing is
actually 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.sh never validated the baseline dir. It guards the after-dir
carefully, but a wrong baseline path was not an error — every repo just missed
its baseline file, and the comparison loop reported missing snapshot for the
entire 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 pathdocs/data/org-migration/baseline vs. the
actual 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.md and
were 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 gh wrapper, which fails closed trying to switch to smartwatermelon;
exec bash -l clears it. which gh / hash -t gh reveal it, command -v does
not. This bit on ASIAGO during the live run.

Tests

Two cases in test-verify.sh, both confirmed failing against the unpatched
script before the fix — the failure output reproduces the missing snapshot
noise exactly. Full suite green, shellcheck clean at -S info.

Not a defect

An earlier read of this suggested .github was missing from the baseline (30
files vs. 31 move-list entries). It is not: the snapshot is .github.json, a
dotfile, invisible to a *.json glob. The tooling iterates the move list rather
than globbing, so it was always handled correctly. No change needed.

https://claude.ai/code/session_01P7jGdvXTTzxwxjpf34qUbM

Claude Code Bot 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
@claude

claude Bot commented Sep 4, 2026

Copy link
Copy Markdown

Validation improvements for baseline directory handling.

The new baseline checks in verify.sh (lines 37–49) prevent silent failures when the baseline path is wrong or empty. Tests (Cases 10–11) properly verify the new error messages. Documentation updates clarify the dated baseline convention and execution order. No regressions introduced.

VERDICT: PASS

@twistedmelonman
twistedmelonman merged commit ce3ca69 into main Sep 4, 2026
2 checks passed
@twistedmelonman
twistedmelonman deleted the claude/fix-org-migration-runbook-7fba3b9a branch September 4, 2026 19:54
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.

1 participant