refactor(memory): pendingPeers 更名 pendingEventCount(语义修正,D46) - #26
Merged
Merged
Conversation
- refactor(memory): MemoryStatus.pendingPeers → pendingEventCount,加注释说明其为 SyncManager 的待发事件数 - refactor(memory): MemoryService.status() 局部变量与返回同步更名 - test(memory): MemoryService.status 增 pendingEventCount 整型断言 - test(cross): G6.6 门禁/夹具证据键与日志、mcp-cross.test.mjs 同步更名(判定仍不以其为达成判据) - docs: g6-plan §4;project-status D40/D46;G6.6 阻塞报告 兼容性:0.1.0 未发布,无外部消费方,直接更名不保留别名。
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.
背景
MemoryStatus.pendingPeers实际映射SyncManager.getSyncStatus().pendingCount,语义是待发事件数(尚未送达对端的事件),并非「待处理对端数」。该误导在 G6.6 本地双节点夹具中暴露:成功同步后仍为 1,被误当「未同步完成」。变更
MemoryStatus.pendingPeers→pendingEventCount(含语义注释);MemoryService.status()局部变量与返回同步。scripts/verify-mcp-cross.mjs(门禁/夹具证据键与日志)、scripts/mcp-cross-lib.mjs(注释)、tests/wan/mcp-cross.test.mjs同步更名;judgeCrossEvidence本就不以其为达成判据(仅记录)。tests/memory/MemoryService.test.ts增pendingEventCount整型断言。g6-plan.md§4/§11、project-status.md(D40 修订 + 新增 D46)、G6.6 阻塞报告。兼容性
0.1.0 未发布,无外部消费方,直接更名、不保留别名。
验证
npm run build、npm run lint、npm run test:coverage(51 套件 / 393 用例)、npm run verify0–6 全绿。verify:mcp:cross:selftest退出码 0(non-evidence,证据键已为pendingEventCount);verify:mcp:cross无环境仍退出码 1(红灯门禁不变)。