EC-020: WP-144 Phase C, split the fork’s branches — run sheet
Paired WP: WP-144, Phase C only. Purpose: Run Phase C in a fixed order, recording each step’s outcome as it’s done. This is the step that can lose work, so every step that writes to the fork has a check that reads it back. Status: drafted 2026-12-05; not started.
The method is the one Jeff signed off with Phase B: the engine-only
scooby-engine is the base’s tree plus engines/terraglyph/, reached by
restoring the 61 non-engine files to 2982fe324b in one commit, not by 35
reverts (§Result, the
classification).
The app’s branch is classics (WP-144 Decision 2). Phase C’s exit is met by
the builds this sheet records, not fork CI (Decision 5), and the
upstream-candidate branches are cut after Phase D, not here (Decision 6).
Fixed values (from Phase B, re-checked at the pre-flight):
| Name | Value |
|---|---|
Pre-split tip T |
1dfbfb7375 (origin/scooby-engine, the fork #80 merge) |
Base B |
2982fe324b, git merge-base T upstream/master |
| Tag | pre-classics-split-2026-12, on T |
| Non-engine files | 61: 48 modified, 13 added by the fork (the classification’s per-file table) |
Pre-flight
- The pre-flight
verdict is READY and this sheet is on
main. - Re-run Phase A’s inventory (Phase A, “Left before Phase C” item 7):
gh pr list -R barefootbetters/scummvm --state open: nothing againstscooby-engineexcept Mony’s #12, which carries across;- no app session working
scooby-engine(list_sessions, andgit -C C:\dev\scummvm worktree listfor fork worktrees on it); C:\dev\scummvmclean onscooby-engine.
git fetch originandgit fetch upstream masterinC:\dev\scummvm(refs only), thengit rev-parse origin/scooby-engine=T. If the tip moved, stop: classify the new commits the way Phase B did, add them to the classification, and re-run this pre-flight before step 1.git diff --name-status B T -- . ':!engines/terraglyph'lists exactly the 61 files of the classification’s per-file table (48M, 13A).- No branch or tag already named
classicsorpre-classics-split-2026-12on the fork (git ls-remote origin). - Tell the sessions that cut fork work (none at the pre-flight) that
scooby-engineis frozen from step 1 until step 4’s PR merges.
Outcome:
Step 1 — Tag the pre-split tip (time-box: 0:15)
- In a fork worktree from
tools/New-ForkWorktree.ps1(never inC:\dev\scummvm):git tag -a pre-classics-split-2026-12 T -m "Tip of scooby-engine before the Classics split (WP-144 Phase C)". git push origin pre-classics-split-2026-12.git ls-remote origin refs/tags/pre-classics-split-2026-12^{}givesT.
Outcome:
Step 2 — Create classics at the tip (time-box: 0:15)
git push origin T:refs/heads/classics.git ls-remote origin refs/heads/classicsgivesT, and its tree equals the tag’s:git rev-parse origin/classics^{tree}=git rev-parse T^{tree}.
Outcome:
Step 3 — The engine-only branch (time-box: 3:00)
Worktree: tools/New-ForkWorktree.ps1 -Branch wp-144-engine-only (cut from
origin/scooby-engine = T).
3a. Baseline build, before any change. In the MSYS2 UCRT64 shell:
build-tip/:../configure --disable-all-engines --enable-engine=terraglyph, thenmake -j. Keep thisscummvm.exeas the self-test baseline. Record the warning count inengines/terraglyph/.
3b. The restore commit.
git checkout B -- <the 48 modified files>andgit rm <the 13 added files>, both lists taken fromgit diff --name-status B HEAD -- . ':!engines/terraglyph', never typed by hand.git diff --cached --statshows 61 files and nothing underengines/terraglyph/.- One commit, for example
ANDROID: GUI: Move the TV app to the classics branch, whose body names the tag, theclassicsbranch,Band WP-144. - Checks, each one empty:
git diff --name-only B HEAD -- . ':!engines/terraglyph'(nothing outside the engine differs from the base);git diff --name-only T HEAD -- engines/terraglyph(the engine is untouched).
3c. Builds.
- Engine on,
build-on/: the configure line of 3a; no build error, and the engine’s warning count equal to 3a’s. - Engine off,
build-off/:../configure --disable-all-engines; no build error. The launcher starts and lists no TerraGlyph target as playable. - Release line,
build-release/:../configure --disable-all-engines --enable-engine=terraglyph --enable-release --disable-debug, astools/Make-Release.ps1runs it; no warning inengines/terraglyph/.
3d. Gen 1 self-tests. The headless recipe the engine’s WPs use:
--debuglevel=11, enable_unsupported_game_warning=false, --logfile,
launched from the UCRT64 shell, the same random_seed in both configs.
- For
showdownandphantomknight: the baseline exe from 3a twice (the noise floor), then thebuild-onexe once. - Each target’s
build-onlog differs from the baseline by no more than the two baseline runs differ from each other, and everycheckline matches.
Outcome:
Step 4 — Fork PR into scooby-engine (time-box: 0:30, then Jeff’s review)
- Push
wp-144-engine-only; open the PR withgh pr create -R barefootbetters/scummvm --base scooby-engine. The body gives 3b’s checks, 3c’s builds, 3d’s self-test result, the tag andclassics. - Jeff reviews and merges. Record the merged commit as
R(the restore commit’s SHA onscooby-engine, or the merge commit if it’s merged with one). - After the merge:
git diff --name-only $(git merge-base origin/scooby-engine upstream/master) origin/scooby-engine -- . ':!engines/terraglyph'is empty, andgit merge-base --is-ancestor T origin/scooby-engineholds. - Fast-forward
C:\dev\scummvm(git pull --ff-only; it stays onscooby-engine).
Outcome:
Step 5 — Mony and #12 (time-box: 0:10)
- Jeff tells Mony the split is in, or says yes to a comment on
#12 before one is
posted. The message asks him to rebase #12 onto
scooby-engineatRand repoint it there. - Record the date the hold on
engines/terraglyph/changes starts (WP-144 Phase C step 5). It lasts until #12 merges.
Outcome:
Step 6 — classics records the split without taking it (time-box: 1:30)
A plain merge of scooby-engine into classics would apply R to
classics and delete the TV app, since the two branches’ merge base is T.
So classics merges R with the ours strategy: the history records the
split as merged, the tree stays the TV app’s, and every later engine commit
merges in normally.
Worktree: tools/New-ForkWorktree.ps1 -Branch wp-144-classics-merge -Base
classics.
git merge -s ours --no-ff R -m "Merge scooby-engine's split; classics keeps the TV app (WP-144)".git rev-parse HEAD^{tree}=git rev-parse T^{tree}. If it doesn’t, stop.- If
scooby-enginehas commits afterR(it shouldn’t, under the freeze), merge them now with a normal merge, and list them. - Fork PR into
classics; Jeff reviews and merges. - APK: build
classicswithtools/Build-AndroidRelease.ps1the way WP-088’s dry run did onT.unzip -llists the same files as the dry-run bundle’s APK (or a build of the tag, if that bundle is gone), with sizes equal apart from the version and native code. - TCL 65Q77K, Windows
adb,adb install -ronly, never clear data: the app starts, the grid shows its covers, one TerraGlyph game launches, and the Get and Update tiles show as before.
Outcome:
Step 7 — Upstream-candidate branches
Not in Phase C (WP-144 Decision 6): each unit’s branch is cut from upstream’s
master when that unit is weighed, after Phase D. Nothing to do here.
Step 8 — Point the scripts at the right branch (time-box: 1:00)
In this repo, on its own branch and PR.
- For each script that names
scooby-engine(at the pre-flight:Build-AndroidRelease.ps1,Make-Release.ps1,New-GamePackage.ps1,New-RuntimeFileList.ps1,Update-Fork.ps1,Check-ScummvmStyle.ps1,New-ForkWorktree.ps1), record whether it builds or checks the engine or the TV app. - TV scripts default to
classics; engine scripts keepscooby-engine.New-ForkWorktree.ps1keepsscooby-engineas its default-Baseand its help shows-Base classicsfor TV work. - Each changed script runs once (
-WhatIfor a dry run where it has one) against the branch it now names.
Outcome:
Step 9 — Close (time-box: 0:45)
- WP-144 §Result gets a “Phase C” subsection: the tag,
classicsatT,R, step 6’s merge, the PR links, the build and self-test results, and the Phase C exit check. - WP-144’s status and WORK_INDEX row move to Phase D.
- Remove this phase’s fork worktrees once their PRs report
MERGED(gh pr view -R barefootbetters/scummvm), and delete merged branches only then. - Hand-offs, one line each in §Result: WP-088 resumes with a fresh
pre-flight against
classics; #209’s two Copilot instruction files can go toscooby-enginein a commit of their own; the hold for #12 is on.
Outcome:
Definition of done
- Every step’s outcome is recorded above (step 7 has none).
- WP-144’s Phase C exit is met: the builds and self-tests of step 3 on
scooby-engine, and step 6’s APK on the TCL forclassics(Decision 5). - No pre-split commit is lost: the tag is on the fork at
T, andTis an ancestor of bothscooby-engineandclassics. - WP-144’s status and WORK_INDEX row are updated.
If something goes wrong
- Before step 4’s merge, nothing on
scooby-enginehas changed; delete the work branch and start again fromT. - After it, the tag and
classicsboth holdT. Undo with a revert ofRonscooby-enginethrough a fork PR, never a force-push.
Out-of-scope captures
Record temptations here as one-line follow-ups and move on. Not this phase:
syncing scooby-engine with upstream past B, offering any unit upstream,
the Classics repo (Phase D), and #12 itself.
-