Skip to content

Split processor orchestration from per-file processing#73

Merged
Vladyslav-Kuksiuk merged 7 commits into
masterfrom
split-processor-logic
Jun 24, 2026
Merged

Split processor orchestration from per-file processing#73
Vladyslav-Kuksiuk merged 7 commits into
masterfrom
split-processor-logic

Conversation

@Vladyslav-Kuksiuk

@Vladyslav-Kuksiuk Vladyslav-Kuksiuk commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

This PR:

  • moves document discovery and embed/check orchestration into orchestration.go and keep processor.go focused on single-document processing;
  • remove unused processor APIs and dependent parser state;

Resolves this issue.

@Vladyslav-Kuksiuk Vladyslav-Kuksiuk self-assigned this Jun 23, 2026
@Vladyslav-Kuksiuk Vladyslav-Kuksiuk marked this pull request as draft June 23, 2026 15:44
@Vladyslav-Kuksiuk Vladyslav-Kuksiuk marked this pull request as ready for review June 23, 2026 16:03
Comment thread embedding/orchestration.go
Comment thread embedding/orchestration.go
Comment thread embedding/processor.go Outdated
Comment thread embedding/processor.go Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 / CheckUpToDate orchestration into the new embedding/orchestration.go.
  • Simplified embedding/processor.go to 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 thread embedding/parsing/context.go Outdated
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 thread embedding/orchestration.go
Comment thread embedding/processor.go Outdated
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 Oleg-Melnik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Vladyslav-Kuksiuk LGTM with minor comments from me and Copilot to be addressed.

Comment thread embedding/processor.go
return ""
}

return fmt.Sprintf(" for `%s` embedding setup", config.Name)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the callers of this function should know the returned message contains a leading space.

@Vladyslav-Kuksiuk Vladyslav-Kuksiuk merged commit f0188b1 into master Jun 24, 2026
3 checks passed
@Vladyslav-Kuksiuk Vladyslav-Kuksiuk deleted the split-processor-logic branch June 24, 2026 11:08
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.

Split processor orchestration from per-file processing

4 participants