Repository navigation
Conversation
背景:历史查单在只读轮次不能生成新记录;仅看最终答案或缓存后的行数,可能漏掉模型尝试的未授权写入。 解决手段:用实际 MCP stdio 复放同一批固定调用至同稿两份隔离 SQLite,一臂限制工具转发,另一臂放行,输出实际回执、动作分类和始末状态。 收益:真实混合轨迹主机限制为 0 条新增、放行为 1 条;重试同页时两次写能力调用只产生 1 条,分别验证调用和终态才能识别差异。
Reviewer's GuideTests新增固定动作回放脚本,以隔离的数据库副本对比只读门控臂与放行对照臂,并核对工具目录、转发结果及 SQLite 状态。
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Owner
Author
复跑证据与一个易漏的反例在
运行 |
SXP-Simon
added a commit
that referenced
this pull request
Nov 25, 2026
## 评审收口 把 [#30](#30) 的只读转发回归和本草稿的同版字形回归放在一个测试候选中。保留两个独立运行入口和各自的断言,仅让现有 `mcp_client.py` 共用临时 home、SDK stdio 启停及 SQLite 备份。相对两条原草稿简单叠加净减 12 行;没有新共用文件或生产代码改动。#30 仍开放留证,审查时不要把其重复测试再次合并进来。 ## 真 MCP 验证 - 只读轨迹:受限臂转发 2/3 个动作、拦下会建单的预览,SQLite 逻辑数据不变;开放对照转发 3/3、实存 1 条检查单且与回执匹配。 - 同版布局:9/9。五例宿主未发包,一例实发后 Rust 以旧版拒绝,三例实际写入;核对着色和原位移。即使确实观察到当前布局,也仍有故意选错字后改到「明」的反例,不能把同版 ID 当用户意图或像素保护。 - 独立云用精确组合分别跑两原案及两候选,四个命令正常退出。根用同 Git 树重构,两个针对性 SDK 命令及以已核对 e1e2546 基线二进制执行的完整 stdio smoke 通过。这是 Linux 合成稿的固定动作,不是模型错选率;不改服务器、默认客户端权限或 CI。 ## 复跑 ```sh cargo build --locked --release -p panache-mcp # 环境须提供项目已有字体和 Markdown worker python3 crates/panache-mcp/tests/trajectory_check.py target/release/panache-mcp \ read_section preview_handwriting read_section python3 crates/panache-mcp/tests/layout_witness_check.py target/release/panache-mcp ``` 仅草稿,无标签、无 CI、未合并。以下为先前字形范围的自动摘要,保留原文。 ## Summary by Sourcery Add local MCP integration evidence for replaying glyph edits and review actions against isolated draft copies while validating layout provenance and database outcomes. Enhancements: - Add test-only MCP replay harnesses that verify layout witnesses are bound to the observed draft revision, section, page, and glyph subset before edits are forwarded. - Add isolated SQLite cloning and inspection helpers for deterministic comparison of server state across replay scenarios. Tests: - Add local integration coverage for stale, partial, mismatched, combined, and unguarded glyph-layout evidence, including revision-conflict behavior. - Add trajectory replay coverage for host-blocked versus forwarded review actions and preservation of non-review database state.
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.
目的
把 #21/#24 提出的「只读轮次必须限制实际转发」变成一个可复跑的本地证据入口。不能只看回答或 SQLite 计数:同一页的多次复查可能去重,工具错误也可能看起来像成功拦截;两者应该分开验。
仅增加
crates/panache-mcp/tests/trajectory_check.py。不改服务、默认权限、业务文件、文案或任何 CI 配置。这是固定动作回放,不是测真实模型误选概率。真实模型另由独立对照记录。实测
固定合成稿和相同动作预算,绝不使用用户文档。从同一份 SQLite 备份复制两个临时 MCP home,使用实际 Rust MCP 二进制、校验过的 Markdown worker 和 Python MCP SDK 1.29.0。
阅读、转发、失败和实际 SQLite 状态分别记录;检查回执中的 ID 与实存行一致。记录完整工具目录及哈希,已知进程随机的 schema seed default 另记原值,不掩盖其他属性变化。独立损坏字体反例记录为工具执行错误,而非“主机阻挡”,无新记录,验证按预期退出 1。
复跑
验收的是两臂的预期区别;开集臂故意允许写复盘,是实验对照,不是部署建议。只检查始末 SQLite,不能推断轮中写后撤销。草稿,不加标签,不触发 Actions。
Summary by Sourcery
Provide a reproducible local regression harness for verifying read-only tool forwarding and persisted review outcomes.
New Features:
Enhancements:
Documentation:
Tests: