Merged
Conversation
curtisman
added a commit
to curtisman/TypeAgent
that referenced
this pull request
Mar 26, 2026
- Replace expect()-based completionResultsEqual with node:util isDeepStrictEqual (no Jest runtime dependency) - Renumber invariants contiguously (1-12), removing redundant ones: old microsoft#7 (separatorMode undefined when empty), microsoft#8 (separatorMode optional at mpl=0), microsoft#10 (closedSet true for keywords, derivable from #2), microsoft#12 (dup of #3) - Reformat invariant tables as definition-list paragraphs for readability - Add regression test for directionSensitive recompute when openWildcard=true (validates the guard change from prior commit) - Add completion.md invariant cross-references in test comments - Fix stale actionGrammar.md claim about recompute skip conditions
curtisman
added a commit
to curtisman/TypeAgent
that referenced
this pull request
Mar 28, 2026
- Group trailingSepAdvanced with the directionSensitive decision tree under a shared section header for better locality (microsoft#7) - Add invariant comment: openWildcard requires a preceding keyword match so P > 0 whenever openWildcard is true (#1) - Add JSDoc to couldBackUp return field in tryPartialStringMatch (microsoft#5) - Compact equivalence analysis tables in actionGrammar.md from 5-column wide format to 3-column for readability in narrow contexts (microsoft#6)
curtisman
added a commit
to curtisman/TypeAgent
that referenced
this pull request
Mar 29, 2026
- Remove redundant from>0 guard in isSeparatorOnlyGap (to>from suffices) - Remove redundant anchor!==maxPrefixLength conjunct at Phase B - Use 'forward|backward' union type instead of string for direction param - Add consolidated invariant index (#1-microsoft#8) at top of test utils - Renumber invariants: single-result #1-#2, cross-direction #3-microsoft#7, truncated-forward microsoft#8 - Replace mpl abbreviation with matchedPrefixLength in comments - Standardize on 'fallback' terminology (was mixed fallthrough/fallback) - Extract normalizeCompletionResult helper alongside completionResultsEqual - Fix stale test name that still referenced old expected completions - Fix 'Backup failed' wording to name the function explicitly
curtisman
added a commit
to curtisman/TypeAgent
that referenced
this pull request
Apr 3, 2026
Add separator-mode conflict detection and filtering to grammar completion when rules with different spacing modes (e.g. spacing=none vs default) compete at the same maxPrefixLength. Filter incompatible candidates based on trailing separator state, advance P past separators when needed, and force closedSet=false and afterWildcard downgrade so the shell re-fetches. Add deferred shadow candidates for Category 3b backward completion to fix direction asymmetry when couldBackUp causes rules to land at different P values. Shadows are flushed after Phase B1 (not Phase A) so wildcard-at-EOI partial keyword advances are visible. Refactor Phase B into finalizeCandidates (B1) and materializeCandidates (B2). B1 resolves wildcard-at-EOI descriptors, injects forward EOI candidates, flushes shadows, and filters separator conflicts. B2 converts surviving candidates to output arrays. Apply the same cross-grammar separator conflict logic in grammarStore.ts post-loop merge. Export candidateSeparatorMode from grammarMatcher.ts. Relax invariant microsoft#7 to allow equality (separator conflict filtering can advance backward P). Normalize completion ordering in cross-direction invariant checks. Files changed: - packages/actionGrammar/src/grammarCompletion.ts - packages/actionGrammar/src/grammarMatcher.ts - packages/actionGrammar/test/grammarCompletionSpacingNested.spec.ts - packages/actionGrammar/test/testUtils.ts - packages/cache/src/cache/grammarStore.ts - docs/architecture/actionGrammar.md - docs/architecture/completion.md
curtisman
added a commit
to curtisman/TypeAgent
that referenced
this pull request
Apr 3, 2026
…lict - Remove droppedCandidates field from CompletionContext; hasSepConflict already implies candidates were dropped (early return when false). - Merge filter + P-advance into a single if/else branch keyed on trailing separator state (forward only; backward treats separator as absent per Invariant #3). - Replace resolveAsTrailingSep local with inline condition. - Tighten Invariant microsoft#7 to strict inequality (backward must back up).
curtisman
added a commit
to curtisman/TypeAgent
that referenced
this pull request
Apr 4, 2026
- Fix mergeSepMode comment: 'at position' → 'at position - 1' - Expand effectiveTrailingSep JSDoc with specific recomputation details - Clarify 'wildcard-at-EOI string states' → 'states with a string next-part' - Change computeRangeNeedsSep return type to tri-state (needsSep/noSep/drop) - actionGrammar.md: 'Fixed:' → 'Handled via:' in summary table - actionGrammar.md: plain-text three-way table → proper markdown table - completion.md: add inline invariant descriptions (#3, microsoft#7, microsoft#8, microsoft#9, microsoft#13) - grammarStore.ts: add cross-reference to filterSepConflicts - Test: 'wins over optional' → 'is strongest merged mode'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.