Files
windroost/p2_godot_sample/data/mvp_validation_seed_pack.json
T
wushenghua 06aa9754ae fix: bundle runtime data inside project so exported builds can load content
Phase C1 of the release-readiness roadmap. Found and fixed a genuine release
blocker: Godot runtime scripts loaded content/rules/text from res://../data/,
which resolves in the editor but NOT in an export (packed res:// has no parent),
so a shipped game would fail on first load.

- Copied the 6 runtime JSON files into p2_godot_sample/data/ and redirected
  launch_content.gd, ui_text.gd, profile_store.gd, battle_sim.gd and
  battle_scene.gd to res://data/... . The repository root data/ stays the
  authoritative source for the Python validators; frozen_fixture.gd (test-only
  source-provenance checks) keeps its res://../ paths.
- Added tools/check_runtime_data_bundle.py: SHA-256 proves each bundled copy is
  byte-identical to the authoritative one, so runtime data cannot drift from
  validated data. Registered as a gate in run_p2_checks.sh.
- End-to-end proof: exported a Linux/X11 PCK with an include_filter for
  data/*.json, mounted it with --main-pack, and asserted all 6 data files plus
  the main scene exist under res:// (PCK_RESULT PASS). This verifies the fix in
  a real packed artifact, not just source.
- Added a minimal Linux/X11 export_presets.cfg for local smoke exports. It is
  NOT a signed/release artifact; build/ is gitignored so no binary is committed.

Full gate P2_CHECKS_PASS with the new gate. Roadmap 47 records the remaining
publisher-owned steps (owner-chosen Bundle ID / team / signing, archive, upload,
store review) and the pre-release cleanup item (exclude *_test.gd from exports).
Bundle ID, product name and business model are owner decisions (NAMING.md is
undecided) and were not invented here. prototype/ stays untracked and untouched.
2026-11-18 00:40:56 +08:00

136 lines
2.7 KiB
JSON

{
"schema": 1,
"purpose": "P1 fixed-seed validation input and result contract for the P3a battle demo",
"tick_seconds": 0.1,
"seed_range": {
"start": 10001,
"count": 100,
"step": 1
},
"modes": [
"auto",
"semi",
"manual"
],
"scenarios": [
{
"id": "P3A-N01-AUTO",
"node_id": "R1-C01-N01",
"mode": "auto",
"enemy_ids": [
"E-R1-F1-V1",
"E-R1-F1-V1"
],
"visible_hero_ids": [
"H01",
"H02",
"H04"
],
"input_events": [],
"target_duration_seconds": [
8,
15
],
"target_win_rate": [
0.95,
1.0
]
},
{
"id": "P3A-N03-SEMI",
"node_id": "R1-C01-N03",
"mode": "semi",
"enemy_ids": [
"E-R1-F3-V1",
"E-R1-F4-V1"
],
"visible_hero_ids": [
"H01",
"H02",
"H04"
],
"input_events": [
{
"time": 2.0,
"type": "click_enemy",
"target_id": "E-R1-F3-V1"
},
{
"time": 5.0,
"type": "offboard_burst"
}
],
"target_duration_seconds": [
12,
25
],
"target_win_rate": [
0.7,
0.9
],
"timeout_seconds": 25
},
{
"id": "P3A-N10-MANUAL",
"node_id": "R1-C01-N10",
"mode": "manual",
"enemy_ids": [
"B-R1-01"
],
"visible_hero_ids": [
"H01",
"H02",
"H04"
],
"input_events": [
{
"time": 3.0,
"type": "click_enemy",
"target_id": "B-R1-01"
},
{
"time": 8.0,
"type": "offboard_burst"
},
{
"time": 15.0,
"type": "cast_ultimate",
"hero_id": "H01"
}
],
"target_duration_seconds": [
20,
30
],
"target_win_rate": [
0.85,
0.95
],
"timeout_seconds": 30
}
],
"result_schema": {
"required": [
"seed",
"scenario_id",
"mode",
"result",
"duration_seconds",
"roster_dps",
"visible_signature_damage",
"click_damage",
"burst_damage",
"ultimate_casts",
"shield_broken",
"weakness_hits",
"reward_id",
"event_log"
],
"determinism_rule": "same scenario_id + seed + input_events must produce byte-equivalent result JSON"
},
"interpretation": {
"is_balance_rewrite": false,
"note": "CH-derived costs, gold, DPS, Boss timer, offline and rebuild curves remain the baseline. This pack only verifies that the Windroost event order and manual inputs execute deterministically."
}
}