来源: #231 分析 sub-id 覆盖时发现
#231 (fixed in PR #233) corrected prune.ts and sync.ts, which compared block.effectiveMessageIds against current-view message ids with exact string membership. The same class of check remains at these sites (verified line numbers on master @ 04bd5ed):
| Site |
Check |
Impact if projection forms diverge |
src/recommend.ts:53 |
block.effectiveMessageIds.includes(message.id) |
isSyntheticOrPruned misses → bad compression recommendations |
src/decompress.ts:21 |
block.effectiveMessageIds.some((id) => messageIds.has(id)) |
block not recognized as covering the view → decompress no-ops |
src/decompress.ts:105 |
b.effectiveMessageIds.includes(message.id) |
block lookup by message fails |
src/compress.ts:155 |
block.effectiveMessageIds.includes(rawId) |
false "dangling ref" reports |
src/compress.ts:1044 |
overlap detection: coverage set built from effectiveMessageIds, membership tested against message ids |
false overlap → legitimate compressions blocked |
src/boundaries.ts:259 |
inherited.has(id) (block owned ids vs another block's inherited content ids) |
inheritance detection breaks if the two blocks recorded different forms (e.g. after a mid-session projection change) |
src/report.ts:75,93 |
coveredIds set from effectiveMessageIds, coveredIds.has(message.id) |
status report only (no behavior) |
Latency: the kernel itself only emits plain base ids (h_<sha256>, _${N} cluster suffix — src/wire/message-id.ts), so all of these are latent today. They bite the moment an adapter projects sub-ids (base#callId, base#r0, …) or the projection form changes between turns — the same trigger as #231.
Suggested fix: reuse the baseIdOf / base-set normalization introduced in PR #233 at each site. Not done in #233 to keep that PR minimal and focused on the leak path (prune + sync, which is what actually resurrected messages).
来源: #231 分析 sub-id 覆盖时发现
#231 (fixed in PR #233) corrected
prune.tsandsync.ts, which comparedblock.effectiveMessageIdsagainst current-view message ids with exact string membership. The same class of check remains at these sites (verified line numbers on master @ 04bd5ed):src/recommend.ts:53block.effectiveMessageIds.includes(message.id)src/decompress.ts:21block.effectiveMessageIds.some((id) => messageIds.has(id))src/decompress.ts:105b.effectiveMessageIds.includes(message.id)src/compress.ts:155block.effectiveMessageIds.includes(rawId)src/compress.ts:1044effectiveMessageIds, membership tested against message idssrc/boundaries.ts:259inherited.has(id)(block owned ids vs another block's inherited content ids)src/report.ts:75,93effectiveMessageIds,coveredIds.has(message.id)Latency: the kernel itself only emits plain
baseids (h_<sha256>,_${N}cluster suffix —src/wire/message-id.ts), so all of these are latent today. They bite the moment an adapter projects sub-ids (base#callId,base#r0, …) or the projection form changes between turns — the same trigger as #231.Suggested fix: reuse the
baseIdOf/ base-set normalization introduced in PR #233 at each site. Not done in #233 to keep that PR minimal and focused on the leak path (prune + sync, which is what actually resurrected messages).