tooling: batch pck → m2p migration script with per-pack validation #1
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Today I mass-migrated the remaining 68 legacy
.pckgroups from the canonical client runtime into.m2pformat in a single bash loop. It worked (68/68 build OK, 68/68m2pack verifyOK, client boots all 110 m2p cleanly), but it was done entirely in terminal history — no script, no per-pack gate, no record of which packs produced which content issues.This is fine as a one-off, but the migration workflow documented in
docs/migration.md('Practical migration loop') describes a per-pack gate with validation:Mine skipped steps 4, 6, 7. For a production cutover that's not OK.
What needs to exist
A
scripts/migrate_pck_group.py(or similar) that given:m2dev-client/assets/<Name>).pckfor comparisonproduces the
.m2p, runsm2pack verify, runsm2pack diffagainst the source, and runs the runtime gate (validate_runtime_gate.py). Fail-fast if anything regresses the known-issues baseline.A second script
scripts/migrate_all_pck.pythat drives the above over a whole runtime tree with a progress log and a JSON report (per-pack pass/fail, entry counts, size before/after).Today's ad-hoc loop for reference:
68 packs converted in ~2 minutes wall clock, total
.m2psize ~753 MB vs.pckat ~1059 MB (-29%).None of the 68 have been runtime-validated yet — client boots and Python init completes, but no in-game walkthrough or scenario coverage was exercised. That part needs to happen before this can be trusted for a production release.