Isolate fixtures and resolver cache - #75
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.Resolverthat 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 testwithout-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.
Oleg-Melnik
approved these changes
Jun 25, 2026
Oleg-Melnik
left a comment
Collaborator
There was a problem hiding this comment.
@Vladyslav-Kuksiuk LGTM with Copilot’s comments addressed before merging.
MykytaPimonovTD
approved these changes
Jun 26, 2026
Merged
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:
Resolves this issue.