Repository navigation
feat(enrichment): give deferred/background facts a KG node (Inline parity) - #119
Merged
Merged
Conversation
…rity) The final review flagged that deferred fact-memories lacked the KG memory-node the Inline path adds, so graph-based retrieval over them differed. store_fact_shared now runs the same plan_memory_node_update + apply_memory_node_plan + edge detection (KG is Arc, so reachable from the shared enrichment context), best-effort. Only temporal/analytics remain divergent (owned non-Arc subsystems; observability only). Regression test enrich_one_gives_deferred_fact_a_kg_node. 494 lib tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
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.
Closes the one correctness gap the final whole-branch review of #117 flagged: deferred/background fact-memories were written to storage + state + the scoring corpus but lacked the knowledge-graph memory node that the Inline path (
store_with_report) adds — so graph-based retrieval over deferred facts differed from Inline.Fix
store_fact_sharednow runs the sameplan_memory_node_update→apply_memory_node_plan→ edge-detection sequence the Inline path uses (the KG isArc<RwLock>, so it's reachable from the shared enrichment context), best-effort (a KG failure degrades graph coverage of that fact but never fails the store). Lock discipline: these KG read/write locks are short and run afterapply_resolution_sharedhas released its KG write lock (sequential inenrich_one), so no nesting/deadlock.The only remaining Inline-vs-deferred divergence is temporal tracking + analytics events — owned, non-
Arcsubsystems the shared path can't reach; both are best-effort observability, not retrieval. Spec + doc updated to reflect the closed gap.Tests
Regression
enrich_one_gives_deferred_fact_a_kg_node(assertskg.get_node_for_memory("turn1::fact0")isSome—Nonepre-fix). 494 lib tests pass, clippy--all-targetsclean, fmt clean.🤖 Generated with Claude Code