Record the safeguard that interrupted the execution - #12
Merged
Merged
Conversation
This was referenced Sep 27, 2026
The journal now holds the triggering safeguard and its run under `safeguards`. The guardian also resets its triggered state when configured so a previous execution in the same process does not leak into the next. Signed-off-by: Sylvain Hellegouarch <sh@defuze.org>
Lawouach
force-pushed
the
record-triggered-safeguard
branch
from
September 27, 2026 19:02
8122533 to
d4c4571
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.
Summary
When a safeguard misses its tolerance, the journal now records it under
safeguards, with the probe's run (activity, status, output):Until now, which safeguard fired was only visible in the logs.
after_experiment_controldeclaresstateexplicitly since chaoslib only passes it to controls that name that parameter.The guardian resets its triggered state in
prepare(), so a previous execution in the same process cannot leak into the next one.No dependency change:
chaoslib.types.Journalexists in the minimum supported chaostoolkit-lib (1.42.1). Rebased on Require Python 3.12 and refresh the build #13, which moved the project to Python 3.12+.Tests
test_journal_records_the_triggering_safeguard, plus the existing suite: 9 passed.