Add fire risk QA coverage gate
This commit is contained in:
@@ -844,7 +844,7 @@ Target deliverable: A small group can join a server, spawn into one biome, gathe
|
||||
- [x] Add fire maintenance gameplay so watched, cleared, contained, or extinguished fires are safe, while neglected fires can become dangerous. Updated lit campfire interaction to maintain the fire, added watch, clear-area, and contain-fire hooks, and made maintenance reduce campfire, vegetation, forest, and structure ignition risks while extinguishing resets active risk state.
|
||||
- [x] Add fire suppression hooks for rain, water carrying, dirt/sand, cleared firebreaks, and future firefighting tools. Added shared server-side suppression hooks plus water, dirt/sand, firebreak, and tool wrappers that raise suppression pressure, reduce ignition risks, reduce active fire intensity, shrink spread radius, and let rain/water drain fuel.
|
||||
- [x] Persist active grass, forest, and structure fires across save/load without corrupting world state. Extended campfire persistence coverage for ignition flags, ignition risk scores, active grass/forest/structure fire intensities, spread radius, and suppression pressure so save/load recovery preserves active and partially suppressed fire state.
|
||||
- [ ] Add QA coverage for safe campfires, unsafe campfires, vegetation spread, shelter ignition, suppression, and save/load recovery.
|
||||
- [x] Add QA coverage for safe campfires, unsafe campfires, vegetation spread, shelter ignition, suppression, and save/load recovery. Added a fire-risk QA coverage document and verifier requiring safe/unsafe campfire, vegetation spread, shelter ignition, suppression, and save/load recovery scenarios plus the supporting fire-risk verification scripts.
|
||||
- [ ] Add weather sounds.
|
||||
- [ ] Add wildlife sounds.
|
||||
- [ ] Add UI sounds.
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
# Fire Risk QA Coverage
|
||||
|
||||
This gate covers the MVP campfire/open-flame risk model introduced in `0.1.P`.
|
||||
It is intentionally systems-focused: the current visuals may still be
|
||||
placeholder-level, but the server state must behave predictably before investor
|
||||
or multiplayer testing calls fire risk complete.
|
||||
|
||||
## Required Scenarios
|
||||
|
||||
- Safe campfire:
|
||||
- light a campfire away from grass, shrubs, trees, primitive shelter pieces,
|
||||
wood piles, and fiber piles.
|
||||
- maintain or contain it.
|
||||
- verify `FireRiskScore`, vegetation ignition risk, structure ignition risk,
|
||||
and spread radius stay low or return to zero.
|
||||
- Unsafe campfire:
|
||||
- light a campfire near dry grass, shrubs, trees, wood, fiber, or shelter
|
||||
pieces.
|
||||
- leave it unmaintained with enough fuel.
|
||||
- verify `FireRiskScore` rises and feeds ignition checks.
|
||||
- Vegetation spread:
|
||||
- place a lit fire inside `VegetationIgnitionCheckRadius` of grass/shrub/tree
|
||||
fuel.
|
||||
- verify grass/brush and forest ignition risk accumulates from nearby fuel,
|
||||
burn duration, wind/weather, and current fire risk.
|
||||
- verify active grass/forest fire intensities and spread radius grow only on
|
||||
the server after ignition flags are set.
|
||||
- Shelter ignition:
|
||||
- place a lit fire too close to a primitive shelter or wood/fiber resource
|
||||
node.
|
||||
- verify `StructureIgnitionRiskScore` accumulates unless the fire is
|
||||
contained.
|
||||
- verify structure fire intensity contributes to active spread radius after
|
||||
ignition.
|
||||
- Suppression:
|
||||
- apply water, dirt/sand, firebreak, and tool suppression hooks.
|
||||
- verify suppression pressure rises, fire risks fall, active fire intensities
|
||||
fall, spread radius shrinks, and water/rain drains fuel.
|
||||
- Save/load recovery:
|
||||
- save while grass, forest, or structure fire state is active or partially
|
||||
suppressed.
|
||||
- load the world and verify ignition flags, risk scores, intensities, spread
|
||||
radius, suppression pressure, fuel, maintenance, and cooking state are
|
||||
restored together.
|
||||
|
||||
## Minimum Script Gate
|
||||
|
||||
Run these local checks before packaging:
|
||||
|
||||
```bash
|
||||
python3 Scripts/verify_unattended_fire_risk.py
|
||||
python3 Scripts/verify_vegetation_ignition_checks.py
|
||||
python3 Scripts/verify_structure_ignition_risk.py
|
||||
python3 Scripts/verify_fire_spread_rules.py
|
||||
python3 Scripts/verify_fire_maintenance_gameplay.py
|
||||
python3 Scripts/verify_fire_suppression_hooks.py
|
||||
python3 Scripts/verify_fire_persistence_state.py
|
||||
python3 Scripts/verify_fire_risk_qa_coverage.py
|
||||
```
|
||||
|
||||
The manual scenarios should be promoted into Unreal automation once dedicated
|
||||
test fixtures exist for spawning controlled campfires, foliage fuel, shelters,
|
||||
weather/wind inputs, and persistence round trips.
|
||||
@@ -0,0 +1,67 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Verify fire-risk QA scenarios and supporting gates are documented."""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
QA_DOC = ROOT / "Docs" / "QA" / "FireRiskQACoverage.md"
|
||||
ROADMAP = ROOT / "AGRARIAN_DEVELOPMENT_ROADMAP.md"
|
||||
|
||||
REQUIRED_SCENARIOS = [
|
||||
"Safe campfire",
|
||||
"Unsafe campfire",
|
||||
"Vegetation spread",
|
||||
"Shelter ignition",
|
||||
"Suppression",
|
||||
"Save/load recovery",
|
||||
]
|
||||
|
||||
REQUIRED_SCRIPTS = [
|
||||
"verify_unattended_fire_risk.py",
|
||||
"verify_vegetation_ignition_checks.py",
|
||||
"verify_structure_ignition_risk.py",
|
||||
"verify_fire_spread_rules.py",
|
||||
"verify_fire_maintenance_gameplay.py",
|
||||
"verify_fire_suppression_hooks.py",
|
||||
"verify_fire_persistence_state.py",
|
||||
"verify_fire_risk_qa_coverage.py",
|
||||
]
|
||||
|
||||
|
||||
def main() -> None:
|
||||
doc = QA_DOC.read_text(encoding="utf-8")
|
||||
roadmap = ROADMAP.read_text(encoding="utf-8")
|
||||
|
||||
missing = []
|
||||
for scenario in REQUIRED_SCENARIOS:
|
||||
if scenario not in doc:
|
||||
missing.append(f"QA doc missing scenario {scenario!r}")
|
||||
|
||||
for script in REQUIRED_SCRIPTS:
|
||||
if script not in doc:
|
||||
missing.append(f"QA doc missing script {script!r}")
|
||||
if not (ROOT / "Scripts" / script).exists():
|
||||
missing.append(f"required script does not exist: Scripts/{script}")
|
||||
|
||||
for token in [
|
||||
"`FireRiskScore`",
|
||||
"StructureIgnitionRiskScore",
|
||||
"suppression pressure",
|
||||
"spread radius",
|
||||
"server",
|
||||
]:
|
||||
if token not in doc:
|
||||
missing.append(f"QA doc missing token {token!r}")
|
||||
|
||||
if "[x] Add QA coverage for safe campfires" not in roadmap:
|
||||
missing.append("roadmap item is not checked off")
|
||||
|
||||
if missing:
|
||||
raise SystemExit("FAILED: " + "; ".join(missing))
|
||||
|
||||
print("OK: fire-risk QA coverage is documented and tied to verifiers.")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user