Skip to content

#45 PR 3: installer globals block (folds #49; #47 deferred to BYOK)#81

Merged
aradanmn merged 5 commits into
mainfrom
feat/issue-45-pr3-installer-globals
Jul 11, 2026
Merged

#45 PR 3: installer globals block (folds #49; #47 deferred to BYOK)#81
aradanmn merged 5 commits into
mainfrom
feat/issue-45-pr3-installer-globals

Conversation

@aradanmn

Copy link
Copy Markdown
Owner

Part 3 of 3 for #45 (after #76 resolvers, #77 PR 2a, #78 PR 2b) — the installer-side globals block. Folds #49 (runtime-module manifest). Adjusted scope per owner (2026-07-10): #47 (CurseForge token dedup) is deferred to the BYOK branch (wip/curseforge-byok), which rewrites the token scheme entirely — deduplicating code that branch deletes would only manufacture conflicts.

Commits

  1. Constants pairing + literal sweep — the installer is a separate process (curl|bash-able) so it can't source runtime_context.sh; a documented pairing block in the entry is the install-time home of MCSS_MAX_PLAYERS / MCSS_INSTANCE_PREFIX / MCSS_ACCOUNT_PREFIX. Swept instance_creation {1..4}/latestUpdate-, main_workflow texts + the accounts.json profile check (expected P1..PN list now derived), desktop_launcher icon fallback.
  2. D15: MCSS_REPO_RAW_URL — one home for the raw-content URL (5 sites). Also made test_installer T7.7 hermetic (it was stubbing 5 of 10 modules and quietly downloading the rest from live GitHub mid-test).
  3. API bases + heap unificationMODRINTH_API_BASE / CURSEFORGE_API_BASE / FABRIC_META_BASE; configure_polymc_defaults consumes the same MCSS_MAX/MIN_MEM_MB pair the instance writer uses.
  4. D16: uninstaller — deletion lists derive from resolved TARGET_DIR/PRISM_DIR (env-overridable, documented in --help); add-to-steam.py accepts explicit root via MCSS_TARGET_DIR/argv.
  5. Folds Runtime module manifest maintained in three places — a missed edit is silent feature loss #49: modules/runtime_modules.list — one manifest read by the launcher, installer entry, launcher_setup, and deploy.sh (sed parser deleted). Manifest deploys with the tree; missing = FATAL, never a silent short list.

Deliberate behavior deltas (flagging for review)

  • PolyMC global heap default 4096 → 3072 MiB (matches per-instance policy; 4×3072 fits a 16 GB Deck; splitscreen instances already said 3072).
  • Desktop-launcher icon dir moves $PWD$TARGET_DIR/minecraft-splitscreen-icons (Installer clutters $HOME — relocate Java dir out of ~/java and stop editing ~/.profile #41 straggler: it used to drop a folder wherever the installer was run). Uninstaller keep-data mode removes it with the other launcher files.
  • Launcher now requires modules/runtime_modules.list beside its modules (installer + deploy.sh both ship it; any normal upgrade provides it).

Deliberately NOT touched (BYOK blast radius)

mod_management.sh (6 token.enc URLs + 17 API-base sites) and version_management's CurseForge hunk (lines 207-235, verified against the wip/curseforge-byok diff) — those sites consume the new constants in that branch. The installer also deliberately does not pass MCSS_TARGET_DIR to add-to-steam.py: forcing it would repoint a dev machine's Steam shortcut off the repo clone, and appids are derived from the Exe path (new entry, orphaned artwork).

Validation

  • Unit: test_installer 10/10 (now hermetic), all CI-gated suites at baseline (runtime_context 22/22, instance_lifecycle 11/11, watchdog 10/10, dock_detection 8/8, controller_monitor 7, window_manager 7).
  • deploy.sh: fresh deploy to a scratch target ships 12 files (launcher + manifest + 10 modules), --check clean.
  • Uninstaller: --dry-run in both modes against fake roots — lists derive from overrides, globs expand.

Merge gate (per plan)

stage0b + stage1 + docked launch on the Deck; D16 additionally wants a supervised uninstall → reinstall with the deletion list eyeballed first (uninstaller changes are MED-HIGH risk — it deletes files).

🤖 Generated with Claude Code

https://claude.ai/code/session_01AUfc9vZUp7Fyq4UjhJa4nm

Scott and others added 5 commits July 10, 2026 21:21
The installer is a separate process (often curl|bash, no checkout) so it
cannot source runtime_context.sh — instead a documented pairing block in
the installer entry is the INSTALL-TIME home of MCSS_MAX_PLAYERS /
MCSS_INSTANCE_PREFIX / MCSS_ACCOUNT_PREFIX, whose play-time home is
runtime_context.sh (PLAN Part 4 'two homes, documented pairing').

Swept: instance_creation {1..4} loops + latestUpdate- names,
main_workflow user texts + the accounts.json profile check (expected
P1..PN list now derived, not retyped), desktop_launcher instance-icon
fallback path. Deliberate delta: desktop_launcher's icon dir moves from
$PWD (dropped a folder wherever the installer was run — #41 home-hygiene
straggler) to $TARGET_DIR/minecraft-splitscreen-icons.

mod_management.sh / version_management.sh untouched: their literals are
inside the CurseForge code the BYOK branch (wip/curseforge-byok)
rewrites; they migrate there.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AUfc9vZUp7Fyq4UjhJa4nm
…ent URL

The host/repo/ref triple was retyped at every fetch site. The installer
entry now exports MCSS_REPO_RAW_URL (built from REPO_REF once) and the
non-BYOK sites consume it: entry's module base URL, launcher_setup's
launcher + runtime-module URLs, steam_integration's add-to-steam.py,
main_workflow's accounts.json.

The 7 token.enc URL sites (mod_management ×6, version_management ×1)
are left verbatim: they live inside the CurseForge code the BYOK branch
deletes/rewrites, and touching them here would only manufacture
conflicts for it.

Also makes test_installer T7.7 hermetic: it stubbed only 5 of the 10
runtime modules and quietly downloaded the other 5 from live GitHub
inside install_runtime_modules (the 'network quirk' that keeps this
suite out of the CI gate). All 10 stubbed; the mocked
MCSS_REPO_RAW_URL points at example.invalid to prove no network access.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AUfc9vZUp7Fyq4UjhJa4nm
One home per mod-platform API base — MODRINTH_API_BASE /
CURSEFORGE_API_BASE / FABRIC_META_BASE, exported from the installer
entry (env-overridable). Swept the sites outside the BYOK blast radius:
version_management's Modrinth query + Fabric loader query,
instance_creation's dependency resolver, lwjgl_management's game-versions
query. NOT swept: mod_management.sh (17 sites) and version_management's
CurseForge query at :234 — both inside code wip/curseforge-byok
rewrites; they consume the constants there.

Heap: configure_polymc_defaults now consumes the same MCSS_MAX/MIN_MEM_MB
pair the per-instance writer uses (home: instance_creation.sh).
DELIBERATE DELTA: the PolyMC global default drops 4096 → 3072 MiB,
matching the per-instance policy (4 × 3072 fits a 16 GB Deck; the old
4096 here was exactly the drift #45 exists to kill). Splitscreen
instances are unaffected (their instance.cfg already said 3072).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AUfc9vZUp7Fyq4UjhJa4nm
…ed roots

The uninstaller retyped ~/.local/share/PolyMC (and PrismLauncher, and the
.desktop basename) into every FULL/KEEP_DATA target. It is standalone
(curl|bash-able) so it cannot source runtime_context.sh — TARGET_DIR /
PRISM_DIR are now resolved once at the top (env-overridable, documented
pairing with the installer entry + runtime_context's launcher-root
probe) and every deletion derives from them. usage() documents the env
knobs. keep-data mode also removes the new
TARGET_DIR/minecraft-splitscreen-icons dir (c1 moved it under the tree).

add-to-steam.py accepts an explicit root — MCSS_TARGET_DIR env or
argv[1] — ahead of its probe cascade, for callers that know the install
root. The INSTALLER deliberately does NOT pass it: its probe prefers a
repo checkout over the deployed tree, and on a dev machine (the Deck)
forcing TARGET_DIR would repoint the Steam shortcut Exe — appids are
deterministic from the Exe path, so that mints a NEW Steam entry and
orphans the existing artwork/config.

Verified: --dry-run in both modes against fake roots — deletion lists
derive from the overrides, glob targets still expand.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AUfc9vZUp7Fyq4UjhJa4nm
…ur readers

The runtime module list was hand-maintained in three places (launcher
prologue for-loop, launcher_setup's runtime_mods array, installer
entry's RUNTIME_MODULE_FILES) plus deploy.sh sed-parsing launcher_setup's
bash array as a fourth reader. A module added to one and not another =
silent feature loss at whichever boundary was missed.

modules/runtime_modules.list (one name/line, comments allowed, source
order) is now read by all four:
- minecraftSplitscreen.sh sources from it at launch (runtime_context.sh
  skipped in the loop — sourced explicitly first); manifest missing =
  FATAL like a missing runtime_context.sh, not a silent short list
- install-minecraft-splitscreen.sh reads it before the download/presence
  steps; curl|bash mode fetches the manifest first, then what it names;
  empty/unfetchable manifest is a hard stop
- launcher_setup.sh install_runtime_modules() reads it (MODULES_DIR →
  repo checkout → download) and DEPLOYS it beside the modules so the
  launcher can read it at startup
- deploy.sh reads it directly (sed parser deleted) and ships it in the
  work list / freshness check (11 modules + launcher = 12 files)

UPGRADE NOTE: a launcher deployed from this commit requires the manifest
beside its modules; installer and deploy.sh both ship it, so any normal
upgrade path provides it before the new launcher can run.

test_installer: T7.2/T7.3 repointed at the manifest; T7.7 stubs it and
asserts it deploys.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AUfc9vZUp7Fyq4UjhJa4nm
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