Skip to content

fix: JSON checkpoint discovery ignores branch subdirectories#5501

Merged
greysonlalonde merged 3 commits into
mainfrom
fix/json-checkpoint-branch-discovery-5491
Apr 16, 2026
Merged

fix: JSON checkpoint discovery ignores branch subdirectories#5501
greysonlalonde merged 3 commits into
mainfrom
fix/json-checkpoint-branch-discovery-5491

Conversation

@greysonlalonde
Copy link
Copy Markdown
Contributor

@greysonlalonde greysonlalonde commented Apr 16, 2026

Summary

  • Use recursive glob (**/*.json) in _list_json() and _info_json_latest() so JSON checkpoints stored under branch subdirectories (e.g. main/, fork/exp1/) are discovered correctly
  • Maintains backward compatibility with the legacy flat layout

Closes #5491

Test plan

  • Verify _list_json() discovers checkpoints in branch subdirectories
  • Verify _info_json_latest() returns the most recent checkpoint across all branches
  • Verify legacy flat-layout checkpoints are still discovered

Note

Low Risk
Small, localized change to filesystem globbing in the CLI; main risk is slight performance impact or unintended inclusion of extra .json files under the checkpoint directory.

Overview
Checkpoint CLI JSON discovery now searches recursively (via **/*.json) when listing checkpoints and when computing the latest checkpoint, so checkpoints stored under branch/subdirectories are picked up alongside the legacy flat layout.

Reviewed by Cursor Bugbot for commit 0de4ef9. Bugbot is set up for automated code reviews on this repo. Configure here.

Branch-aware checkpoint storage writes under subdirectories (e.g.
main/, fork/exp1/) but _list_json and _info_json_latest used flat
globs that missed them.
Copy link
Copy Markdown
Contributor

@iris-clawd iris-clawd left a comment

Choose a reason for hiding this comment

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

Clean fix — recursive glob for branch subdirectory checkpoint discovery, backward compatible with flat layout. 👍

@greysonlalonde greysonlalonde merged commit 32ec441 into main Apr 16, 2026
57 of 88 checks passed
@greysonlalonde greysonlalonde deleted the fix/json-checkpoint-branch-discovery-5491 branch April 16, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] JSON checkpoint listing/info ignores branch subdirectories

2 participants