Split processor orchestration from per-file processing#73
Merged
Conversation
MykytaPimonovTD
approved these changes
Jun 24, 2026
There was a problem hiding this comment.
Pull request overview
This PR refactors the embedding package to separate “multi-document discovery/orchestration” from “single-document processing”, aligning with issue #60’s goal of clearer responsibilities without changing runtime behavior.
Changes:
- Moved doc discovery +
EmbedAll/CheckUpToDateorchestration into the newembedding/orchestration.go. - Simplified
embedding/processor.goto focus on per-document processing and removed orchestration helpers / unused APIs. - Removed parser context tracking that only existed to support the removed “find changed embeddings” API.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| embedding/processor.go | Removes multi-doc orchestration and unused APIs; narrows Processor to single-doc embed/check behavior. |
| embedding/parsing/context.go | Simplifies embedding context bookkeeping after removing changed-embeddings inspection. |
| embedding/orchestration.go | New orchestration layer for doc discovery and running embed/check across all matched docs. |
| embedding/embedding_test.go | Removes tests/helpers tied to removed transition-map injection API. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
73
to
75
| // SourceStartIndex - an index of the StartState line in the original markdown file. | ||
| // | ||
| // SourceEndIndex - an index of the end line in the original markdown file. |
Comment on lines
+35
to
+39
| // Processor processes a single documentation file using the provided embedding configuration. | ||
| type Processor struct { | ||
| DocFilePath string | ||
| Config configuration.Configuration | ||
| TransitionsMap parsing.TransitionMap | ||
| docFilePath string | ||
| config configuration.Configuration | ||
| transitionsMap parsing.TransitionMap |
Oleg-Melnik
approved these changes
Jun 24, 2026
Oleg-Melnik
left a comment
Contributor
There was a problem hiding this comment.
@Vladyslav-Kuksiuk LGTM with minor comments from me and Copilot to be addressed.
| return "" | ||
| } | ||
|
|
||
| return fmt.Sprintf(" for `%s` embedding setup", config.Name) |
Contributor
There was a problem hiding this comment.
It looks like the callers of this function should know the returned message contains a leading space.
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.
This PR:
orchestration.goand keepprocessor.gofocused on single-document processing;Resolves this issue.