[BUG]: review_ckpt.py passes a run that has .pt files no chain entry covers

Open Beginner friendly
#332 4 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@arshil42 is already working on this.

Since Nov 18, 2026.

  • #335 by @MPoojaSiyag — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
84/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend, testing

Research direction

Start with simple/review_ckpt.py, especially main() and the loop over chain entries, then inspect the checkpoint writing flow described in the issue. Add tests for uncovered .pt files and ckpt.tmp, including the listed base and conversation model cases, and update simple/README.md. Done means uncovered files are reported as findings and the command exits 1.

Written by the indexing model from the issue text.

Description

Bug Description

simple/review_ckpt.py RUN is the review that runs before checkpoints are published. Its docstring says it checks every ckpt-XXXXX.pt in RUN, but main() only reviews the files that chain entries point to:

for entry in chain:
    path = run / f"ckpt-{entry['index']:05d}.pt"
    if not path.exists():
        continue
    ...

Any other .pt file in RUN is skipped without a word, and the review still exits 0. That includes:

  • a checkpoint with no chain entry. train writes ckpt-NNNNN.pt before it appends the entry ("Checkpoint first, then the chain entry, so a crash between them is harmless"), so a crash between the two leaves exactly this file;
  • a leftover ckpt.tmp, from a crash during torch.save;
  • base-model.pt or conversation-model.pt when the chain has no base or final entry.

Those files are pickles that would be published with the run without the content review the script exists for.

Steps to Reproduce

On main, with a run holding an honest ckpt-00000.pt for entry 0 and a copy of it saved as ckpt-00001.pt (no entry 1):

$ python simple/review_ckpt.py RUN; echo exit $?
{"file": "ckpt-00000.pt", ..., "result": "PASS"}
exit 0

ckpt-00001.pt isn't mentioned.

Expected Behavior

Fail closed: every .pt file (and ckpt.tmp) in RUN that no chain entry covers is reported as a finding, and the script exits 1.

Impact

The publication review can pass a run that contains unreviewed checkpoint files.

I'd like to fix this in main(), with tests for each case and a note in simple/README.md. This was found with an AI coding agent (Claude Code, Claude Opus 5.5), and I checked it locally.

Environment Details

main at d9531ad, Windows, Python 3.12, CPU.

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.