feat: compare verified delivery bundles - #7
Merged
Conversation
fly1d
commented
Aug 12, 2026
fly1d
left a comment
Owner
Author
There was a problem hiding this comment.
Completed a focused high-risk review for the customer delivery comparison path. No blocking findings remain.
Review found and fixed one identity gap before merge: matching only the pseudonymized cluster name could compare the same-named cluster at a different Management API address. Commit f055043 now requires both the cluster and capture-source pseudonyms to match, with a regression test and explicit documentation that this still is not physical cluster identity proof.
Final review covered:
- both ZIP files are fully verified from their single in-memory reads before comparison
- canonical ZIP, schema, hash, diagnostic reconstruction, and report reconstruction checks remain unchanged
- same-bundle, different redaction mapping, different capture source, and reversed-time inputs fail closed
- output refuses overwrite, publishes with a same-directory hard link, and cleans temporary files on failure
- customer-controlled filenames and raw identifiers do not enter Markdown or JSON output
- comparison artifacts are explicitly treated as pseudonymized customer data
- Markdown and JSON bytes are deterministic across Python 3.9 and 3.12
- existing deliver, verify-delivery, workbench, SQLite, and bundle-format contracts remain compatible
Required CI is green: Unit tests (3.9), Unit tests (3.12), and Smoke test.
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.
Closes #6
变更目的
14 天付费试点已经能生成并校验基线与复测交付包,但顾问端仍需手工导入工作台生成整改结论。本 PR 新增
compare-deliveries,把“两个已验证客户包 -> 可审计整改复测结果”收敛成一条命令,降低每个客户的交付成本。风险等级
验证
make verify:41 项通过make smokegit diff --checkReview 重点
威胁模型与失败路径
os.link不覆盖发布;目标已存在时在输入解析前失败。回滚
Squash revert 本 PR 即可恢复 0.4.0 行为。现有
deliver、verify-delivery、工作台、SQLite 和交付包格式均未迁移或修改。数据与安全