feat(profiler/behave_shell): emit environmental.keyboard_layout

ANTI authorised dropping the PII boundary for this primitive. ctx
gains typed_unigram_counts / typed_bigram_counts / typed_letter_count
populated during the existing single-pass input walk (paste-class
events excluded).

Two-axis classifier:
* layout-artefact unigrams take priority — q rate above floor with
  low English saturation → azerty; z above floor with y below → qwertz
* fallback to English-bigram saturation: ≥ floor → qwerty, else other

Sample-size floor 200 typed letters; bigram histogram capped at
top-64 to bound memory. Confidence cap stays moderate (0.40-0.55) —
heuristic discriminator.
This commit is contained in:
2026-05-04 00:38:24 -04:00
parent b7ff5d2cc1
commit cd7c7ea5a2
5 changed files with 227 additions and 1 deletions

View File

@@ -25,6 +25,7 @@ from decnet.profiler.behave_shell._features.cognitive import (
inter_command_latency_class,
)
from decnet.profiler.behave_shell._features.environmental import (
keyboard_layout,
locale,
shell_type,
terminal_multiplexer,
@@ -75,4 +76,5 @@ FEATURES: tuple[FeatureFn, ...] = (
shell_type,
terminal_multiplexer,
locale,
keyboard_layout,
)