Repository navigation
Bound all nineteen continuation tapes across recursive call histories - #5404
Merged
Mister-Meeseeks merged 2 commits intoOct 24, 2026
Merged
Conversation
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.
The physical continuation stack in #5356 and output return in #5368, by @aliromman, supply local operation bills. This PR derives the complete retained-backing formula for their nineteen modeled tape arrays across arbitrary successful nested call histories.
The proof accounts for nested payload origins, delimiters, unary control frames, shared descriptors, output delivery, the shared relay, erased interiors and warm entry capacity. It applies coordinatewise history accounting from #5286 by @kumagi to this recursive representation.
Two source executions expose insufficient grants: sixteen calls each retain 142 cells in a fresh bank, while one reused bank retains 1,102; a child returning one bit after writing and erasing a large temporary retains 4,175 cells versus 80 with the same boundary sizes and a tiny interior.
The package supplies an exact capacity vector, a complete sufficient grant and the path-summability condition needed for an O(root volume) reserve. It also proves the unchanged compact routines need at most R(w+b) binary symbols per lexical payload Role, including repair keys. Future caller work can use these contracts to calculate a sufficient grant and reject inadequate space arguments before extending the construction.
Validation
Normal and optimized registered checks pass: 648 small cases, nested and mixed histories, seven rejection/probing controls, and six unchanged compact-source returns with independent complete endpoints and the original 24,388-action return bill. Prospective guards check capacity before every source write. Committed bytes, portable export integrity and an optimized Git-free replay pass.
Scope and credit
Only
research/continuation-retained-backing/is added. The result bounds all nineteen modeled Tape.cells arrays. Production path summability, physical allocation/counter compilation, Python heap storage and complete caller stock/precision remain open. The selected frontier is unchanged; full source-history checking is unavailable in this shallow checkout.Credit @JoyboyBrian's segment boundary, @jmbarrancoml's sequential primitives and the retained guard/repair/caller lineage. Substantial OpenAI Codex assistance in proof, implementation and assisted review; original notices remain intact.