Repository navigation
Conversation
This uses the same shared-package defense from the pg pull request openwebwork/pg#1565. The `snapshot_hooks` method can be called to record the hooks in the shared packages once the compartment is fully set up but before the user provided code runs, and `_clean_stash` then uses that to restore any shared hook the user supplied code overwrites in place and strip all hooks the user provided code adds (so a hook in a new `Mojo::Exception::Evil` package is stripped, but `Mojo::Exception`'s overloads are left alone). `snapshot_hooks` is called from the `AchievementNotification` task, which is the only consumer that shares whole package stashes into a compartment. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
drgrice1
force-pushed
the
safe-better-clean-stash
branch
from
October 23, 2026 10:43
415086c to
702e0b5
Compare
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.
This uses the same shared-package defense from the pg pull request openwebwork/pg#1565.
The
snapshot_hooksmethod can be called to record the hooks in the shared packages once the compartment is fully set up but before the user provided code runs, and_clean_stashthen uses that to restore any shared hook the user supplied code overwrites in place and strip all hooks the user provided code adds (so a hook in a newMojo::Exception::Evilpackage is stripped, butMojo::Exception's overloads are left alone).snapshot_hooksis called from theAchievementNotificationtask, which is the only consumer that shares whole package stashes into a compartment.