feat(profiler/behave_shell): emit environmental.locale

Searches ANSI-stripped output for LANG / LC_ALL / LC_CTYPE envvar
substrings emitted by env / locale / printenv. Highest-priority key
wins (LC_ALL > LANG > LC_CTYPE); POSIX value normalised to BCP-47:
en_US.UTF-8 → en-US, pt_BR.UTF-8 → pt-BR, C/POSIX → und. Free-string
registry value emitted directly.

PII discipline: only the parsed locale value enters observations;
surrounding output is read once for matching and dropped.
This commit is contained in:
2026-05-04 00:35:31 -04:00
parent 4257f7b6e2
commit b7ff5d2cc1
4 changed files with 197 additions and 6 deletions

View File

@@ -233,6 +233,11 @@ PROMPT_LINE_MAX_CHARS: int = 256
# honesty). Above, the shell-type vote is robust.
SHELL_TYPE_MIN_PROMPTS: int = 3
# ── environmental.locale (Step F.3) ────────────────────────────────────────
# Below this many characters in the parsed locale value, treat as
# noise and skip emission (a single 'C' or 'en' is too thin).
LOCALE_MIN_VALUE_LENGTH: int = 2
# ── motor.keystroke_cadence (Step B.1) ──────────────────────────────────────
# Typing bursts split at gaps > IKI_THINK_MAX_S so think-pauses between
# commands don't inflate the within-burst CV. Mirrors the prototype's