Skip to content

shell: replace closedSet+openWildcard with noMatchPolicy#2022

Open
curtisman wants to merge 1 commit intomicrosoft:mainfrom
curtisman:curtism/shell-noMatchPolicy
Open

shell: replace closedSet+openWildcard with noMatchPolicy#2022
curtisman wants to merge 1 commit intomicrosoft:mainfrom
curtisman:curtism/shell-noMatchPolicy

Conversation

@curtisman
Copy link
Member

Refactor PartialCompletionSession to compute a single NoMatchPolicy enum ("accept" | "refetch" | "slide") from the backend's descriptive closedSet and openWildcard fields when a result arrives.

The shell's reuseSession() decision points (A3 and C6) now use a simple switch on the policy instead of checking two booleans independently. No changes to the wire format, agent SDK, dispatcher, or grammar matcher — all stay descriptive.

Changes

  • partialCompletionSession.ts: Replace closedSet + openWildcard private fields with a single noMatchPolicy: NoMatchPolicy field. Add computeNoMatchPolicy() pure function. Simplify A3 and C6 branches to switch statements.
  • completion.md: Document NoMatchPolicy derivation, rationale, and per-trigger behavior. Update closedSet/openWildcard key-type sections to note they're folded into the policy in the shell.

Testing

All 104 existing shell completion tests pass (7 test suites).

Refactor PartialCompletionSession to compute a single NoMatchPolicy
enum ("accept" | "refetch" | "slide") from the backend's descriptive
closedSet and openWildcard fields when a result arrives.

The shell's reuseSession() decision points (A3 and C6) now use a
simple switch on the policy instead of checking two booleans
independently.  No changes to the wire format, agent SDK, dispatcher,
or grammar matcher -- all stay descriptive.

Update docs/architecture/completion.md to document NoMatchPolicy
derivation and rationale.
@curtisman curtisman force-pushed the curtism/shell-noMatchPolicy branch from d74c4a0 to 1565e0d Compare March 18, 2026 17:13
@curtisman curtisman added this pull request to the merge queue Mar 18, 2026
@curtisman curtisman removed this pull request from the merge queue due to a manual request Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant