Centralize execution setting and session validation

This commit is contained in:
2026-08-11 21:12:56 +00:00
parent 5ccfa4a345
commit 8cfc71c351
18 changed files with 345 additions and 104 deletions

View File

@@ -8,6 +8,9 @@ import (
// NormalizeSessionID applies the shared session identifier rule.
func NormalizeSessionID(raw string) (string, error) {
if !utf8.ValidString(raw) {
return "", fmt.Errorf("session_id must contain valid UTF-8")
}
normalized := strings.TrimSpace(raw)
if normalized == "" {
return "", nil