Files
aetherbound-guild/docs/runtime/p9_6/IMPLEMENTATION_PLAN.md
T

4.1 KiB

P9.6 Risk, Recovery And Persistence Implementation Plan

Status: IN_PROGRESS Active step: P9.6-STEP-2 Baseline: 7ca0302 Goal: docs/goals/PHASE9_6_RISK_RECOVERY_PERSISTENCE_GOAL.md Contract: docs/runtime/PHASE9_6_RISK_RECOVERY_PERSISTENCE_CONTRACT.md

Player Outcome

The player reads real post-Bell injuries, chooses whether recovery is worth its cost, sees a two-wave consequence, recovers from defeat without losing the Company, and can close and continue the stable run without duplicate progress.

Steps

Step Status Outcome Gate
P9.6-STEP-0 Contract COMPLETE Four entry states, two plans, exact two-wave results and save boundaries are frozen. Goal, contract, plan, checkpoint and ledger agree.
P9.6-STEP-1 Domain COMPLETE Risk choice, two waves, defeat, recovery, retry, reward and XP are atomic. Source 68c4dbd; exact contract matrix and P9.5 domain/five-profile regressions pass strict-clean.
P9.6-STEP-2 Persistence IN_PROGRESS Stable state survives refresh/interruption without duplicate progress. Version, migration, checksum, backup, corruption, rollback, offline cap and battle checkpoint tests pass.
P9.6-STEP-3 Runtime PENDING Direct world touches expose HP, risk, waves, defeat/recovery and the changed return. Parsed touch routes, 44px bounds, normal frames and strict diagnostics pass.
P9.6-STEP-4 Pacing and H5 PENDING Five profiles preserve the counterfactual and the Owner can play the cached build. Explicit timestamps, interruption scenarios, runtime-only export and Gallery delivery pass.

Active Step Contract

ID: P9.6-STEP-2 PERSISTENCE
PLAYER OUTCOME: A stable run can be closed and continued truthfully; an
  interrupted battle restarts from its pre-battle decision without free
  progress, lost state or duplicate rewards.
IN SCOPE: state snapshot restoration; one P9.6 save service and UID; one
  persistence matrix test and UID; P9.6 durable status documents.
OUT OF SCOPE: controller/UI integration, runtime presentation, assets, audio,
  H5, native packages, content expansion, release and other games.
OWNED FILES: runtime/p9_3/core_loop_state.gd, runtime/p9_6/save_service.gd,
  runtime/tests/p9_6/persistence_test.gd and P9.6 docs.
ACCEPTANCE CHECKS: v1 save/load; v0 migration; unknown-version rejection;
  checksum/malformed/state corruption; valid backup fallback; atomic temp
  cleanup; clock rollback; 24-hour cap with zero offline rewards; stable Hall
  and Encounter restore; Battle/Result pre-battle checkpoint; duplicate reward,
  XP, recovery and plan commands remain inert after reload; Step 1 and P9.5
  domain regressions strict-clean.
EVIDENCE LEVEL EXPECTED: automated_verified.
COMMIT BOUNDARY: focused pushed persistence commit before runtime integration.
LEGAL TERMINAL: P9.6 Step 2 persistence complete, or redesign required at the
  earliest save/migration/interruption boundary.
NEXT STEP: bind the accepted state and save authority to the landscape runtime.

Issue Register

ID Status Finding
P96-I01 RESOLVED_IN_CONTRACT A single extra fixture lets every Company win and teaches no recovery decision. Two carried-HP waves produce the required state-dependent counterfactual.
P96-I02 ACTIVE_STEP_2 Current runtime has no persistence authority; stable snapshot restore must be validated before lifecycle integration.
P96-I03 RESOLVED_STEP_1 Exact waves leave two Wayrunner members at 0 HP after victory. Accepted living-member XP remains unchanged; a 2-Coin-per-fallen-member victory recovery prevents a stranded terminal state.

Current Evidence

  • Step 1 source: 68c4dbd.
  • Root: /private/tmp/abg-p96-68c4dbd-step1-r1/.
  • Marker: ABG_P9_6_RISK_RECOVERY_DOMAIN_OK paths=8 waves=2 press_wayrunner=defeat press_kindhand=victory recover_all=victory costs=0,4,6,8 reward=20 xp=18 recruits_lost=0 items_lost=0 invalid_mutations=0.
  • P9.5 domain and five-profile regressions pass; strict diagnostics are zero.
  • Evidence inventory SHA-256: e1ddacc7b4cfca0cdc4fa796924f876c351909adf03d056d7f7a5a5980c68780.