fix(shrink): a path spelled more precisely is not a path dropped - #28
Merged
Merged
Conversation
The guard compared identifier sets directly, so writing `memory/index.mjs` out and `E:/Project/ws/memory/index.mjs` in read as a loss: old (set difference) dropped: ["memory/index.mjs", "scripts/run.sh"] new (suffix aware) dropped: [] Three real merges in one night of memory curation each warned, and each warning was wrong for this reason. Consolidating entries almost always expands relative references into absolute ones — so the edit a maintainer performs most often is precisely the one that fired the most bogus warnings, on a guard whose entire value is being read rather than dismissed. isStillCarried() treats a token as present when the new text names it or names something it is the tail of. The boundary is a path separator, so `send.mjs` is still reported when only `feishu-send.mjs` remains — different file, real loss. Verified the URL-actually-gone case still warns. Exported and imported into memory-health's (a3) audit rather than reimplemented there. Those two had already drifted apart once, and the nightly queue is only worth reading if it agrees with the gate that let the write through. 296 passed / 0 failed. Co-authored-by: 千夏 <qianxia@clawgamers.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
The bug
The guard compared identifier sets directly, so writing
memory/index.mjsout andE:/Project/ws/memory/index.mjsin read as a loss.Why it matters more than it looks
Three real merges in one night of memory curation each triggered this warning, and each warning was wrong for the same reason.
Consolidating entries almost always expands relative references into absolute ones. So the edit a maintainer performs most often is precisely the one that fired the most bogus warnings — on a guard whose entire value is being read rather than dismissed. That is how a detector gets trained into noise.
The fix
isStillCarried()— a token counts as present when the new text names it, or names something it is the tail of.The boundary is a path separator, so this stays strict where it should:
memory/index.mjsE:/Project/ws/memory/index.mjssession-summarize.mjsE:/…/scripts/session-summarize.mjssend.mjsE:/…/feishu-send.mjsindex.mjsreindex.mjsVerified the genuinely-lossy case is unaffected: drop the URL and it still reports
https://ops.example.com/dash.Shared, not duplicated
Exported and imported into memory-health's
(a3)audit rather than reimplemented there. Those two had already drifted apart once, and the nightly queue is only worth reading if it agrees with the gate that let the write through in the first place.296 passed / 0 failed.
🤖 Generated with Claude Code