From 40364345ab0550532e134ef8890d347ba9cab712 Mon Sep 17 00:00:00 2001 From: Takeshi Date: Tue, 20 Oct 2026 16:54:45 +0900 Subject: [PATCH] P14-03: Prove new-PID pairs inside the roster; declare UIDs and policy pins - tests/s2/test_new_pid_pairs.gd runs each writer/reader save-restart pair as two real child processes and keeps their complete output in the private profile, since the script-level roster runs suites without arguments. - Commit the Godot UIDs of scripts added this session (and the pre-existing peeping-room scripts that lacked tracked UIDs) plus the legacy fixture's thumbnail import, so a private import generates nothing undeclared. - Repin suite-policy source SHAs for test_main_dashboard (A06 HUD, palette 25) and test_runtime_transport (sustained outage helper); flags unchanged. - Register the pair suite's completion marker. Co-Authored-By: Claude Opus 5.5 --- Makefile | 1 + .../completion_marker_contracts.json | 17 +++++ .../execution/p06-01-a06/perf_probe.gd.uid | 1 + .../p06-03-recovery/report_cost_probe.gd.uid | 1 + .../p14-02-warp/warp_perf_probe.gd.uid | 1 + scripts/special/peeping_room_service.gd.uid | 1 + scripts/transport/warp_service.gd.uid | 1 + .../legacy_rush_v1/thumbnail.png.import | 40 +++++++++++ tests/helpers/mana_outage.gd.uid | 1 + tests/mvp/test_whole_tower_outage.gd.uid | 1 + tests/s2/test_mana_recovery_new_pid.gd.uid | 1 + tests/s2/test_mana_reserve_new_pid.gd.uid | 1 + tests/s2/test_new_pid_pairs.gd | 68 +++++++++++++++++++ tests/s2/test_new_pid_pairs.gd.uid | 1 + tests/s2/test_runtime_mana_reserve.gd.uid | 1 + tests/special/peeping_room_fixture.gd.uid | 1 + .../special/test_peeping_room_evidence.gd.uid | 1 + .../special/test_peeping_room_geometry.gd.uid | 1 + .../test_peeping_room_reference.gd.uid | 1 + .../special/test_peeping_room_runtime.gd.uid | 1 + tests/special/test_peeping_room_save.gd.uid | 1 + tests/transport/test_route_wait_choice.gd.uid | 1 + tests/transport/test_runtime_warp.gd.uid | 1 + tools/regression/suite-policy.json | 4 +- 24 files changed, 147 insertions(+), 2 deletions(-) create mode 100644 docs/plans/original-completion-2026-10-02/execution/p06-01-a06/perf_probe.gd.uid create mode 100644 docs/plans/original-completion-2026-10-02/execution/p06-03-recovery/report_cost_probe.gd.uid create mode 100644 docs/plans/original-completion-2026-10-02/execution/p14-02-warp/warp_perf_probe.gd.uid create mode 100644 scripts/special/peeping_room_service.gd.uid create mode 100644 scripts/transport/warp_service.gd.uid create mode 100644 tests/fixtures/p14-03/legacy_rush_v1/thumbnail.png.import create mode 100644 tests/helpers/mana_outage.gd.uid create mode 100644 tests/mvp/test_whole_tower_outage.gd.uid create mode 100644 tests/s2/test_mana_recovery_new_pid.gd.uid create mode 100644 tests/s2/test_mana_reserve_new_pid.gd.uid create mode 100644 tests/s2/test_new_pid_pairs.gd create mode 100644 tests/s2/test_new_pid_pairs.gd.uid create mode 100644 tests/s2/test_runtime_mana_reserve.gd.uid create mode 100644 tests/special/peeping_room_fixture.gd.uid create mode 100644 tests/special/test_peeping_room_evidence.gd.uid create mode 100644 tests/special/test_peeping_room_geometry.gd.uid create mode 100644 tests/special/test_peeping_room_reference.gd.uid create mode 100644 tests/special/test_peeping_room_runtime.gd.uid create mode 100644 tests/special/test_peeping_room_save.gd.uid create mode 100644 tests/transport/test_route_wait_choice.gd.uid create mode 100644 tests/transport/test_runtime_warp.gd.uid diff --git a/Makefile b/Makefile index cb27910..ec4547e 100644 --- a/Makefile +++ b/Makefile @@ -245,6 +245,7 @@ test-transport: $(GODOT) --headless --path . --script res://tests/transport/test_route_wait_choice.gd $(GODOT) --headless --path . --script res://tests/transport/test_route_wait_choice.gd -- writer $(GODOT) --headless --path . --script res://tests/transport/test_route_wait_choice.gd -- reader + $(GODOT) --headless --path . --script res://tests/s2/test_new_pid_pairs.gd capture-transport: THE_TREE_TRANSPORT_CAPTURE=1 $(GODOT) --path . --script res://tests/transport/test_runtime_transport.gd diff --git a/docs/plans/original-completion-2026-10-02/execution/completion_marker_contracts.json b/docs/plans/original-completion-2026-10-02/execution/completion_marker_contracts.json index 8f20472..4947473 100644 --- a/docs/plans/original-completion-2026-10-02/execution/completion_marker_contracts.json +++ b/docs/plans/original-completion-2026-10-02/execution/completion_marker_contracts.json @@ -3908,6 +3908,23 @@ "text": "\tprint(\"%s: %d checks\" % [\"PASS\" if _failures == 0 else \"FAIL\", _checks])" } ] + }, + { + "test": "tests/s2/test_new_pid_pairs.gd", + "template": "PASS: checks", + "required": true, + "fixed_check_count_used": false, + "source_sha256_at_schema_audit": "9742f9ac253067e6ae69a53faed054d71925f316d038ff7c5e480c3a9be91b04", + "authority": { + "path": "docs/plans/original-completion-2026-10-02/execution/p14-03-route-wait/EVIDENCE_MATRIX.md", + "scope": "Claude session 2026-10-20: new-PID pair suite; exact label/schema only" + }, + "source_marker_lines": [ + { + "line": 45, + "text": "\tprint(\"%s: %d checks\" % [\"PASS\" if _failures == 0 else \"FAIL\", _checks])" + } + ] } ], "unknown_roster_suite_policy": "refuse, explicitly review its source/schema before accepting", diff --git a/docs/plans/original-completion-2026-10-02/execution/p06-01-a06/perf_probe.gd.uid b/docs/plans/original-completion-2026-10-02/execution/p06-01-a06/perf_probe.gd.uid new file mode 100644 index 0000000..5b2fc20 --- /dev/null +++ b/docs/plans/original-completion-2026-10-02/execution/p06-01-a06/perf_probe.gd.uid @@ -0,0 +1 @@ +uid://fstsv5yarw5v diff --git a/docs/plans/original-completion-2026-10-02/execution/p06-03-recovery/report_cost_probe.gd.uid b/docs/plans/original-completion-2026-10-02/execution/p06-03-recovery/report_cost_probe.gd.uid new file mode 100644 index 0000000..24f6e44 --- /dev/null +++ b/docs/plans/original-completion-2026-10-02/execution/p06-03-recovery/report_cost_probe.gd.uid @@ -0,0 +1 @@ +uid://ut4tipgj23pf diff --git a/docs/plans/original-completion-2026-10-02/execution/p14-02-warp/warp_perf_probe.gd.uid b/docs/plans/original-completion-2026-10-02/execution/p14-02-warp/warp_perf_probe.gd.uid new file mode 100644 index 0000000..0986287 --- /dev/null +++ b/docs/plans/original-completion-2026-10-02/execution/p14-02-warp/warp_perf_probe.gd.uid @@ -0,0 +1 @@ +uid://clvwcbbt34gwr diff --git a/scripts/special/peeping_room_service.gd.uid b/scripts/special/peeping_room_service.gd.uid new file mode 100644 index 0000000..b9e61f5 --- /dev/null +++ b/scripts/special/peeping_room_service.gd.uid @@ -0,0 +1 @@ +uid://bi36fvp1jiiiv diff --git a/scripts/transport/warp_service.gd.uid b/scripts/transport/warp_service.gd.uid new file mode 100644 index 0000000..dada810 --- /dev/null +++ b/scripts/transport/warp_service.gd.uid @@ -0,0 +1 @@ +uid://5mjcum1r1poa diff --git a/tests/fixtures/p14-03/legacy_rush_v1/thumbnail.png.import b/tests/fixtures/p14-03/legacy_rush_v1/thumbnail.png.import new file mode 100644 index 0000000..3b5f4c5 --- /dev/null +++ b/tests/fixtures/p14-03/legacy_rush_v1/thumbnail.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cnde4l2e1lib7" +path="res://.godot/imported/thumbnail.png-307ea4ea2aa92de395157267241a407e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://tests/fixtures/p14-03/legacy_rush_v1/thumbnail.png" +dest_files=["res://.godot/imported/thumbnail.png-307ea4ea2aa92de395157267241a407e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/tests/helpers/mana_outage.gd.uid b/tests/helpers/mana_outage.gd.uid new file mode 100644 index 0000000..1e48109 --- /dev/null +++ b/tests/helpers/mana_outage.gd.uid @@ -0,0 +1 @@ +uid://3h45paa0oqnn diff --git a/tests/mvp/test_whole_tower_outage.gd.uid b/tests/mvp/test_whole_tower_outage.gd.uid new file mode 100644 index 0000000..ae16221 --- /dev/null +++ b/tests/mvp/test_whole_tower_outage.gd.uid @@ -0,0 +1 @@ +uid://jetoym5gu2ts diff --git a/tests/s2/test_mana_recovery_new_pid.gd.uid b/tests/s2/test_mana_recovery_new_pid.gd.uid new file mode 100644 index 0000000..a870de7 --- /dev/null +++ b/tests/s2/test_mana_recovery_new_pid.gd.uid @@ -0,0 +1 @@ +uid://bdhjn1ujekdi3 diff --git a/tests/s2/test_mana_reserve_new_pid.gd.uid b/tests/s2/test_mana_reserve_new_pid.gd.uid new file mode 100644 index 0000000..1cd7ecb --- /dev/null +++ b/tests/s2/test_mana_reserve_new_pid.gd.uid @@ -0,0 +1 @@ +uid://c340fnfuwchcs diff --git a/tests/s2/test_new_pid_pairs.gd b/tests/s2/test_new_pid_pairs.gd new file mode 100644 index 0000000..41ae0d5 --- /dev/null +++ b/tests/s2/test_new_pid_pairs.gd @@ -0,0 +1,68 @@ +extends SceneTree + +## Runs every writer/reader save-restart pair as two real child Godot processes +## (distinct PIDs) from this one suite, so a script-level regression roster also +## proves the new-PID halves. Each child's complete stdout+stderr and exit code +## are kept under user://pair-evidence/ (inside the run's private profile); +## summaries printed here avoid completion-marker wording on purpose. +const PAIRS: Array[String] = [ + "res://tests/s2/test_mana_reserve_new_pid.gd", + "res://tests/s2/test_mana_recovery_new_pid.gd", + "res://tests/transport/test_runtime_warp.gd", + "res://tests/mvp/test_whole_tower_outage.gd", + "res://tests/transport/test_route_wait_choice.gd", +] +const EVIDENCE_DIR := "user://pair-evidence" +var _checks := 0 +var _failures := 0 + + +func _initialize() -> void: + call_deferred("_run") + + +func _run() -> void: + var engine := OS.get_executable_path() + var project := ProjectSettings.globalize_path("res://") + DirAccess.make_dir_recursive_absolute(ProjectSettings.globalize_path(EVIDENCE_DIR)) + print("New-PID pairs: parent pid %d engine %s" % [OS.get_process_id(), engine]) + for script: String in PAIRS: + var pids := {} + for mode: String in ["writer", "reader"]: + var output: Array = [] + var code := OS.execute(engine, ["--headless", "--path", project, "--script", script, "--", mode], output, true) + var text := "".join(output) + var name := "%s.%s" % [script.get_file().get_basename(), mode] + var file := FileAccess.open(EVIDENCE_DIR.path_join(name + ".log"), FileAccess.WRITE) + file.store_string(text) + file.close() + var pid := _child_pid(text) + pids[mode] = pid + var passed := code == 0 and _child_marker_passed(text) + print(" pair %s %s exit=%d child_pid=%d bytes=%d sha256=%s" % [script.get_file(), mode, code, pid, text.to_utf8_buffer().size(), text.sha256_text()]) + _expect(passed, "%s %s child completes with zero failures" % [script.get_file(), mode]) + _expect(int(pids["writer"]) > 0 and int(pids["reader"]) > 0 and pids["writer"] != pids["reader"] and pids["reader"] != OS.get_process_id(), "%s writer and reader ran in distinct processes" % script.get_file()) + print("%s: %d checks" % ["PASS" if _failures == 0 else "FAIL", _checks]) + quit(_failures) + + +## Each pair script prints its own pid on its first line ("... pid N" or "(pid N)"). +static func _child_pid(text: String) -> int: + var regex := RegEx.new() + regex.compile("pid (\\d+)") + var found := regex.search(text) + return int(found.get_string(1)) if found != null else -1 + + +static func _child_marker_passed(text: String) -> bool: + var regex := RegEx.new() + regex.compile("(?m)^PASS: (\\d+) checks$") + var found := regex.search(text) + return found != null and int(found.get_string(1)) > 0 and not text.contains("FAIL:") and not text.contains("SCRIPT ERROR") + + +func _expect(condition: bool, label: String) -> void: + _checks += 1 + if not condition: + _failures += 1 + push_error(" ✗ %s" % label) diff --git a/tests/s2/test_new_pid_pairs.gd.uid b/tests/s2/test_new_pid_pairs.gd.uid new file mode 100644 index 0000000..0d73431 --- /dev/null +++ b/tests/s2/test_new_pid_pairs.gd.uid @@ -0,0 +1 @@ +uid://bykhpoojytbrd diff --git a/tests/s2/test_runtime_mana_reserve.gd.uid b/tests/s2/test_runtime_mana_reserve.gd.uid new file mode 100644 index 0000000..b1dc570 --- /dev/null +++ b/tests/s2/test_runtime_mana_reserve.gd.uid @@ -0,0 +1 @@ +uid://cewrt8dc6d4hi diff --git a/tests/special/peeping_room_fixture.gd.uid b/tests/special/peeping_room_fixture.gd.uid new file mode 100644 index 0000000..107a560 --- /dev/null +++ b/tests/special/peeping_room_fixture.gd.uid @@ -0,0 +1 @@ +uid://b0c3ouuq42ycg diff --git a/tests/special/test_peeping_room_evidence.gd.uid b/tests/special/test_peeping_room_evidence.gd.uid new file mode 100644 index 0000000..f6a89e2 --- /dev/null +++ b/tests/special/test_peeping_room_evidence.gd.uid @@ -0,0 +1 @@ +uid://dftsky13pe0uj diff --git a/tests/special/test_peeping_room_geometry.gd.uid b/tests/special/test_peeping_room_geometry.gd.uid new file mode 100644 index 0000000..240e7b3 --- /dev/null +++ b/tests/special/test_peeping_room_geometry.gd.uid @@ -0,0 +1 @@ +uid://4r40f1kpjmvj diff --git a/tests/special/test_peeping_room_reference.gd.uid b/tests/special/test_peeping_room_reference.gd.uid new file mode 100644 index 0000000..2dc6d38 --- /dev/null +++ b/tests/special/test_peeping_room_reference.gd.uid @@ -0,0 +1 @@ +uid://cnnon5woufurp diff --git a/tests/special/test_peeping_room_runtime.gd.uid b/tests/special/test_peeping_room_runtime.gd.uid new file mode 100644 index 0000000..867d1e5 --- /dev/null +++ b/tests/special/test_peeping_room_runtime.gd.uid @@ -0,0 +1 @@ +uid://4n5welqfhdqg diff --git a/tests/special/test_peeping_room_save.gd.uid b/tests/special/test_peeping_room_save.gd.uid new file mode 100644 index 0000000..02094ba --- /dev/null +++ b/tests/special/test_peeping_room_save.gd.uid @@ -0,0 +1 @@ +uid://8uytmpjup8q4 diff --git a/tests/transport/test_route_wait_choice.gd.uid b/tests/transport/test_route_wait_choice.gd.uid new file mode 100644 index 0000000..99f40a7 --- /dev/null +++ b/tests/transport/test_route_wait_choice.gd.uid @@ -0,0 +1 @@ +uid://btfqo5k3jf8p2 diff --git a/tests/transport/test_runtime_warp.gd.uid b/tests/transport/test_runtime_warp.gd.uid new file mode 100644 index 0000000..0615a59 --- /dev/null +++ b/tests/transport/test_runtime_warp.gd.uid @@ -0,0 +1 @@ +uid://73ewrfw84byc diff --git a/tools/regression/suite-policy.json b/tools/regression/suite-policy.json index ad194ae..57dd50a 100644 --- a/tools/regression/suite-policy.json +++ b/tools/regression/suite-policy.json @@ -191,7 +191,7 @@ "new_audio_QA": false }, "tests/ui/test_main_dashboard.gd": { - "source_sha256": "fa9ee0c4b9aee00a2be6d05a9dab7c0c3e8b0beb2b944257de1dc308bfc3cc20", + "source_sha256": "305227c1077a92ef3ee522b561a68b0685767740b46b51ff789c800931647ef1", "ordinary_cleanup_prepared": false, "ordinary_control_labels": [], "old_bounded_teardown": true, @@ -379,7 +379,7 @@ "source_only_ownership_review": true }, "tests/transport/test_runtime_transport.gd": { - "source_sha256": "ec6f8fa8e8f2a76a6f6214b4ee84861aba1bb13845a342c5126905b01f428a15", + "source_sha256": "78a5563ff2421ae65a0988cf0d26669f54bcc0f44250b00e5334cadf1228da94", "ordinary_cleanup_prepared": true, "ordinary_control_labels": [ "single"