feat(client): id helper + leaf canon-log entities with owned invariants

Also configure GUT to not treat push_error() as a test failure
(client/.gutconfig.json: failure_error_types = [engine, gut]).
The brief's LogPlayer/Quest setters intentionally push_error() on
rejected input; GUT's default failure_error_types includes
push_error, which would fail test_player_rejects_unknown_class and
test_quest_status_enum despite their assertions passing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-09 14:12:16 -05:00
parent 5486ed00fa
commit a682022f17
15 changed files with 209 additions and 1 deletions

9
client/scripts/ids.gd Normal file
View File

@@ -0,0 +1,9 @@
class_name Ids
extends RefCounted
## Shared id validation. Every canon-log / content id matches ^[a-z0-9_]+$.
static var _re: RegEx = RegEx.create_from_string("^[a-z0-9_]+$")
static func is_valid(id: String) -> bool:
return _re.search(id) != null