Repository navigation
Recover from failed cells and add cppjit.undo - #177
Draft
conrade-ctc wants to merge 1 commit into
Draft
conrade-ctc wants to merge 1 commit into
conrade-ctc wants to merge 1 commit into
Conversation
Open
3 of 4 tasks
A failed cppdef or cppexec leaves the interpreter as it was before the call, also when a C++ exception unwinds past CppInterOp. cppjit.undo() withdraws the last successful cppdef or cppexec. It returns to an input-count checkpoint, so the JIT call wrappers that cppjit adds between cells do not count. It also drops the proxies that the undone code made outdated, in every scope. gbl.Cpp.Undo calls CppInterOp from C, so it cannot withdraw its own JIT call wrapper. test_failed_input.py shows each case as notebook cells. A case that needs an upstream LLVM change is an expected failure that names it. Requires CppInterOp with GetInputCount. Co-developed-with-the-help-of: Claude Code (Opus 5.5, human in the loop)
conrade-ctc
force-pushed
the
undo-failed-inputs-upstream
branch
from
November 6, 2026 01:15
df95363 to
2f3bf6a
Compare
This branch has not been deployed
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.
In a notebook, a cell that fails to compile should not force a restart. With
compiler-research/CppInterOp#1174, this PR makes that work for a large class
of cases:
cppdeforcppexecleaves the interpreter as it was, also whenit fails to link or its initializer throws.
cppjit.undo()withdraws the last successfulcppdeforcppexec, anddrops the Python proxies that the undone code made outdated.
gbl.Cpp.Undono longer withdraws its own JIT call wrapper.test/test_failed_input.pyshows each case as notebook cells. Five casesneed an upstream LLVM change. They are expected failures, and each reason
names the upstream PR.
docs/Undo.mddescribes the behavior.This needs CppInterOp with
GetInputCount, so CI fails untilCppInterOp#1174 merges and the pin moves.
🤖 Done with the help of Claude Code (Opus 5.5, human in the loop)