Skip to content

knowPro/knowledgeProcessor: renames, refactors, and test coverage#2230

Merged
robgruen merged 11 commits intomainfrom
dev/robgruen/TODO/knowPro
Apr 23, 2026
Merged

knowPro/knowledgeProcessor: renames, refactors, and test coverage#2230
robgruen merged 11 commits intomainfrom
dev/robgruen/TODO/knowPro

Conversation

@robgruen
Copy link
Copy Markdown
Collaborator

  • Rename ConversationIndex -> TermToSemanticRefIndex
  • Rename TextIndex.put* -> addUpdate*
  • Split MatchAccumulator.add() into addExact()/addRelated()
  • Move serialization interfaces to dataFormats.ts
  • Combine sequential intersect calls into intersectMultiple in topics search
  • Cache getTimeRange() in TemporalLog
  • Refactor runSearchBatch to use runTestBatch
  • addMultiple concurrency from hardcoded 1 -> settings.concurrency

Split from #2210.

robgruen and others added 9 commits April 22, 2026 13:29
The old name was misleading — this class indexes terms to semantic
references, not conversations. Updated the class definition in
conversationIndex.ts and all 10 consumer files across the knowPro,
memory, and examples packages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tiple/addUpdateSources

The old names were generic database CRUD terms; the new names describe
the merge semantics (add-or-update postings) that distinguish this
interface from a plain key-value store.

Updated the interface definition, all three concrete implementations
(file-system, SQLite, Elasticsearch), and all call sites across
knowledgeProcessor, spelunker, and docuProc.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extracts IConversationData, ITermToSemanticRefIndexData, and
ITermToSemanticRefIndexItem into a new dataFormats.ts file. Re-exports
them from interfaces.ts for backward compatibility with existing callers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces the three-argument add(value, score, isExactMatch) with two
focused methods: addExact(value, score) and addRelated(value, score).
Updates all internal callers in collections.ts, query.ts, and
dataFrame.ts. MessageAccumulator.add() override is also renamed to
addExact() with its distinct score-max-wins semantics preserved.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…earch

Merges the two separate intersect(topicIds, possibleIds) and
intersect(topicIds, topicIdsWithSource) operations in search() into a
single intersectMultiple call, which is semantically equivalent but
cleaner. Also adds unit tests for intersectMultiple in setOperations.spec.ts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Each call was reading all file names from disk just to fetch the first
and last timestamps. Cache the result and invalidate it on put, remove,
removeInRange, and clear.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Eliminates the duplicate batch-processing loop by delegating to the
shared runTestBatch utility, which handles getBatchFileLines, callbacks,
stopOnError, and file writing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- knowPro/collections: matchesWithMinHitCount condition > 0 → > 1 (optimization,
  all matches already have hitCount ≥ 1 by design)
- dispatcher/unknownSwitcher: parallelize assistant-selection partitions via
  Promise.all; extract selectFromPartitions() for testability
- knowledgeProcessor actions/entities: addMultiple concurrency 1 → settings.concurrency
- cache/explainWorkQueue: extend parameter-value-in-request check to cover numbers
- azure-ai-foundry/wikipedia: add optional locale param (default "en") to
  getPageObject and getPageMarkdown

Each fix is covered by new or updated unit tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Agent-Logs-Url: https://github.com/microsoft/TypeAgent/sessions/0038aaee-2179-421f-b77b-01db324881e2

Co-authored-by: robgruen <25374553+robgruen@users.noreply.github.com>
@robgruen robgruen temporarily deployed to development-fork April 22, 2026 23:35 — with GitHub Actions Inactive
@robgruen robgruen temporarily deployed to development-fork April 22, 2026 23:35 — with GitHub Actions Inactive
@robgruen robgruen added this pull request to the merge queue Apr 23, 2026
Merged via the queue into main with commit 9110e2b Apr 23, 2026
21 checks passed
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.

2 participants