Repository navigation
Conversation
bburda
force-pushed
the
feat/rosbag-retention-4a
branch
from
December 1, 2026 15:43
a18f9f5 to
38dfb2c
Compare
mfaferek93
reviewed
Dec 2, 2026
| capture_on_confirm(report.fault_code); | ||
| } | ||
| if (just_healed) { | ||
| hooks_.on_healed(report.fault_code); |
Collaborator
There was a problem hiding this comment.
With on_healed: delete and the default recapture_cooldown_sec: 60, a fault that heals and confirms again within 60 s loses its recording on the heal, and then capture_on_confirm() skips the new episode because last_capture_times_ still holds the code. The fault ends up CONFIRMED with no recording at all, and a fault that keeps flapping faster than the cooldown never gets one. clear_fault erases the cooldown entry for this reason. The heal path needs the same erase, at least when the heal deletes (the hook could return whether it did).
bburda
force-pushed
the
feat/rosbag-retention-4a
branch
from
December 2, 2026 12:15
38dfb2c to
2a169e1
Compare
* feat(fault_manager): on_healed and on_cleared per rosbag retention rule * fix(fault_manager): the rosbag store drops the row of a fault healed with delete * fix(fault_manager): one rosbag decision per status change * docs(fault_manager): fail-closed audit and unreadable faults in the rosbag status actions * docs(fault_manager): a status action removes the fault's links, not a shared recording
bburda
force-pushed
the
feat/rosbag-retention-4a
branch
from
December 2, 2026 18:24
2a169e1 to
8dd1ca8
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.
Pull Request
Summary
Today a fault's recordings are deleted on a clear only through
auto_cleanupwithmax_bags_per_fault: 1, and nothing happens when a fault heals. Issue 705 asks for a per-rule action on both status changes. This PR adds the rule fieldson_healedandon_cleared(keepordelete).This PR is on top of seven PRs in the stack. Please review those first. The diff of this PR is against the branch of the PR directly below it.
What it adds:
on_healed(defaultkeep). Withdelete, a fault that becomes HEALED loses its recordings. This applies to any transition into HEALED, including from PREFAILED.on_cleared. An explicit value wins overauto_cleanupand the cap. Without it, the clear keeps today's default: delete whenauto_cleanupis true and the fault'smax_bagsis 1.on_cleared: deleteremoves their recordings. A restart with healing turned off deletes nothing that no rule asked for.docs/config/fault-manager.rst,docs/tutorials/snapshots.rst,config/snapshots.yaml, the example retention file, the fault manager README and design doc.What changes for users
on_healedandon_cleared. An invalid value is reported asROSBAG_RETENTION_CONFIG_INVALID.audit_log.fail_closed: true, a failed audit append stops the status actions that follow it. The stored recordings stay until a space limit or a later status change removes them.(fault healed), with an INFO "Heal cleanup" line.Issue
Type
Testing
colcon build --packages-up-to ros2_medkit_fault_manager --cmake-args -DPOSTGRES_SUPPORT=ON, thencolcon test --packages-select ros2_medkit_fault_manager(withROS2_MEDKIT_TEST_PG_CONNfor the PostgreSQL cases) andcolcon test-result --verbose.The real-process test is
src/ros2_medkit_fault_manager/test/integration/test_rosbag_status_actions.test.py. It covers:test_rosbag_quota_pg.test.pyhas the PostgreSQL case.I ran this on Jazzy with PostgreSQL 14. Humble and Lyrical run in CI. clang-tidy on the changed files reports nothing new.
Checklist