P0 — bounded edit-distance normalization for registered command targets (#122 deterministic slice) #356

Closed
opened 2026-09-08 02:03:38 +00:00 by nsaspy · 0 comments
Owner

Parent: #122

Goal

Land the dependency-independent deterministic edit-distance slice requested by the operator without reviving the stale #124 / Prolog-RLM rewrite architecture.

Scope

  • Reuse Zara's existing Levenshtein implementation from wake-word matching rather than adding a dependency.
  • Canonicalize only a bounded command target against Zara's currently registered/allow-listed app targets before Prolog intent execution.
  • Exact target matches always win.
  • Only a unique closest candidate within a strict length-scaled threshold may rewrite.
  • Short/unsafe candidates, ties, and out-of-threshold candidates return no rewrite and follow the existing fallback path.
  • The canonical target is still resolved/executed through the existing Prolog path; the matcher never executes a command and never invents a capability.
  • Preserve literal values and do not fuzzy-match URLs, paths, arbitrary shell text, contacts, messages, durations, or other slots.
  • Keep one daemon/runtime brain and no Android production changes.

Initial acceptance

  • open 4chna may canonicalize to registered 4chan when that is the unique bounded match.
  • thunderbrd/similar short target-only ASR typo can recover to a registered app when unique.
  • exact open 4chan is unchanged.
  • ambiguous neighbors do not guess.
  • unrelated target remains unresolved/delegated.
  • the registered target vocabulary is obtained through the canonical Prolog engine boundary, not a hard-coded second app list.
  • focused tests plus scripts/test-all.sh, nix flake check, packaged build, and exact-head CI are green.

Relationship to #122

This consumes only the deterministic, allow-listed edit-distance normalization portion. #122 remains the broader bounded utterance-rewriter issue and needs its stale model-provider dependency/architecture updated separately before any model-backed rewrite work.

Parent: #122 ## Goal Land the dependency-independent deterministic edit-distance slice requested by the operator without reviving the stale #124 / Prolog-RLM rewrite architecture. ## Scope - Reuse Zara's existing Levenshtein implementation from wake-word matching rather than adding a dependency. - Canonicalize only a bounded command target against Zara's currently registered/allow-listed app targets before Prolog intent execution. - Exact target matches always win. - Only a unique closest candidate within a strict length-scaled threshold may rewrite. - Short/unsafe candidates, ties, and out-of-threshold candidates return no rewrite and follow the existing fallback path. - The canonical target is still resolved/executed through the existing Prolog path; the matcher never executes a command and never invents a capability. - Preserve literal values and do not fuzzy-match URLs, paths, arbitrary shell text, contacts, messages, durations, or other slots. - Keep one daemon/runtime brain and no Android production changes. ## Initial acceptance - `open 4chna` may canonicalize to registered `4chan` when that is the unique bounded match. - `thunderbrd`/similar short target-only ASR typo can recover to a registered app when unique. - exact `open 4chan` is unchanged. - ambiguous neighbors do not guess. - unrelated target remains unresolved/delegated. - the registered target vocabulary is obtained through the canonical Prolog engine boundary, not a hard-coded second app list. - focused tests plus `scripts/test-all.sh`, `nix flake check`, packaged build, and exact-head CI are green. ## Relationship to #122 This consumes only the deterministic, allow-listed edit-distance normalization portion. #122 remains the broader bounded utterance-rewriter issue and needs its stale model-provider dependency/architecture updated separately before any model-backed rewrite work.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/zara#356
No description provided.