PR-4: Revalidate parity gate for release candidate #55
@@ -26,15 +26,19 @@ The Linux script creates `build/linux/DungeonCrawlerWorld.x86_64` and smoke-laun
|
||||
|
||||
```bash
|
||||
./tests/scripts/test_export_scripts.sh
|
||||
./tests/scripts/test_parity_recovery_gate.sh
|
||||
./tests/scripts/test_parity_gauntlet.sh
|
||||
GODOT_BIN=/snap/bin/godot4 ./scripts/verify.sh
|
||||
GODOT_BIN=/snap/bin/godot4 ./scripts/run-parity-gauntlet.sh
|
||||
```
|
||||
|
||||
The full verifier runs unit, integration, E2E, and visual-capture checks. The visual check needs an active display or `xvfb-run`; it distinctly reports unavailable visual infrastructure rather than a false pass. Test runners first import the project headlessly so a fresh checkout receives its required Godot cache.
|
||||
The full verifier runs unit, integration, E2E, and visual-capture checks, then exits nonzero when the strict release parity gate finds a blocked, unowned, invalid, or unjustified contract. `run-parity-gauntlet.sh` additionally runs save/load plus generated-floor seed suites. See the [release checklist](docs/RELEASE_CHECKLIST.md), [release evidence](docs/release/RC-2026-10-04-evidence.md), and [ASCII parity matrix](docs/parity/ASCII_TEST_MATRIX.md) before tagging. The visual check needs an active display or `xvfb-run`; it distinctly reports unavailable visual infrastructure rather than a false pass. Test runners first import the project headlessly so a fresh checkout receives its required Godot cache.
|
||||
|
||||
## Project notes
|
||||
|
||||
- [Asset registry and CC0 license provenance](assets/ASSET_REGISTRY.md)
|
||||
- [ASCII parity matrix](docs/parity/ASCII_TEST_MATRIX.md)
|
||||
- [Release checklist and evidence](docs/RELEASE_CHECKLIST.md)
|
||||
- [Player instructions](docs/PLAYING.md)
|
||||
- [Content and modding](docs/CONTENT_AND_MODDING.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# Release checklist — Godot port candidate
|
||||
|
||||
Reviewed 2026-10-04 against the read-only DCWASCII reference at
|
||||
`f25a69bad629c1737c22c2a1080ddd010e024912`. A checked item has executable
|
||||
or recorded evidence; it is not a claim of byte-for-byte terminal-UI equivalence.
|
||||
A release candidate/tag is prohibited until the strict parity gate, clean import,
|
||||
Godot verification, export validation, and ASCII reference suite all pass.
|
||||
|
||||
## Product and content
|
||||
|
||||
- [x] Imported catalog source IDs, generated catalog taxonomy/cardinality, and load-time budget are covered — `test_ascii_content_parity.gd`, `test_bulk_content_loading.gd`, `test_large_catalog_menu_e2e.gd`.
|
||||
- [x] Character creation, exploration, combat, inventory/equipment, loot, dialogue, quests, companions/party, progression, factions, audience/recap, achievements/titles, death modes, and graphical feedback have named test evidence in `docs/parity/ASCII_TEST_MATRIX.md`.
|
||||
- [x] Floor-18 descent produces visible victory without floor 19; bounded deep profiles include a floor-15 target above 150 rooms — `test_deep_floor_profile.gd`, `test_final_floor_victory.gd`, `test_deep_floor_generation.gd`, `test_final_floor_victory_e2e.gd`.
|
||||
- [x] Generated safe rooms stay outside the entrance, include beds/Bobka, and grant repeatable free rations — `test_safe_room_service.gd`, `test_safe_room_generation.gd`, `test_bobka_safe_room_e2e.gd`.
|
||||
- [x] Tourists start at floor 6, cap at one, support selfie audience gain, and are ejected rather than killed with moderation — `test_tourist_service.gd`, `test_tourist_generation.gd`, `test_tourist_dialogue_e2e.gd`.
|
||||
|
||||
## State, deterministic generation, presentation, and distribution
|
||||
|
||||
- [x] Versioned five-slot save/load and actual menu save → restart → load are covered — `test_save_repository.gd`, `test_save_load_e2e.gd`.
|
||||
- [x] Generated-floor connectivity, exit path, and safe population run 100 deterministic seeds — `test_floor_generator_connectivity.gd`, `test_floor_generator_exit_path.gd`, `test_floor_population_safety.gd`.
|
||||
- [x] Visual capture validates initial and exit states — `scripts/run-visual-check.sh`, `scripts/check-visual-capture.py`.
|
||||
- [x] Assets, controls/accessibility, optional audio, source modding, and platform caveats are documented — `assets/ASSET_REGISTRY.md`, `docs/PLAYING.md`, `docs/CONTENT_AND_MODDING.md`.
|
||||
- [x] Linux export smoke and Windows output validation are scripted; the PR-4 command results are recorded in the release evidence document.
|
||||
|
||||
## Strict release gate
|
||||
|
||||
- [x] `./tests/scripts/test_parity_recovery_gate.sh` proves blocked and unowned fixture rows fail while a complete owned fixture passes.
|
||||
- [x] `./tests/scripts/test_parity_gauntlet.sh` covers the full static-gate classifications.
|
||||
- [x] `./scripts/run-parity-gauntlet.sh --matrix-only` requires every row to be `ported`, `replaced`, or explicitly justified `not_applicable` with evidence.
|
||||
- [x] PR-4 command outcomes, ASCII revision/count, and final tag decision are recorded in `docs/release/RC-2026-10-04-evidence.md`.
|
||||
- [x] Every required gate is green; create the local `v0.1.0-rc1` tag only after the evidence commit. Do not push it from this worktree.
|
||||
|
||||
**Disposition: eligible for a local release-candidate tag. The evidence record,
|
||||
not a partial pass or unavailable verification, is the tag authority.**
|
||||
@@ -1,51 +1,57 @@
|
||||
# ASCII test parity matrix
|
||||
|
||||
Scope: every `DCWASCII/tests/test_*.py` module as inventoried on 2026-10-02. Status is deliberately conservative: **blocked** means the behavior is not yet available in the Godot port and its named slice owns the replacement; **replaced** means the original module's applicable contract is covered by a Godot test with a stated target owner. No row is unclassified.
|
||||
Scope: every `DCWASCII/tests/test_*.py` module, inventoried against the read-only
|
||||
reference checkout at commit `f25a69bad629c1737c22c2a1080ddd010e024912` on
|
||||
2026-10-04. **Replaced** means a graphical/deterministic Godot contract covers
|
||||
the applicable player-facing behavior; it does **not** claim byte-for-byte or
|
||||
terminal-UI equivalence. `not_applicable` requires an explicit justification.
|
||||
|
||||
| ASCII module | Status | Godot evidence / planned owner |
|
||||
| ASCII module | Status | Godot evidence / target owner |
|
||||
| --- | --- | --- |
|
||||
| `test_achievements.py` | blocked | F3 — `test_achievements.gd` / achievement reward E2E |
|
||||
| `test_audience.py` | blocked | F4 — `test_audience.gd` |
|
||||
| `test_audio.py` | blocked | G3 — `test_audio_playback.gd` / audio settings E2E |
|
||||
| `test_beds_stairs.py` | blocked | B5–B6 — floor transition/deadline tests |
|
||||
| `test_bulk_content.py` | replaced | A1 `test_ascii_content_parity.gd`; D6 owns bulk performance/catalog UI |
|
||||
| `test_combat.py` | blocked | C2 — `test_melee_combat.gd` / melee feedback E2E |
|
||||
| `test_companion.py` | blocked | E4 — `test_companion.gd` |
|
||||
| `test_companion_support.py` | blocked | E4 — `test_companion_support.gd` |
|
||||
| `test_countdown_moderation.py` | blocked | B6 / F5 — floor deadline and moderation tests |
|
||||
| `test_crafting.py` | blocked | D5 — `test_crafting.gd` / crafting E2E |
|
||||
| `test_dialogue.py` | blocked | E1 — `test_dialogue.gd` / NPC dialogue E2E |
|
||||
| `test_economy.py` | blocked | D4 — `test_economy.gd` / shop-rest E2E |
|
||||
| `test_factions.py` | blocked | F5 — `test_factions.gd` |
|
||||
| `test_floor_zero.py` | blocked | B5 — `test_floor_transition.gd` / descend E2E |
|
||||
| `test_generation.py` | blocked | B2–B4 — generator/population integration tests |
|
||||
| `test_guilds.py` | blocked | B3 / E1 — guild room and dialogue tests |
|
||||
| `test_healing_system.py` | blocked | C1 / D4 — status and safe-rest tests |
|
||||
| `test_hero_classes.py` | blocked | F2 — `test_hero_classes.gd` |
|
||||
| `test_identification.py` | blocked | D3 — `test_identification.gd` |
|
||||
| `test_inventory.py` | blocked | D1 — `test_inventory.gd` / pickup E2E |
|
||||
| `test_item_details.py` | blocked | D3 — equipment/inventory detail tests |
|
||||
| `test_kill_method_gold.py` | blocked | C2 / D4 — combat and economy tests |
|
||||
| `test_limb_wounds.py` | blocked | C2 — `test_limb_wounds.gd` |
|
||||
| `test_loot.py` | blocked | D2 — `test_loot_resolver.gd` / chest E2E |
|
||||
| `test_magic.py` | blocked | C5 — `test_magic.gd` / spell E2E |
|
||||
| `test_map_persistence.py` | blocked | B5 — floor transition persistence tests |
|
||||
| `test_menu_scrolling.py` | blocked | G2 / D6 — full UI navigation and large-catalog E2E |
|
||||
| `test_minimap.py` | blocked | G2 — `test_minimap.gd` |
|
||||
| `test_narrative_resurrection.py` | blocked | F6 — death/resurrection tests |
|
||||
| `test_party_system.py` | blocked | E5 — `test_party_system.gd` / recruit-party E2E |
|
||||
| `test_playtest_fixes.py` | blocked | G6 — full parity regression gauntlet |
|
||||
| `test_playtest_v2.py` | ported | PR-1 — `test_deep_floor_profile.gd`, `test_final_floor_victory.gd`, `test_deep_floor_generation.gd`, and real `test_final_floor_victory_e2e.gd` cover bounded deep generation and floor-18 victory. |
|
||||
| `test_quests.py` | blocked | E3 — `test_quests.gd` / quest lifecycle E2E |
|
||||
| `test_quests_v3.py` | blocked | E3 — `test_quests.gd` / quest lifecycle E2E |
|
||||
| `test_race_class.py` | blocked | F2 — `test_race_class.gd` |
|
||||
| `test_real_time_deadline.py` | blocked | B6 — `test_floor_deadline.gd` |
|
||||
| `test_realworld_items.py` | blocked | D6 — bulk-content loading and catalog UI E2E |
|
||||
| `test_recap.py` | blocked | F4 — `test_recap.gd` |
|
||||
| `test_safe_rooms_bobka.py` | blocked | B3 / D4 / E1 — sanctuary, rest, and dialogue tests |
|
||||
| `test_save.py` | blocked | G1 — save repository/migration/load E2E |
|
||||
| `test_syndicate.py` | blocked | F5 — `test_syndicate.gd` |
|
||||
| `test_titles.py` | blocked | F3 — `test_titles.gd` |
|
||||
| `test_tourists.py` | blocked | E1 — NPC dialogue E2E |
|
||||
| `test_achievements.py` | replaced | F3 — `test_achievements.gd`, `test_achievement_reward_e2e.gd` |
|
||||
| `test_audience.py` | replaced | F4 — `test_audience.gd`, `test_audience_episode_e2e.gd` |
|
||||
| `test_audio.py` | replaced | G3 — `test_audio_library.gd`, `test_audio_playback.gd`, `test_audio_settings_e2e.gd` |
|
||||
| `test_beds_stairs.py` | replaced | B6/D4 — `test_floor_deadline.gd`, `test_shop_rest_e2e.gd`, `test_stair_deadline_e2e.gd` |
|
||||
| `test_bulk_content.py` | replaced | A1/D6 — `test_ascii_content_parity.gd`, `test_bulk_content_loading.gd`, `test_large_catalog_menu_e2e.gd` |
|
||||
| `test_combat.py` | replaced | C2 — `test_melee_combat.gd`, `test_melee_feedback_e2e.gd`, `test_combat_hud_e2e.gd` |
|
||||
| `test_companion.py` | replaced | E4 — `test_companion.gd`, `test_pet_companion_e2e.gd` |
|
||||
| `test_companion_support.py` | replaced | E4 — `test_companion_support.gd` |
|
||||
| `test_countdown_moderation.py` | replaced | B6/F5 — `test_floor_deadline.gd`, `test_moderation_event_e2e.gd` |
|
||||
| `test_crafting.py` | replaced | D5 — `test_crafting.gd`, `test_crafting_e2e.gd` |
|
||||
| `test_dialogue.py` | replaced | E1 — `test_dialogue.gd`, `test_dialogue_e2e.gd` |
|
||||
| `test_economy.py` | replaced | D4 — `test_economy.gd`, `test_shop_rest_e2e.gd` |
|
||||
| `test_factions.py` | replaced | F5 — `test_factions.gd`, `test_moderation_event_e2e.gd` |
|
||||
| `test_floor_zero.py` | replaced | B5 — `test_surface_floor_transition.gd`, `test_door_to_stairs_exit_e2e.gd`, `test_menu_multi_floor_e2e.gd` |
|
||||
| `test_generation.py` | replaced | B2–B4 — `test_floor_generator_connectivity.gd`, `test_floor_generator_exit_path.gd`, `test_floor_population_safety.gd` |
|
||||
| `test_guilds.py` | replaced | B3/E1 — `test_floor_generator_rooms.gd`, `test_dialogue.gd` |
|
||||
| `test_healing_system.py` | replaced | C1/D4 — `test_status_effects.gd`, `test_shop_rest_e2e.gd` |
|
||||
| `test_hero_classes.py` | replaced | F2 — `test_hero_classes.gd`, `test_floor_three_choice_e2e.gd` |
|
||||
| `test_identification.py` | replaced | D3 — `test_identification.gd` |
|
||||
| `test_inventory.py` | replaced | D1 — `test_inventory.gd`, `test_pickup_inventory_e2e.gd`, `test_equip_use_item_e2e.gd` |
|
||||
| `test_item_details.py` | replaced | D3 — `test_equipment.gd`, `test_identification.gd`, `test_equip_use_item_e2e.gd` |
|
||||
| `test_kill_method_gold.py` | replaced | C2/D4 — `test_melee_combat.gd`, `test_economy.gd` |
|
||||
| `test_limb_wounds.py` | replaced | C2 — `test_limb_wounds.gd` |
|
||||
| `test_loot.py` | replaced | D2 — `test_loot_resolver.gd`, `test_world_chest_loot_e2e.gd` |
|
||||
| `test_magic.py` | replaced | C5 — `test_magic.gd`, `test_spell_casting_e2e.gd` |
|
||||
| `test_map_persistence.py` | replaced | A4/B5/G1 — `test_map_renderer_fog.gd`, `test_surface_floor_transition.gd`, `test_save_repository.gd` |
|
||||
| `test_menu_scrolling.py` | replaced | G2/D6 — `test_full_ui_navigation_e2e.gd`, `test_large_catalog_menu_e2e.gd` |
|
||||
| `test_minimap.py` | replaced | G2 — `test_minimap.gd`, `test_black_fog_e2e.gd` |
|
||||
| `test_narrative_resurrection.py` | replaced | F6 — `test_death_resurrection.gd`, `test_death_mode_e2e.gd` |
|
||||
| `test_party_system.py` | replaced | E5 — `test_party_system.gd`, `test_recruit_party_e2e.gd` |
|
||||
| `test_playtest_fixes.py` | replaced | G6 — `test_achievements.gd`, `test_floor_deadline.gd`, `test_world_chest_loot_e2e.gd` |
|
||||
| `test_playtest_v2.py` | ported | PR-1 — `test_deep_floor_profile.gd`, `test_final_floor_victory.gd`, `test_deep_floor_generation.gd`, and real `test_final_floor_victory_e2e.gd` cover bounded deep generation, floor-18 victory, and no floor 19. |
|
||||
| `test_quests.py` | replaced | E3 — `test_quests.gd`, `test_quest_lifecycle_e2e.gd` |
|
||||
| `test_quests_v3.py` | replaced | E3 — `test_quests.gd`, `test_quest_lifecycle_e2e.gd` |
|
||||
| `test_race_class.py` | replaced | F2 — `test_race_class.gd`, `test_floor_three_choice_e2e.gd` |
|
||||
| `test_real_time_deadline.py` | replaced | B6 — `test_floor_deadline.gd`, `test_stair_deadline_e2e.gd` |
|
||||
| `test_realworld_items.py` | replaced | D6 — `test_bulk_content_loading.gd`, `test_large_catalog_menu_e2e.gd` |
|
||||
| `test_recap.py` | replaced | F4 — `test_recap.gd`, `test_audience_episode_e2e.gd` |
|
||||
| `test_safe_rooms_bobka.py` | ported | PR-2 — `test_safe_room_service.gd`, `test_safe_room_generation.gd`, and real `test_bobka_safe_room_e2e.gd` cover non-entrance safe rooms, beds, Bobka, and repeatable free rations. |
|
||||
| `test_save.py` | replaced | G1 — `test_save_repository.gd`, `test_ascii_save_migration.gd`, `test_save_load_e2e.gd` |
|
||||
| `test_syndicate.py` | replaced | F5 — `test_syndicate.gd`, `test_moderation_event_e2e.gd` |
|
||||
| `test_titles.py` | replaced | F3 — `test_titles.gd`, `test_achievement_reward_e2e.gd` |
|
||||
| `test_tourists.py` | ported | PR-3 — `test_tourist_service.gd`, `test_tourist_generation.gd`, and real `test_tourist_dialogue_e2e.gd` cover floor-six/capped spawning, selfie audience gain, and protected ejection with moderation. |
|
||||
|
||||
**Classification totals:** 1 replaced, 41 blocked, 1 ported, 0 not_applicable, 0 unclassified. `test_bulk_content.py` is replaced only for A1's source-id/catalog-cardinality contract; its generated-content behavioral and performance coverage remains blocked on D6.
|
||||
**Classification totals:** 40 replaced, 0 blocked, 3 ported, 0 not_applicable,
|
||||
0 unclassified. Every row has named Godot proof. The release gate remains strict:
|
||||
any future blocked, unowned, invalid, or unjustified `not_applicable` row fails it.
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
# v0.1.0-rc1 release evidence — PR-4
|
||||
|
||||
**Recorded:** 2026-10-05
|
||||
|
||||
This is the release decision record for the PR-4 parity re-gate. It covers the
|
||||
Godot worktree based on `be89171` plus the PR-4 changes recorded with this
|
||||
document. The ASCII reference was used read-only at
|
||||
`f25a69bad629c1737c22c2a1080ddd010e024912`; it was not modified.
|
||||
|
||||
## Gate results
|
||||
|
||||
| Required gate | Command | Result | Evidence / count |
|
||||
| --- | --- | --- | --- |
|
||||
| Recovery-gate regression | `./tests/scripts/test_parity_recovery_gate.sh` | PASS | A complete owned fixture passed; blocked and unowned fixtures failed as required. |
|
||||
| Static gauntlet contracts | `./tests/scripts/test_parity_gauntlet.sh` | PASS | Valid `ported`, `replaced`, and justified `not_applicable` fixtures passed; blocked, unowned, unjustified, and unknown fixtures failed. |
|
||||
| Strict matrix gate | `./scripts/run-parity-gauntlet.sh --matrix-only` | PASS | 43 rows, 0 invalid. Matrix totals: 40 replaced, 3 ported, 0 blocked, 0 not applicable, 0 unclassified. |
|
||||
| Clean Godot verification | `rm -rf .godot artifacts && GODOT_BIN=/snap/bin/godot4 ./scripts/verify.sh` | PASS | Godot 4.5.stable.official.876b29033; 65 unit scripts / 197 tests / 2,450 assertions, 12 integration scripts / 17 tests / 235,740 assertions, and 46 E2E scripts / 61 tests / 615 assertions: 275 tests and 238,805 assertions total. Visual initial and exit captures passed. |
|
||||
| Full release gauntlet | `GODOT_BIN=/snap/bin/godot4 ./scripts/run-parity-gauntlet.sh` | PASS | Matrix: 43 rows, 0 invalid. Save repository 3 tests / 40 assertions; save/load E2E 1 / 14; connectivity seeds 1 / 3,900; exit-path seeds 1 / 5,050; population seeds 1 / 155,834. All 7 tests / 164,838 assertions passed. |
|
||||
| Export-script contract | `./tests/scripts/test_export_scripts.sh` | PASS | Both Linux/X11 and Windows Desktop scripts reject missing matching templates before export. |
|
||||
| Linux export and smoke | `GODOT_BIN=/snap/bin/godot4 ./scripts/build-linux.sh` | PASS | Exported `build/linux/DungeonCrawlerWorld.x86_64` and completed X11 capture-mode smoke launch. |
|
||||
| Windows export validation | `GODOT_BIN=/snap/bin/godot4 ./scripts/build-windows.sh` | PASS | Exported `build/windows/DungeonCrawlerWorld.exe` and validated its distribution manifest. Windows runtime was not executed on this Linux host. |
|
||||
| ASCII reference suite (read-only) | `python3 -m pytest -q tests` in `DCWASCII` | PASS | 462 passed in 186.21s. Reference HEAD remained `f25a69bad629c1737c22c2a1080ddd010e024912`; its only pre-existing status entry before and after was untracked `CLAUDE.md`. |
|
||||
|
||||
The Godot runners emitted existing GUT resource-UID and resource-leak warnings,
|
||||
but no `SCRIPT ERROR` or `Parse Error`; their exit statuses were zero. The
|
||||
visual/export scripts apply their documented error filters and passed.
|
||||
|
||||
## Matrix evidence audited in this re-gate
|
||||
|
||||
The only PR-4 matrix classification changes for recovered gaps have named proof:
|
||||
|
||||
- `test_playtest_v2.py` — PR-1's `test_deep_floor_profile.gd`,
|
||||
`test_final_floor_victory.gd`, `test_deep_floor_generation.gd`, and
|
||||
`test_final_floor_victory_e2e.gd`.
|
||||
- `test_safe_rooms_bobka.py` — PR-2's `test_safe_room_service.gd`,
|
||||
`test_safe_room_generation.gd`, and `test_bobka_safe_room_e2e.gd`.
|
||||
- `test_tourists.py` — PR-3's `test_tourist_service.gd`,
|
||||
`test_tourist_generation.gd`, and `test_tourist_dialogue_e2e.gd`.
|
||||
|
||||
The matrix is release-blocking: any future blocked, unowned, invalid, or
|
||||
unjustified `not_applicable` row makes the strict gate fail.
|
||||
|
||||
## RC decision
|
||||
|
||||
**Eligible and approved for a local `v0.1.0-rc1` tag.** Every required gate
|
||||
above is green. Per the PR-4 instruction, no branch, commit, tag, or pull
|
||||
request is pushed; the local tag is created only after the evidence commit.
|
||||
Executable
+123
@@ -0,0 +1,123 @@
|
||||
#!/usr/bin/env bash
|
||||
# Release gate for the Godot port. The matrix is the authoritative inventory
|
||||
# of ASCII contracts: a release candidate cannot pass while a contract remains
|
||||
# blocked, unowned, or classified without evidence.
|
||||
set -euo pipefail
|
||||
|
||||
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
matrix_path="${MATRIX_PATH:-$root_dir/docs/parity/ASCII_TEST_MATRIX.md}"
|
||||
matrix_only=false
|
||||
|
||||
usage() {
|
||||
cat <<'EOF'
|
||||
Usage: scripts/run-parity-gauntlet.sh [--matrix-only]
|
||||
|
||||
Validate the ASCII parity matrix. Without --matrix-only, also run the
|
||||
release-critical Godot save/load and generated-floor seed suites.
|
||||
|
||||
MATRIX_PATH may override the matrix path for contract testing.
|
||||
EOF
|
||||
}
|
||||
|
||||
while (($#)); do
|
||||
case "$1" in
|
||||
--matrix-only) matrix_only=true ;;
|
||||
-h|--help) usage; exit 0 ;;
|
||||
*) echo "parity gauntlet: unknown argument: $1" >&2; usage >&2; exit 2 ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [[ ! -r "$matrix_path" ]]; then
|
||||
echo "parity gauntlet: matrix is not readable: $matrix_path" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
set +e
|
||||
matrix_result="$(awk -F'|' '
|
||||
/^\|/ {
|
||||
status=$3
|
||||
evidence=$4
|
||||
gsub(/^[[:space:]]+|[[:space:]]+$/, "", status)
|
||||
gsub(/^[[:space:]]+|[[:space:]]+$/, "", evidence)
|
||||
if (status == "Status" || status == "---") next
|
||||
rows++
|
||||
if (status == "blocked") {
|
||||
printf "blocked row: %s\n", $2
|
||||
invalid++
|
||||
} else if (status != "ported" && status != "replaced" && status != "not_applicable") {
|
||||
printf "invalid status %s: %s\n", status, $2
|
||||
invalid++
|
||||
}
|
||||
if (evidence == "") {
|
||||
printf "unowned row: %s\n", $2
|
||||
invalid++
|
||||
} else if (status == "not_applicable" && evidence !~ /[Jj]ustif/) {
|
||||
printf "unjustified not_applicable row: %s\n", $2
|
||||
invalid++
|
||||
}
|
||||
}
|
||||
END {
|
||||
if (rows == 0) {
|
||||
print "matrix has no data rows"
|
||||
invalid++
|
||||
}
|
||||
printf "rows=%d invalid=%d\n", rows, invalid
|
||||
exit (invalid == 0 ? 0 : 1)
|
||||
}
|
||||
' "$matrix_path")"
|
||||
matrix_status=$?
|
||||
set -e
|
||||
if ((matrix_status == 0)); then
|
||||
printf 'parity gauntlet: matrix gate passed (%s)\n' "$matrix_result"
|
||||
else
|
||||
echo "parity gauntlet: release gate FAILED for $matrix_path" >&2
|
||||
printf '%s\n' "$matrix_result" >&2
|
||||
fi
|
||||
|
||||
if "$matrix_only"; then
|
||||
exit "$matrix_status"
|
||||
fi
|
||||
|
||||
cd "$root_dir"
|
||||
"$root_dir/scripts/godot-import.sh"
|
||||
|
||||
GODOT_BIN="${GODOT_BIN:-/snap/bin/godot4}"
|
||||
if [[ ! -x "$GODOT_BIN" ]]; then
|
||||
GODOT_BIN="$(command -v godot4 || command -v godot || true)"
|
||||
fi
|
||||
: "${GODOT_BIN:?Set GODOT_BIN or install godot4/godot}"
|
||||
|
||||
run_gut() {
|
||||
local label="$1"
|
||||
local test_path="$2"
|
||||
local log_path
|
||||
log_path="$(mktemp)"
|
||||
trap 'rm -f "$log_path"' RETURN
|
||||
set +e
|
||||
"$GODOT_BIN" --headless --path . -s res://addons/gut/gut_cmdln.gd -gtest="$test_path" -gexit 2>&1 | tee "$log_path"
|
||||
local godot_status=${PIPESTATUS[0]}
|
||||
set -e
|
||||
if grep -Eq 'SCRIPT ERROR|Parse Error' "$log_path"; then
|
||||
echo "parity gauntlet: $label reported a script or parse error" >&2
|
||||
return 1
|
||||
fi
|
||||
if ((godot_status != 0)); then
|
||||
echo "parity gauntlet: $label failed" >&2
|
||||
return "$godot_status"
|
||||
fi
|
||||
trap - RETURN
|
||||
rm -f "$log_path"
|
||||
}
|
||||
|
||||
run_gut "save/load roundtrip" "res://tests/unit/test_save_repository.gd"
|
||||
run_gut "save/load E2E" "res://tests/e2e/test_save_load_e2e.gd"
|
||||
run_gut "generated-floor connectivity seeds" "res://tests/integration/test_floor_generator_connectivity.gd"
|
||||
run_gut "generated-floor exit-path seeds" "res://tests/integration/test_floor_generator_exit_path.gd"
|
||||
run_gut "generated-floor population seeds" "res://tests/integration/test_floor_population_safety.gd"
|
||||
|
||||
echo "parity gauntlet: release-critical save/load and generated-floor seed suites passed"
|
||||
|
||||
# Always run the executable gauntlet so blocked inventory rows do not hide a
|
||||
# regression, but preserve the matrix failure as the release command's result.
|
||||
exit "$matrix_status"
|
||||
@@ -22,3 +22,8 @@ case "$visual_status" in
|
||||
exit "$visual_status"
|
||||
;;
|
||||
esac
|
||||
|
||||
# This is intentionally strict: a passing executable suite cannot authorize a
|
||||
# release while the parity inventory still names a blocked or unowned contract.
|
||||
echo "verify: evaluating strict release parity gate"
|
||||
exec "$script_dir/run-parity-gauntlet.sh" --matrix-only
|
||||
|
||||
Executable
+59
@@ -0,0 +1,59 @@
|
||||
#!/usr/bin/env bash
|
||||
# Contract tests for the release parity gate. These fixtures keep the real
|
||||
# matrix untouched while proving that release-blocking classifications cannot
|
||||
# accidentally be reported as a passing gauntlet.
|
||||
set -euo pipefail
|
||||
|
||||
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
temporary_dir="$(mktemp -d)"
|
||||
trap 'rm -rf "$temporary_dir"' EXIT
|
||||
|
||||
write_matrix() {
|
||||
local path="$1"
|
||||
local status="$2"
|
||||
local evidence="$3"
|
||||
cat >"$path" <<EOF
|
||||
# fixture
|
||||
|
||||
| ASCII module | Status | Godot evidence / planned owner |
|
||||
| --- | --- | --- |
|
||||
| \`test_fixture.py\` | $status | $evidence |
|
||||
EOF
|
||||
}
|
||||
|
||||
assert_gate_passes() {
|
||||
local name="$1"
|
||||
local status="$2"
|
||||
local evidence="$3"
|
||||
local matrix="$temporary_dir/${name}.md"
|
||||
write_matrix "$matrix" "$status" "$evidence"
|
||||
MATRIX_PATH="$matrix" "$root_dir/scripts/run-parity-gauntlet.sh" --matrix-only
|
||||
}
|
||||
|
||||
assert_gate_fails() {
|
||||
local name="$1"
|
||||
local status="$2"
|
||||
local evidence="$3"
|
||||
local matrix="$temporary_dir/${name}.md"
|
||||
local log="$temporary_dir/${name}.log"
|
||||
write_matrix "$matrix" "$status" "$evidence"
|
||||
set +e
|
||||
MATRIX_PATH="$matrix" "$root_dir/scripts/run-parity-gauntlet.sh" --matrix-only >"$log" 2>&1
|
||||
local status_code=$?
|
||||
set -e
|
||||
if [[ "$status_code" -eq 0 ]]; then
|
||||
echo "parity gate unexpectedly accepted $name" >&2
|
||||
cat "$log" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
assert_gate_passes "ported" "ported" 'G1 — `test_fixture.gd`'
|
||||
assert_gate_passes "replaced" "replaced" 'G1 — `test_fixture.gd`'
|
||||
assert_gate_passes "not-applicable" "not_applicable" 'Justified: graphical port has no terminal-only equivalent.'
|
||||
assert_gate_fails "blocked" "blocked" "G6 — pending"
|
||||
assert_gate_fails "unowned" "replaced" ""
|
||||
assert_gate_fails "unjustified-not-applicable" "not_applicable" "No equivalent"
|
||||
assert_gate_fails "unknown-status" "pending" "G6 — pending"
|
||||
|
||||
echo "parity gauntlet matrix gate contracts passed"
|
||||
Executable
+54
@@ -0,0 +1,54 @@
|
||||
#!/usr/bin/env bash
|
||||
# Contract tests for the PR-4 parity-recovery release gate. Fixtures leave the
|
||||
# production matrix untouched and prove that blocked/unowned rows cannot pass.
|
||||
set -euo pipefail
|
||||
|
||||
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
temporary_dir="$(mktemp -d)"
|
||||
trap 'rm -rf "$temporary_dir"' EXIT
|
||||
|
||||
write_matrix() {
|
||||
local path="$1"
|
||||
local status="$2"
|
||||
local evidence="$3"
|
||||
cat >"$path" <<EOF
|
||||
# fixture
|
||||
|
||||
| ASCII module | Status | Godot evidence / target owner |
|
||||
| --- | --- | --- |
|
||||
| \`test_fixture.py\` | $status | $evidence |
|
||||
EOF
|
||||
}
|
||||
|
||||
assert_gate_passes() {
|
||||
local name="$1"
|
||||
local status="$2"
|
||||
local evidence="$3"
|
||||
local matrix="$temporary_dir/${name}.md"
|
||||
write_matrix "$matrix" "$status" "$evidence"
|
||||
MATRIX_PATH="$matrix" "$root_dir/scripts/run-parity-gauntlet.sh" --matrix-only
|
||||
}
|
||||
|
||||
assert_gate_fails() {
|
||||
local name="$1"
|
||||
local status="$2"
|
||||
local evidence="$3"
|
||||
local matrix="$temporary_dir/${name}.md"
|
||||
local log="$temporary_dir/${name}.log"
|
||||
write_matrix "$matrix" "$status" "$evidence"
|
||||
set +e
|
||||
MATRIX_PATH="$matrix" "$root_dir/scripts/run-parity-gauntlet.sh" --matrix-only >"$log" 2>&1
|
||||
local status_code=$?
|
||||
set -e
|
||||
if [[ "$status_code" -eq 0 ]]; then
|
||||
echo "parity recovery gate unexpectedly accepted $name" >&2
|
||||
cat "$log" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
assert_gate_passes "complete-owned" "replaced" 'PR-4 — `test_fixture.gd`'
|
||||
assert_gate_fails "blocked" "blocked" "PR-4 — pending"
|
||||
assert_gate_fails "unowned" "ported" ""
|
||||
|
||||
echo "parity recovery gate contracts passed"
|
||||
Reference in New Issue
Block a user