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

Abierto
#360 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@ArnabOPP ya está trabajando en esto.

Desde el 19/11/2026.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
63/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python, pytorch
Área
security, testing

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
26
Forks
64
Merge medio
2 d 11 h
PR fusionados (30 d)
71

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de AOSSIE-Org/OpenVerifiableLLM

Todos los issues de AOSSIE-Org/OpenVerifiableLLM

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.