Registration: replace date-of-birth field with a simple 18+ confirmation

The register form collected and validated an actual date of birth just to
throw it away (backend never stored it beyond a nullable column). Per the
roadmap note: don't collect/store DOB right now, just get a client-side
"I am 18 or older" confirmation. RegisterRequest.date_of_birth (str) is now
over_18 (bool); the endpoint rejects over_18=false with 400 same as before.
calculate_age() is kept (unused by /register now) since real DOB collection
is coming back in a future pass and deleting it broke test_auth_age_gate.py's
import for no benefit.

Frontend: DOBEdit LineEdit replaced with an Over18Check CheckBox; api_client.gd's
register() now takes a bool instead of a date string. All Godot callers
(smoke_test_auth/e2e/world_list/main_menu_ui/main_menu_full_flow) and backend
test files updated to match. Full suite verified against a live backend:
61/61 pytest, 6/6 Godot smoke tests (33 individual assertions), all passing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M6rUEynmv2QmweocAQYARN
This commit is contained in:
claude-checkpoint-tooling
2026-08-20 16:25:27 +00:00
parent 4ec71b87b9
commit 0ecc16d963
14 changed files with 122 additions and 125 deletions
+4 -4
View File
@@ -31,7 +31,7 @@ func _run() -> void:
var auth_panel: PanelContainer = instance.get_node("CenterContainer/VBoxContainer/AuthPanel")
var auth_mode_label: Label = instance.get_node("CenterContainer/VBoxContainer/AuthPanel/MarginContainer/AuthVBox/AuthModeLabel")
var email_edit: LineEdit = instance.get_node("CenterContainer/VBoxContainer/AuthPanel/MarginContainer/AuthVBox/EmailEdit")
var dob_edit: LineEdit = instance.get_node("CenterContainer/VBoxContainer/AuthPanel/MarginContainer/AuthVBox/DOBEdit")
var over_18_check: CheckBox = instance.get_node("CenterContainer/VBoxContainer/AuthPanel/MarginContainer/AuthVBox/Over18Check")
# --- Test 1: auth panel starts hidden ---
if _check("auth panel starts hidden", not auth_panel.visible):
@@ -58,7 +58,7 @@ func _run() -> void:
else:
failed += 1
if _check("DOB field hidden in Login mode", not dob_edit.visible):
if _check("Over18 checkbox hidden in Login mode", not over_18_check.visible):
passed += 1
else:
failed += 1
@@ -82,7 +82,7 @@ func _run() -> void:
else:
failed += 1
if _check("DOB field visible in Register mode", dob_edit.visible):
if _check("Over18 checkbox visible in Register mode", over_18_check.visible):
passed += 1
else:
failed += 1
@@ -101,7 +101,7 @@ func _run() -> void:
else:
failed += 1
if _check("DOB field hidden after switching back to Login", not dob_edit.visible):
if _check("Over18 checkbox hidden after switching back to Login", not over_18_check.visible):
passed += 1
else:
failed += 1