Skip to content

Record the safeguard that interrupted the execution - #12

Merged
Lawouach merged 1 commit into
masterfrom
record-triggered-safeguard
Sep 27, 2026
Merged

Lawouach merged 1 commit into
masterfrom
record-triggered-safeguard

Conversation

@Lawouach

@Lawouach Lawouach commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • When a safeguard misses its tolerance, the journal now records it under safeguards, with the probe's run (activity, status, output):

    "safeguards": {"triggered_by": "platform-error-rate", "run": {"activity": {...}, "status": "succeeded", "output": 0.04}}

    Until now, which safeguard fired was only visible in the logs. after_experiment_control declares state explicitly 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.Journal exists 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.

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
Lawouach force-pushed the record-triggered-safeguard branch from 8122533 to d4c4571 Compare September 27, 2026 19:02
@Lawouach
Lawouach merged commit cee1a0e into master Sep 27, 2026
7 checks passed
@Lawouach
Lawouach deleted the record-triggered-safeguard branch September 27, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant