test(cross): G6.6 本地双节点夹具(non-evidence)验证完整链路与判定逻辑 - #25
Merged
Merged
Conversation
- feat(scripts): verify-mcp-cross.mjs --selftest:起两个独立 serve(独立存储、环回 libp2p、共享主密钥), 走与真实门禁同一条链(A memory_write → B memory_sync → B memory_query → 双端 memory_status → 出口判据) - feat(scripts): 抽出 runChain 供真实/夹具共用;judgeSelftest 断言链路四项达标且门禁因环回正确判不达成 - fix(scripts): 移除 pendingPeers 达成判据——其映射 SyncManager pendingCount,实为待发事件数,成功同步后不保证为 0(夹具实测暴露) - test(cross): tests/wan/mcp-cross.test.mjs 增 judgeSelftest 用例(16 例) - chore: package.json 增 verify:mcp:cross:selftest(non-evidence,不入 CI) G6.6 仍阻塞未勾选;夹具证据标注 non-evidence,绝不冒充跨网达成。
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.
目的
让
verify:mcp:cross在无真实公网时也能走完整链路、验证判定逻辑——新增本地双节点夹具,仅标记为非证据,绝不冒充 G6.6 达成。G6.6 仍阻塞未勾选。变更
scripts/verify-mcp-cross.mjs:--selftest(npm run verify:mcp:cross:selftest):起两个独立进程/独立存储的mebular serve(环回 libp2p、共享同一用户主密钥),走与真实门禁同一条链(Amemory_write→ Bmemory_sync→ Bmemory_query→ 双端memory_status→ 出口判据)。runChain供真实/夹具共用;夹具断言链路四项达标,且门禁因differentPublicNetwork !== true(环回)而正确地判不达成。evidenceLevel: "non-evidence (loopback dual-node fixture…)"。scripts/mcp-cross-lib.mjs:新增judgeSelftest。tests/wan/mcp-cross.test.mjs:增judgeSelftest用例(16 例)。package.json:verify:mcp:cross:selftest(不入 CI)。夹具顺带纠正
MemoryStatus.pendingPeers实为SyncManager.pendingCount(待发事件数,命名历史遗留),成功同步后不保证为 0。夹具首次运行即暴露该错误断言,已从达成判据移除(仅记录),并同步修订g6-plan.md/goal-v0.1.md/project-status.md/ 阻塞报告。验证
npm run verify:mcp:cross:selftest退出码 0(markerFound/stateMatches/identityShared=true;differentPublicNetwork=null环回;门禁gatePassed=false正确)。npm run verify:mcp:cross无环境退出码 1 并打印所需 env。lint、build、npm run verify0–6 全绿。