# Audit: select audit-version: 1 audited-at: 2026-06-26 scope: ['soma', 'sema'] (eidos recipe present though 'eidos' not in morfo scope — see systemic SCOPE-DRIFT) files: - provider: src/uix/soma/components/select/select-provider.svelte.ts (present) - morfo: src/uix/morfo/components/select.ts (present) - recipe: src/uix/eidos/components/select/select.css + lib/recipes/base.ts §select (present) - demo: web/routes/uix/components/select (present, not yet inspected this pass) - test: src/uix/soma/components/select/select-provider.svelte.test.ts (present, jsdom) - readme: soma + eidos README present (not yet inspected this pass) ## Summary Select is the canonical hard overlay: portal-split (`data-color` on trigger+content via TSC v2.2), virtual focus (aria-activedescendant), typeahead, dismissal-with-trigger-exclusion, floating + scroll-lock. The soma provider respects the eidos→soma frontier (zero eidos imports) and uses `SvelteMap` for the label registry (A33-correct). But the audit found **2 contract-vs-behavior contradictions** (focus.trap declared yet not implemented; eidos styles two parts the morfo never declares), a **keyboard double-route with a real behavioral asymmetry + an off-by loop bug**, an **untrusted-selector fragility**, an **A31 O(N²) selection read**, and theming-coherence drift (magic z-index, an `em`-literal font-size that escapes the px/rem guard). Test coverage pins only the easy path (selection logic) — every hard path (keyboard, typeahead, dismissal, focus return) is untested, jsdom-only. Counts: CRITICAL 0 · HIGH 4 · MEDIUM 5 · LOW 2. ## Findings ### HIGH: Untrusted value interpolated into querySelector without CSS.escape - dimension: C - rule: behavioral (dimension-C selector robustness) + active_architecture §7.5 local-read frontier - location: select-provider.svelte.ts:244-246 (`scrollSelectedIntoView`) - evidence: ```ts const selectedEl = container.querySelector( `[${attrs.item}][data-value="${selectedValue}"]` ); ``` `selectedValue = this.opts.value.current[0]` is consumer-supplied option-value text, interpolated raw. - impact: a value containing `"`, `]`, or a backslash produces an invalid selector → `querySelector` throws (`SyntaxError`) on open, or silently matches nothing → the selected item never scrolls into view and `highlightedId` is left stale. Blast radius: any app whose option values aren't plain identifiers (URLs, emails, JSON-ish keys, i18n strings with quotes). - repro: `