feat: add deterministic RNG checkpoints - #189
Open
anantgar wants to merge 3 commits into
Open
Conversation
anantgar
marked this pull request as ready for review
August 30, 2026 22:37
Move runner checkpoint helpers into checkpointing.py and hash SQLite tables instead of per-column watermarks so the PR stays smaller without changing resume behavior. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
strict,if_available, andreseedresume modes plus Ctrl-C/programmatic checkpoint requests.Why
A seed recreates the start of a random stream, but the previous resume path did not continue its exact position. Clean checkpoints let long campaigns stop and resume from a verified, drained boundary.
Testing
uv run ruff check tests --exclude tests/file.pyuv run mypy --follow-imports=skip --ignore-missing-imports tests/test_*.py tests/conftest.pyuv run --with pytest-cov pytest -q tests -m "not requires_secrets" --cov=shinka --cov-report=term-missing --cov-report=xml:coverage.xml: 921 passed, 7 skipped, 1 deselecteduv run --group docs mkdocs build --strictCore evolution pipeline evidence
The local deterministic headless fixture ran with seed
20260830, one proposal/evaluation/DB worker, and two dynamically selected models. The baseline ran uninterrupted to 8 programs; the comparison checkpointed at 4 and strictly resumed to 8. The normalized generation trace matched exactly for parent, archive/top-k inspirations, island, model, code, score, and correctness, and the resume audit recordeddeterministic_resume=true.Reproduce with:
uv run pytest -q tests/test_headless_provider.py::test_seeded_checkpoint_resume_matches_uninterrupted_evolutionRisks and compatibility
Docs and UI
Checkpoint configuration, CLI usage, resume modes, and guarantee boundaries are documented. No UI changes.