From bd646243098938d7ccace22078b3e3a8f66f31e3 Mon Sep 17 00:00:00 2001 From: goose Date: Sun, 4 Oct 2026 01:09:30 -0400 Subject: [PATCH] chore: archive G4 report outside product tree --- task-G4-report.md | 56 ----------------------------------------------- 1 file changed, 56 deletions(-) delete mode 100644 task-G4-report.md diff --git a/task-G4-report.md b/task-G4-report.md deleted file mode 100644 index d9367cc..0000000 --- a/task-G4-report.md +++ /dev/null @@ -1,56 +0,0 @@ -# G4 final — PresentationEvent immutability architecture - -## Scope - -This final remediation changes only `PresentationEvent`, its focused unit coverage, and this report. No domain, gameplay, presentation routing, asset, or DCWASCII source was changed. - -## Architecture - -`PresentationEvent` no longer declares any mutable instance backing field: - -- removed `_backing_values` and `_is_initialized`; -- removed declared `_source_event`, `_kind`, `_notification`, and `_accent` properties; -- records the complete captured event/presentation snapshot once in class-level `_snapshots`, keyed by `get_instance_id()`; -- exposes only getter APIs (`source_event`, `kind`, `notification`, and `accent`) from each instance; -- deep-copies the source `GameEvent` at capture time and returns a new copy from `source_event` on every read. - -The internal snapshot table is the sole data owner. No instance field can be changed after construction to alter the mapped result. - -## Legacy direct writes - -Because GDScript permits direct writes to underscore-named members, `_set` explicitly absorbs every former mutable field name: - -- `_kind` -- `_source_event` -- `_backing_values` -- `_is_initialized` -- `_notification` -- `_accent` - -Those names are intentionally undeclared, so these writes create no per-instance state and never modify the frozen snapshot. The focused mapping test performs all four requested writes (`_kind`, `_source_event`, `_backing_values`, `_is_initialized`) and verifies the mapped kind, notification, accent, source event, and source payload are unchanged. - -## Store lifecycle - -A `RefCounted` pre-delete notification was tested as a cleanup mechanism. Godot invokes it after the script instance is unavailable, producing `Cannot call method 'get_instance_id' on a null value`; it is therefore not viable or safe. The final store is intentionally process-lifetime and contains only captured presentation snapshots. This avoids teardown errors while preserving the required immutable instance architecture. - -## Verification - -`./scripts/verify.sh` passed with Godot 4.5.0: - -| Suite | Result | -| --- | ---: | -| Unit | 188 / 188 tests, 1,440 assertions | -| Integration | 11 / 11 tests, 59,470 assertions | -| E2E | 58 / 58 tests, 573 assertions | -| Visual structural capture | passed | - -Visual metrics: - -- `artifacts/visual-check.png`: `dungeon_non_black_pixels=489308`, `visible_pixels=17524`, `explored_pixels=10438`, `explored_luminance=0.012`, `unknown_pixels=365325`, `unknown_luminance=0.001`. -- `artifacts/visual-check-exit.png`: `dungeon_non_black_pixels=489252`, `visible_pixels=17404`, `explored_pixels=17146`, `explored_luminance=0.012`, `unknown_pixels=439497`, `unknown_luminance=0.001`. - -The existing GUT invalid-UID and engine resource-cleanup diagnostics were emitted, but there were no project script errors, parse errors, test failures, or visual verification failures. - -## Delivery - -A local commit is created for this final remediation. No push and no pull request are created.