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:
9
client/scripts/ids.gd
Normal file
9
client/scripts/ids.gd
Normal 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
|
||||
Reference in New Issue
Block a user