[codex] Extract core loop lifecycle hooks#436
Draft
mark14wu wants to merge 3 commits into
Draft
Conversation
a31f9ee to
a61615f
Compare
Member
|
Closing as stale during PR cleanup. |
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.
What changed
This PR extracts the loop-lifecycle and assumption/assertion support out of
race-detector-z3-demointo a separate review unit.Core runtime support:
abandoned_loop_callbackplumbing for loop clients.LoopIter, sobreak, earlyreturn, and exceptions can trigger deterministic loop teardown.DeviceAssertandAssumeop records and registers Triton buildercreate_assert/create_assumehooks.Consumer support moved with it:
DeviceAssert/Assume.tl.assume/tl.device_assertconditions as solver assumptions.tl.assumebehavior are included here rather than remaining in the base branch.Why
The race detector consumer changes depend directly on the new core APIs. Keeping them together avoids leaving
race-detector-z3-demowith dangling imports or callback fields while still making this runtime hook work reviewable independently.Validation
uv run python -c "import triton_viz.clients.symbolic_engine; import triton_viz.clients.race_detector.race_detector"uv run pytest tests/unit/test_race_detector.py -k abandoned_loopuv run pytest tests/end_to_end/test_race_detector.py -k assume