Skip to content

Isolate fixtures and resolver cache - #75

Merged
Vladyslav-Kuksiuk merged 8 commits into
masterfrom
isolate-test-fixtures
Jun 26, 2026
Merged

Isolate fixtures and resolver cache#75
Vladyslav-Kuksiuk merged 8 commits into
masterfrom
isolate-test-fixtures

Conversation

@Vladyslav-Kuksiuk

Copy link
Copy Markdown
Collaborator

This PR:

  • Makes source resolver cache state explicit per processing operation.
  • Moves embedding tests to per-test temp documentation fixtures.
  • Cleans up related Go doc comments and redundant processor state handling.

Resolves this issue.

Copilot AI 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.

Pull request overview

This PR addresses issue #61 by removing shared mutable state from embedding/fragmentation processing and tests, enabling the Go test suite to run safely with default package parallelism (no CI -p 1).

Changes:

  • Introduces a per-processing-operation fragmentation.Resolver that owns the source-fragment cache, and threads it through embedding/parsing.
  • Updates embedding tests to use per-test temp documentation roots and copies fixtures into them instead of writing into a shared directory.
  • Removes cache reset logic and updates CI to run go test without -p 1.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
fragmentation/resolver.go Replaces the process-global resolver cache with a per-instance Resolver and method-based APIs.
fragmentation/cache.go Removes the cache clear() API now that caches are per operation/instance.
fragmentation/fragmentation_test.go Updates tests to create a resolver per spec and adds coverage for cache isolation between resolvers.
embedding/processor.go Stores a resolver in Processor and passes it into parsing context creation.
embedding/parsing/instruction.go Uses a resolver for content/reference resolution and adds fallback behavior.
embedding/parsing/context.go Adds resolver ownership to parsing Context and injects it into instructions.
embedding/orchestration.go Shares a resolver across processors within a single orchestration run.
embedding/embedding_test.go Uses per-test temp dirs and os.CopyFS to isolate writable doc fixtures.
.github/workflows/check.yml Removes -p 1 from unit and showcase test runs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread fragmentation/resolver.go
Comment thread embedding/parsing/context.go
Comment thread embedding/parsing/instruction.go

@Oleg-Melnik Oleg-Melnik left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@Vladyslav-Kuksiuk LGTM with Copilot’s comments addressed before merging.

@Vladyslav-Kuksiuk
Vladyslav-Kuksiuk merged commit 706ea7c into master Jun 26, 2026
3 checks passed
@Vladyslav-Kuksiuk
Vladyslav-Kuksiuk deleted the isolate-test-fixtures branch June 26, 2026 09: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.

Isolate test fixtures and remove CI -p 1

4 participants