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

Open
#360 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@ArnabOPP is already working on this.

Since Nov 19, 2026.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
63/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python, pytorch
Domain
security, testing

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Python
Stars
27
Forks
72
Avg merge
2d 19h
Merged PRs (30d)
45

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AOSSIE-Org/OpenVerifiableLLM

All issues in AOSSIE-Org/OpenVerifiableLLM

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.