S9SourceNine Labs / CMAPI Docs 1.0
CMAPI / Maintainers

Standalone validation

Behavioral and release gates for the standalone runtime.

View source ↗
CMAPI 1.0.0Standalone runtimeWindows x64Tested with Planet Crafter 2.008

CMAPI 1.0.0 standalone release gate

This is the engineering gate for the first standalone public release. It authorizes publication only when the exact final archive passes every applicable automated and manual check.

Build and development deployment

Run while Planet Crafter and every CMAPI process are closed:

POWERSHELL
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\scripts\Deploy-Dev.ps1 `
  -GamePath "C:\Program Files (x86)\Steam\steamapps\common\The Planet Crafter" `
  -Configuration Debug

The script synchronizes compile references, builds all projects, publishes the launcher, and uses CMAPI's receipt-based maintenance engine. A clean target is installed; a receipt-owned target is repaired. An unowned root bootstrap stops deployment without changing it.

To build a wizard package without installing it:

POWERSHELL
.\scripts\Deploy-Dev.ps1 `
  -GamePath "C:\Program Files (x86)\Steam\steamapps\common\The Planet Crafter" `
  -Configuration Debug `
  -PackageOnly `
  -PackageOutputPath ".\artifacts\CMAPI-1.0.0-Wizard-Test"

Reproducible release input and package

Public packages use the exact UnityDoorstop Windows x64 release recorded in vendor\UnityDoorstop\PIN.json. Download the ReleaseAssetUrl and LicenseUrl from that file, save the license as LICENSE, then import them:

POWERSHELL
.\scripts\Import-UnityDoorstop.ps1 `
  -SourceArchivePath ".\doorstop_all_4.5.0.zip" `
  -LicensePath ".\LICENSE"

The importer verifies the complete official archive, the one approved x64 DLL, and the exact upstream license. Build the public release only after that gate passes:

POWERSHELL
.\scripts\Build-Release.ps1 `
  -GamePath "C:\Program Files (x86)\Steam\steamapps\common\The Planet Crafter" `
  -UpdateChannel Stable

The build must produce CMAPI-1.0.0-win-x64.zip, its SHA-256 sidecar, and a validated feed fragment. Keep the feed fragment private until the archive has passed the clean-install test below.

Startup proof

Before loading a save, verify:

  • the console reaches CMAPI is ready;
  • startup reports Runtime host: Standalone and CMAPI 1.0.0;
  • version reports Public API 1.0.0 and Bootstrap 1.0.0;
  • health_check reports Runtime ownership: CMAPI standalone, the mod-data path, scheduler count, tested game build, and PASS;
  • features includes CMAPI.StandaloneRuntime, CMAPI.ModStorage, CMAPI.ModScheduling, and CMAPI.GameLoopEvents;
  • mods lists only intended CMAPI mods;
  • CMAPI/Logs/bootstrap-latest.log and a timestamped runtime log exist;
  • no unrelated loader log changes during this launch.

Startup failure must appear directly in the launcher and create a full report under CMAPI/CrashReports.

Developer-foundation probes

With CMAPI Test Mod loaded, run:

version
health_check
features
test_features
test_storage
test_scheduler 1500
test_game_loop

Verify:

  1. CMAPI/UserData/Mods/SourceNineLabs.CMAPITestMod/config.json is created.
  2. sanity/state.json persists and increments exactly once per runtime start.
  3. Invalid JSON is moved to a timestamped .broken-* file and safe defaults load with one attributed warning.
  4. Rooted, traversal, non-JSON, and reserved config.json data paths are rejected without writing outside the mod directory.
  5. The scheduled callback runs once on the Unity main thread after the delay.
  6. Update ticks advance; one-second ticks advance without a catch-up burst.
  7. A deliberately failing mod leaves no event, command, notification, mutation, inventory, scheduler, or game-loop ownership behind.

Core regression matrix

Surface Minimum check
Console/IPC version, health_check, commands, features, invalid command, clean game exit
Mod loader Valid Test Mod, invalid JSON, missing DLL, duplicate ID, missing/versioned dependency, required cycle, broken assembly
Player/world lifecycle Load, player/world ready, save, weather, planet travel where available, exit, reload
Inventory/content Item search/grant, inventory events, recipes, unlocks
Authority Host actions succeed; joining-client mutations return structured denials
Placement Teleport, back, invalid/non-finite coordinates, owner cleanup
Environment Weather catalog/status/start, natural end, day/night, world state, planets
Save safety Pre-launch, manual, post-exit, retention, guarded restore
Trainer Every tested toggle, save/load, authority loss, disable-all, no repeated power audio
Updates Cached, offline, timeout, malformed, success; no startup/shutdown blocking
Lifetime Game exit closes console; configured console close requests clean game shutdown

The Mod Menu is separately versioned experimental beta. Its known controller open and Item Catalog navigation defects do not invalidate standalone core. Input leakage, stuck cursor/input, save mutation, or repeated trainer effects remain blockers.

Setup and package gate

  • Clean Install, healthy Update, damaged Repair, and receipt-based Uninstall pass on disposable game copies.
  • All four actions preserve Mods, config, UserData, backups, logs, crash reports, and every unowned file.
  • A modified receipt-owned file is preserved rather than deleted on uninstall.
  • An unowned winhttp.dll or bootstrap config causes a clear safe stop.
  • The light setup UI remains fully readable at 100%, 125%, 150%, and 200% DPI.
  • Release archive and SHA-256 sidecar pass Verify-Release.ps1.
  • CMAPI-package.json covers every extracted file and every digest validates.
  • Release negative gates reject a changed listed file and an unlisted extra.
  • Interrupt/fail an Update after at least one replacement on a disposable copy; the previous runtime and ownership receipt must be restored byte-for-byte.
  • If rollback is deliberately prevented, Setup must preserve a CMAPI/Install/Transactions/<id> journal and print that exact recovery path.
  • Archive contains no Test Mod, game DLLs, local Libs, debug symbols, legacy adapter, BepInEx folder, source build output, or unsafe path.
  • A clean machine requires no separate .NET or loader installation.

Clean-install proof

  1. Start from an unmodified Planet Crafter 2.008 installation or a disposable byte-for-byte copy that has no CMAPI, winhttp.dll, or doorstop_config.ini.
  2. Extract the release archive to a separate folder and run CMAPI-Installer.exe; do not copy its files into the game manually.
  3. Confirm Setup chooses Install, reports the detected game path, and leaves only receipt-owned bootstrap files at the game root.
  4. Launch through the installed CMAPI.exe; require health_check PASS and BepInEx: Not loaded/standalone ownership.
  5. Install one real CMAPI mod through CMAPI\Mods, relaunch, save, exit, and confirm the post-exit backup.
  6. Run Setup again for Repair, then Uninstall. Confirm Mods, config, UserData, backups, logs, crash reports, saves, and all unowned files remain.
  7. Reinstall the same release and repeat one game launch. This proves install, uninstall, and reinstall without relying on the developer deployment path.

Do not publish the stable feed entry until these steps pass on the archive that will actually be uploaded.

Exit criteria

  • standalone startup and shutdown succeed repeatedly on the tested game build;
  • the developer-foundation and core matrices show no regression;
  • setup ownership and preservation behavior are proven on disposable copies;
  • no project references or loads BepInEx;
  • catastrophic startup diagnostics explain every forced failure fixture;
  • source and release verification pass on Windows;
  • known limitations are recorded before publishing the stable 1.0 asset and feed entry.