P1 — implement typed slots and principal/conversation-scoped clarification dialogue #155

Closed
opened 2026-08-22 21:52:23 +00:00 by lost-rob0t · 0 comments
lost-rob0t commented 2026-08-22 21:52:23 +00:00 (Migrated from github.com)

Parent epic: #150
Depends on: #154, #131
Integrates with: #51; voice transport later #132.

Goal

Implement the frozen semantic slot/dialogue contract from #154. Generalize today's scattered pending(Intent) cases into one bounded state machine without a global pending command/current user shortcut.

Required behavior

  • required/optional typed slot definitions and validators;
  • missing, invalid and ambiguous slot states;
  • deterministic next-question selection;
  • follow-up utterance fills only the active requested slot when unambiguous;
  • correction/replacement (actually make that five minutes);
  • cancellation (never mind);
  • timeout/expiry;
  • retry after invalid answer;
  • stale turn/session/reconnect answer rejected;
  • state keyed by authenticated principal + conversation/session + intent/dialogue id;
  • bounded number/size/lifetime of pending dialogues;
  • no cross-principal inference from error wording/timing where practical.

Mandatory examples/tests

  • set a timer -> ask duration; twenty minutes -> duration 1200;
  • set a timer -> bananas -> focused retry;
  • set a timer -> never mind -> cancelled and later twenty minutes is not consumed;
  • correction from 20 -> 5 minutes before execution;
  • open -> ask app -> Firefox;
  • text Sarah -> ask message;
  • two missing slots with deterministic order;
  • simultaneous A/B principals with identical pending intent IDs/phrases remain isolated;
  • two devices/conversations for same principal do not steal each other's answers;
  • reconnect/stale answer and timeout races;
  • cancellation racing with slot fill;
  • resource-limit exhaustion remains bounded.

TDD/gates

Smallest deterministic tests first and expected red; virtual/fake clock for timeout tests; no real sleeps in CI. Add focused non-interactive dialogue script, full scripts/test-all.sh, nix flake check, nix build, coverage review, exact-head Actions.

Non-goals

No provider execution yet; no Android implementation; no user-authored command persistence; no second ContextManager.

Acceptance

A complete or partial utterance yields a typed immutable semantic draft, and follow-up dialogue safely drives it to complete/cancelled state under explicit principal/conversation ownership.

Parent epic: #150 Depends on: #154, #131 Integrates with: #51; voice transport later #132. ## Goal Implement the frozen semantic slot/dialogue contract from #154. Generalize today's scattered `pending(Intent)` cases into one bounded state machine without a global pending command/current user shortcut. ## Required behavior - required/optional typed slot definitions and validators; - missing, invalid and ambiguous slot states; - deterministic next-question selection; - follow-up utterance fills only the active requested slot when unambiguous; - correction/replacement (`actually make that five minutes`); - cancellation (`never mind`); - timeout/expiry; - retry after invalid answer; - stale turn/session/reconnect answer rejected; - state keyed by authenticated principal + conversation/session + intent/dialogue id; - bounded number/size/lifetime of pending dialogues; - no cross-principal inference from error wording/timing where practical. ## Mandatory examples/tests - `set a timer` -> ask duration; `twenty minutes` -> duration 1200; - `set a timer` -> `bananas` -> focused retry; - `set a timer` -> `never mind` -> cancelled and later `twenty minutes` is not consumed; - correction from 20 -> 5 minutes before execution; - `open` -> ask app -> `Firefox`; - `text Sarah` -> ask message; - two missing slots with deterministic order; - simultaneous A/B principals with identical pending intent IDs/phrases remain isolated; - two devices/conversations for same principal do not steal each other's answers; - reconnect/stale answer and timeout races; - cancellation racing with slot fill; - resource-limit exhaustion remains bounded. ## TDD/gates Smallest deterministic tests first and expected red; virtual/fake clock for timeout tests; no real sleeps in CI. Add focused non-interactive dialogue script, full `scripts/test-all.sh`, `nix flake check`, `nix build`, coverage review, exact-head Actions. ## Non-goals No provider execution yet; no Android implementation; no user-authored command persistence; no second ContextManager. ## Acceptance A complete or partial utterance yields a typed immutable semantic draft, and follow-up dialogue safely drives it to complete/cancelled state under explicit principal/conversation ownership.
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#155
No description provided.