Skip to content

refactor(memory): pendingPeers 更名 pendingEventCount(语义修正,D46) - #26

Merged
Windsander merged 1 commit into
mainfrom
refactor/pending-event-count
Sep 14, 2026
Merged

Windsander merged 1 commit into
mainfrom
refactor/pending-event-count

Conversation

@Windsander

Copy link
Copy Markdown
Owner

背景

MemoryStatus.pendingPeers 实际映射 SyncManager.getSyncStatus().pendingCount,语义是待发事件数(尚未送达对端的事件),并非「待处理对端数」。该误导在 G6.6 本地双节点夹具中暴露:成功同步后仍为 1,被误当「未同步完成」。

变更

  • MemoryStatus.pendingPeerspendingEventCount(含语义注释);MemoryService.status() 局部变量与返回同步。
  • scripts/verify-mcp-cross.mjs(门禁/夹具证据键与日志)、scripts/mcp-cross-lib.mjs(注释)、tests/wan/mcp-cross.test.mjs 同步更名;judgeCrossEvidence 本就不以其为达成判据(仅记录)。
  • tests/memory/MemoryService.test.tspendingEventCount 整型断言。
  • 文档:g6-plan.md §4/§11、project-status.md(D40 修订 + 新增 D46)、G6.6 阻塞报告。

兼容性

0.1.0 未发布,无外部消费方,直接更名、不保留别名。

验证

  • npm run buildnpm run lintnpm run test:coverage51 套件 / 393 用例)、npm run verify 0–6 全绿。
  • G6.6:verify:mcp:cross:selftest 退出码 0(non-evidence,证据键已为 pendingEventCount);verify:mcp:cross 无环境仍退出码 1(红灯门禁不变)。

- 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 未发布,无外部消费方,直接更名不保留别名。
@Windsander
Windsander merged commit 75feb58 into main Sep 14, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant