Skip to content

fix: verify frozen sources at registered commits - #102

Merged
lipluscodex merged 2 commits into
mainfrom
issue-101-historical-freeze-verification
Aug 21, 2026
Merged

fix: verify frozen sources at registered commits#102
lipluscodex merged 2 commits into
mainfrom
issue-101-historical-freeze-verification

Conversation

@lipluscodex

Copy link
Copy Markdown
Member

Closes #101
manifest 登録 commit または明示 source commit の exact blob bytes で frozen source hash を検証し、current working tree の後続 evolution を分離します。
未知 commit、非 ancestor、欠落 path、manifest / blob tamper を fail closed にし、既存の LF / CRLF portability contract と frozen evidence を維持します。

frozen artifact の hash 検証を current working tree から manifest 登録 commit または明示 source commit の exact blob bytes へ移しました。commit 存在、HEAD ancestor、manifest、path、hash を fail closed に検証し、既存の LF/CRLF portability は対象 protocol に限って維持します。

historical match、後続 repository evolution、manifest/registered blob tamper、未知 commit、欠落 path、非 ancestor commit の回帰を追加し、requirements、評価文書、Decision Structure の source-of-truth 境界を更新しました。Core と optional MCP を含む 231 tests および eval smoke が通過しています。
@lipluscodex lipluscodex linked an issue Aug 21, 2026 that may be closed by this pull request
@lipluscodex lipluscodex self-assigned this Aug 21, 2026
@lipluscodex

Copy link
Copy Markdown
Member Author

親レビューで、凍結境界に関する blocking finding が2点あります。

  1. registered_manifest_commit()git log -1 で manifest を最後に変更した commit を信頼点にしています。この形だと、frozen manifest と登録 hash を同じ commit で書き換えれば、その改変 commit が新しい信頼点になり、current == registered も historical hash verification も通ります。Issue fix: decouple frozen verification from current tree #101 の「frozen manifest を変更しない」「manifest 改変の negative probe は失敗する」を満たすには、manifest の初回登録 commit など、後続 commit から動かない境界へ固定し、committed manifest rewrite も fail closed にしてください。現在対象の manifest は履歴上いずれも追加 commit が1件だけなので、初回追加 blob を信頼点にする互換性は確認できます。committed rewrite の regression も追加してください。

  2. _verify_commit_boundary() は空白のない任意の Git revision expression(branch/tag/HEAD~1 等)を受け入れます。manifest が明示する source_commit は immutable object ID である必要があり、可変 ref を受けると HEAD の移動で historical boundary が変わります。既存 fixture は full 40-hex SHA なので、lowercase 40-hex commit ID に限定し、ref/revision expression を拒否する regression を追加してください。

上記以外では、共通 helper への移行、historical bytes の実利用、current-tree evolution の許容、CI の full-history checkout を確認できています。

親レビュー finding 1 は accept しました。manifest の最新変更 commit は committed rewrite で動くため、信頼境界を path の初回追加 commit に固定しました。manifest と hash を同じ後続 commit で書き換える regression も fail closed にしています。

親レビュー finding 2 は accept しました。branch、tag、短縮 SHA、revision expression は mutable または曖昧なため、明示 source commit を lowercase full 40-hex object ID に限定し、拒否 regression を追加しました。

frozen manifest、fixture、packet、snapshot、observed result、登録 hash、metric、gate、解釈は変更していません。Core と optional MCP を含む 234 tests と eval smoke が通過しています。

@lipluscodex lipluscodex left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

親セルフレビュー: PASS

  • Issue #101 の完了条件を再確認し、historical source verification が current working tree ではなく固定された登録 commit の exact blob bytes を使うことを確認しました。
  • manifest の信頼境界は path の初回追加 commit に固定され、working-tree tamper と committed rewrite の双方が fail closed です。
  • 明示 source commit は lowercase full 40-hex object ID のみに制限され、未知 commit、非ancestor、欠落 path、hash mismatch、mutable ref/revision expression を拒否します。
  • historical bytes は各 evaluator の入力として実利用され、同系統の frozen verifier が共通境界へ移行されています。
  • frozen manifest / fixture / packet / snapshot / observed result / 登録hash / metric / gate / 解釈の変更はありません。
  • git diff --check、core 234 tests、eval smoke、GitHub CI、Optional MCP adapter はすべて pass です。
  • 要求範囲からの逸脱および残存 blocking finding はありません。

次の処理: squash merge。

@lipluscodex
lipluscodex merged commit d2f5a33 into main Aug 21, 2026
2 checks passed
@lipluscodex
lipluscodex deleted the issue-101-historical-freeze-verification branch August 21, 2026 00:23
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.

fix: decouple frozen verification from current tree

1 participant