Repository navigation
v1.2.0 — per-commit evidence: why the audit attributed it that way (+ reproducible bundle)
v1.2 = 证据:审计给出的每个结论,从此可以追问「为什么」——单 commit 级证据(ghostauthor evidence)+ 可复现证据包(--bundle)。
审计回答「谁」,evidence 回答「哪条规则让它这么判」。两者共用同一个归因代码(
engine.attribute_commit),结构上不可能对同一个 commit 说不同的话。
What's new
ghostauthor evidence—— 单 commit 级证据:ghostauthor evidence /path/to/repo <sha> # 每条 trailer 被哪条 roster 规则命中、为何这样归因 ghostauthor evidence /path/to/repo <sha1> <sha2> # 多 sha,保持输入序 ghostauthor evidence /path/to/repo # 默认:HEAD scope 全扫 ghostauthor evidence /path/to/repo --format json # 字节稳定(sort_keys + trailing newline)
- 每条 trailer 展示命中的确切 roster 选择器:
name pattern '^Claude\b'或email domain 'anthropic.com'(roster.match_detail——带理由的 match 投影,行为零变化,差分测试钉死) - 归因结论(agent/cosigned/unsigned)与审计走同一个函数
engine.attribute_commit(从build_report抽出)——审计与 evidence 对同一 commit 不可能不一致 - scope flags 与审计相同(
--all/--ref/--base/--since/--until,窗口语义相同);gitparse.get_commit单 commit 提取(与扫描同一 framing——不可能看到同一 commit 的两个版本);未知 sha =sha-unknownexit 2
- 每条 trailer 展示命中的确切 roster 选择器:
--bundle DIR—— 可复现证据包(给审计者 / 外部合规):report.json—— 恰为本次选择、走冻结渲染管线(与审计输出一致)evidence.json—— 证据 JSON(v1.2 provisional,v1.3 冻结)roster/—— 实际使用的 roster 文件快照manifest.txt—— repo 路径(用户原样)、scope、窗口、commit sha 列表、每个文件 sha256;无时间戳——同状态 + 同路径 = 字节一致(canonical UTF-8/LF)- DIR 已存在 =
bundle-existsexit 2——证据从不被覆盖
- verify 第 21 步:逐 commit 归因与审计桶对账 / 字节稳定 /
sha-unknown/ bundle 可复现(b1==b2)/ report.json==审计字节 / manifest 哈希自洽 / 拒绝覆盖
Compatibility
纯加法式:审计 CLI 契约零改动;JSON 契约不变(仍 schema_version "1",golden snapshot 字节稳定);evidence JSON 形状 v1.2 先 provisional(1.2.x 内不加法式、v1.3 冻结);roster.match 行为不变(委托给新的 match_detail)。
Verification
169 测试 / verify 21 步全绿。
pip install git+https://github.com/xiangsir4088/ghostauthor.git@v1.2.0