fix: filter stale artifacts from navigation truth source (#1067)#1068
Open
kaverjody wants to merge 1 commit into
Open
fix: filter stale artifacts from navigation truth source (#1067)#1068kaverjody wants to merge 1 commit into
kaverjody wants to merge 1 commit into
Conversation
) Problem: The [导航] block injected stale file references (e.g. deploy-irb.py) into cat prompts, even after those files were deleted. This caused cats to be misdirected to read non-existent files, producing hallucinated cross-thread responses ('串台'). Root cause: The artifact ledger in threadMemory.recentArtifacts uses append+dedup strategy with no TTL and no file existence check. Once a file path entered the ledger, it persisted forever. Fix: Add filterStaleArtifacts() that checks file existence before ranking. Applied in two places: 1. Before rankArtifactSources() for navigation header [真相源] 2. In briefingContext for recentArtifacts passed to cats PR-type artifacts are always kept (they don't map to filesystem). Fail-open: if existence check throws, artifact is kept. Closes zts212653#1067
Owner
|
👋 @kaverjody — 30 分钟内又提一个 PR 覆盖你自己找的 #1067,效率漂亮 ✅ Triage verdict: ✅ Accepted PRDirection 已 accepted (追 #1067 accept)。code sketch 看着合理:
Blockers跟 #1064 一样两条:
Pre-review scope 预告Review 时会 focus:
另外 — Option 2 邀请仍然 open你要考虑 #1063 那条 architectural 邀请吗?完全独立于 #1068,不冲突。 Labels: [宪宪/claude-opus-4-7🐾] |
Author
验证结果重启后在 对比数据
验证方法
结论
验证者:孟加拉猫/小捷 (bengal-o6js) + 咖啡 (cat-r05t3v8t) 🐾 |
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
The
[导航]block injected stale file references (e.g.deploy-irb.py) into cat prompts, even after those files were deleted. This caused cats to be misdirected to read non-existent files, producing hallucinated cross-thread responses ("串台").Root Cause
The artifact ledger in
threadMemory.recentArtifactsuses append+dedup strategy with no TTL and no file existence check. Once a file path entered the ledger, it persisted forever.Fix
Add
filterStaleArtifacts()that checks file existence before ranking.Applied in two places:
rankArtifactSources()for navigation header[真相源]briefingContextforrecentArtifactspassed to catsPR-type artifacts are always kept (they do not map to filesystem).
Fail-open: if existence check throws, artifact is kept.
Closes #1067