Repository navigation
fix(memory): keep distinct topic pointers during consolidation - #287
Open
Elon-Jiang wants to merge 1 commit into
Open
Elon-Jiang wants to merge 1 commit into
Elon-Jiang wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Description
Memory consolidation can silently remove a valid topic link. For example,
consolidate(["- [API reference](api.md)", "- [API reference](api.md.v2.md)"])currently keeps only the second pointer: the serialized identity of the first
is a prefix of the second and is treated as redundant prose. The real
consolidate_pointer_index()writer can persist that loss toMEMORY.md.A literal
|split between title and target can also make distinct pointersshare one serialized key.
Use a
(title, target)tuple for pointer identity and apply prefix subsumptiononly to prose keys. Existing case normalization, repeated-link/hook merging,
first-seen ordering, and index capacity limits remain unchanged.
Related Issues
Source-discovered regression in the pointer-index feature introduced in #233.
No overlapping open PR was found during the current-main check.
Changes Made
index rewrite that preserves both topic links and their readable contents.
Checklist
memory-layer tests pass; all 74 memory/compaction/autodream tests pass with
the fix.
1 failed. The sole failure,
test_ctrl_c_clears_a_draft_before_it_interrupts, also fails on unchangedupstream
e09d3c1with the same locked dependencies. No test was excluded.pre-commit run --all-files: all hooks pass (Ruff lint/format,whitespace/requirements checks, and actionlint).
and Web build pass.
Additional Notes
AI-assisted contribution. The unrelated TUI baseline failure is reported
above rather than presented as a passing full suite. No runtime dependencies
or provider calls are added.