[BUG]: verify never checks release_hashes_sha256, so the released files are not tied to the timestamped anchor

オープン
#360 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@ArnabOPP がすでに取り組んでいます。

2026年11月19日 から。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
63/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python, pytorch
領域
security, testing

調査の方向性

Start with cmd_verify in simple/ovl.py, then read the verification steps in docs/verify.md and the relevant CONTRIBUTING test guidance. Check how the anchor’s release_hashes_sha256 relates to release-hashes.txt, including the missing-field case and the exclusion fork question. Done when tests show honest inputs pass and tampered hashes or a missing field fail closed.

索引モデルが issue の本文から書いたものです。

説明

Summary

anchor.json commits to release_hashes_sha256, the SHA-256 of release-hashes.txt, but ovl.py verify never reads it. cmd_verify (simple/ovl.py) only requires chain_entries and chain_head_sha256 from the anchor. So the documented consistency check does not show that the downloaded files are the ones the timestamped anchor lists, which is what the README and docs/verify.md say it shows ("the released files match the timestamped record").

How I checked
  • anchor.json of the released run (release/simple-run/) has these keys: chain_entries, chain_head_index, chain_head_sha256, chain_jsonl_sha256, commit, dataset, final_model, final_state, path, release_hashes_sha256, schema.
  • grep release_hashes_sha256 simple/*.py finds nothing in the v1.1.0 tag or on main (commit 1c63518).
  • sha256sum -c --ignore-missing release-hashes.txt only checks files against the list it is given, so it trusts that list.
Reproduce
  1. Download release/simple-run/ as in the README (without ckpt-*.pt).
  2. Append a space to recipe.json.
  3. Replace the recipe.json line in release-hashes.txt with the new hash.
  4. Run the README's two steps:
    • sha256sum -c --ignore-missing release-hashes.txt prints recipe.json: OK.
    • python ovl-code/simple/ovl.py verify --run . --weights conversation-model.pt still passes, because it never looks at recipe.json or at release-hashes.txt.

I ran this on the real release files, on Windows with the v1.1.0 ovl.py and --no-timestamps. The timestamps cover only the bytes of anchor.json, so editing the anchor to match would break them, but nothing connects release-hashes.txt to the anchor.

Expected

verify fails closed when the files it is given are not the ones the anchor lists.

Suggested change (for discussion)
  • verify compares the SHA-256 of release-hashes.txt with release_hashes_sha256 in the anchor, and exits with an error if they differ or the field is missing.
  • Optionally, verify also hashes the files in the run folder that release-hashes.txt lists (those present, like --ignore-missing) and fails on a mismatch, so one command replaces sha256sum -c.
  • Tests, as in CONTRIBUTING: honest input passes, and tampered input fails (a changed recipe.json with a matching release-hashes.txt, a changed release-hashes.txt, an anchor without the field).
  • No change to the bits: this reads existing fields and files only.

Open questions: should an older anchor without the field fail or warn (the contributing rules say fail closed), and does the exclusion fork's anchor have the same field?

Workaround in the docs

PR #358 adds a one-line check to the documented steps (python -c that asserts the hash of release-hashes.txt equals release_hashes_sha256). It works in bash, PowerShell and CMD. This issue is about making verify do it itself.

AI use

I used Claude Code to investigate and draft this issue and to run the commands above.

主要言語
Python
スター
26
フォーク
64
平均マージ
2日 11時間
マージ済み PR(30日)
71

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

AOSSIE-Org/OpenVerifiableLLM のほかの issue

AOSSIE-Org/OpenVerifiableLLM の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。