Skip to content

Construct optimal reversible scratch schedules with replay certificates - #5780

Merged
Mister-Meeseeks merged 2 commits into
CrocSwap:mainfrom
aliromman:codex/next-ten-02
Oct 27, 2026
Merged

Mister-Meeseeks merged 2 commits into
CrocSwap:mainfrom
aliromman:codex/next-ten-02

Conversation

@aliromman

@aliromman aliromman commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Fixed-lifetime allocators cannot choose recomputation or cleanup order. Add an exact reversible-pebble planner for small pure dependency DAGs, with different compute and erase costs and weighted scratch limits. The final state must contain exactly the requested outputs.

A separate checker verifies state closure and every edge-potential inequality, then replays the schedule literally to attain the lower bound. An unreachable goal has a finite closed-state certificate. The CLI binds the exact problem bytes and can check a saved certificate without shortest-path search.

Six tests pass normally and under -O on CPython3.12.14: all64 four-node DAGs at four budgets against independent set-state relaxation, the full16-node/65536-state limit, a weighted recomputation example, complete cleanup, impossible space limits, forged potentials/closure/costs and portable source-hash replay.

This is classical reversible pebbling and shortest-path certification. Limits:16 nodes; positive integer costs and widths at most10^12. Pure-node semantics, external input storage and legal compute/erase primitives are premises; native maps, dirty helpers, precision and complete charges remain separate. No kappa or frontier change. Fresh main/priorities/overlap checked at start and submission; canonical claim #5776. All 6 new tests pass in the hosted plan at this head. The plan fails on the unchanged assignment module (8 failures and 2 errors); replay is skipped. The existing fix is PR #5761. Independent review remains pending.

Base: de5ec2e7a6074068452f45b1a191b5c72832df4a. Verified head: 0ed431c52085852999a5817e80b508c1b3c63f75.

Prepared for Ali Romman with substantial OpenAI Codex assistance. Retained tool and mathematical predecessor credits apply. No selected-frontier change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants