runtime-key.json schema mismatch: m2pack CLI output vs launcher RuntimeKey model #3
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?
m2pack export-runtime-key --format jsonand the launcher'sRuntimeKey.csdisagree on theruntime-key.jsonschema. Nothing connects them end-to-end today because the release pipeline never used the CLI output directly — manual hand-written JSON was used in the first release.The two schemas
m2pack export-runtime-keyoutput (m2pack-secure/docs/launcher-contract.md):Launcher
RuntimeKeymodel (jann/metin-launchersrc/Metin2Launcher/Runtime/RuntimeKey.cs):Two mismatches
key_idtype: CLI emits1(integer), launcher expects"1"(string). System.Text.Json throwsJsonException: The JSON value could not be converted to System.String. Path: $.key_id.sign_public_key_hex, launcher expectssign_pubkey_hex. Silently becomes empty string on parse → validator rejects as "not 64 hex chars".Reproduction
Hit tonight during the
2026.04.15-m2pack-v2release. Worked around by hand-writingruntime-key.jsonin the launcher-expected shape.Fix options
Option A (preferred): m2pack emits the launcher-compatible shape (
key_idstringified,sign_pubkey_hex). Bonus: drop theversion/mapping_namefields from the JSON — they are Windows-shared-memory bookkeeping that env-var / CLI deliveries don't use. The binaryM2KEYS1format still uses them, that's orthogonal.Option B: launcher
RuntimeKeytolerates both shapes (JsonPropertyNamewith fallback alternate name,key_idaccepts either int or string via a custom converter).Both are small changes. I'll do B on the launcher side tonight (opening a follow-up commit on PR #1) so no released launcher binary ever blows up on CLI output, but A should still land on the m2pack side to make the JSON a proper contract between the two.
Related
jann/metin-launcherPR #1 — will add the launcher tolerant-parse fixmetin-server/m2dev-client#10— runtime-key.json pipeline integration (this issue is a sub-blocker for it)