fix(bin): safely unregister custom checks - #89
Merged
Conversation
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.
Custom watcher checks had no dedicated retirement path, which made hand-composed removals easy to aim at the wrong state path. This ports upstream PR kunchenguid#3369 and adds one guarded command that validates the state directory and task id before removing only the named check and trust pair.
What changed
bin/fm-check-unregister.shwith the same single-link and same-device safeguards used by teardown.What I did not change
The watcher, teardown cleanup flow, OMP adapters, OMP spawn and verification, and OMP wake or arm code are unchanged.
For reviewers
Suggested reading order:
bin/fm-check-unregister.sh,tests/fm-check-unregister.test.sh, then the small ownership and test-runner updates.The remote head is the No-Mistakes rebased form of local commit
69f28fb; both commits have patch IDf08f9d0c06593879e50e33318e3f201fa6851ee4. No-Mistakes review, tests, documentation review, and lint completed with zero findings before its known internal push-mirror defect.Validated with:
tests/fm-check-unregister.test.shbin/fm-test-run.sh tests/fm-check-unregister.test.shbin/fm-lint.shbin/fm-doc-audience-check.shtests/fm-omp-harness.test.sh