Repository navigation
perf(graph): stage source graph concurrently with embedding - #665
Merged
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Problem
Large repository ingestion built the graph after vector publication, leaving graph work on the ingestion completion path. The last measured Labby run spent 108.817 seconds in graphing and took 404.986 seconds overall.
Resolution
Build a private generation graph alongside embedding and activate graph changes in the same SQLite transaction as ledger publication. Keep uncommitted graph data invisible and dispose private stage files through the existing durable cleanup worker.
Approach
Reviewer considerations
The graph-wide revision deliberately selects conservative replay after any concurrent graph mutation. This preserves concurrent shared claims but may reduce speedup when unrelated cleanup occurs. Publication ownership survives caller cancellation and scheduler renewal abandonment; cleanup waits for settlement and preserves unknown or committed vector generations. Journals receive canonical redaction before disk persistence.
Verification
Risk
Adds graph migration 6 and private staging storage beside the unified database. Physical disposal is asynchronous and retains durable retry records. The coarse revision fallback can replay a complete candidate journal under the publication writer; live measurements will distinguish that path.