Repository navigation
Drop transitions: the watchdog's state machine no longer fired - #197
Merged
Merged
Conversation
Since 0.5.0 supervisor.py drives the watchdog, and none of WatchdogFSM's transitions were reachable: production only used its netlink and inotify subscriptions, through initialize() and shutdown(). Those are now a plain class, EventSubscriptions in ttp/watchdog/subscriptions.py, with the same setup order (bind, then join NFNLGRP_NFTABLES, #81) and the same containment when setup fails: killswitch, then raise. With the machine gone, `transitions` goes from pyproject, the locks and the oldest-supported pins, and every package format loses it: the .deb's python3-transitions, the .rpm's and the PKGBUILD's bundled wheel and their python3-six/python-six. The preflight that refused --watchdog without it goes too. The SBOM no longer describes a bundle and refuses an .rpm that declares one. A packaging test now fails if a package depends on a Python module ttp does not require. ADR 0010 is marked superseded by ADR 0013. Fixes #193. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: onyks-os <129986281+onyks-os@users.noreply.github.com>
rpmbuild failed with "Directory not found" once the bundle was gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: onyks-os <129986281+onyks-os@users.noreply.github.com>
…transitions Signed-off-by: onyks-os <129986281+onyks-os@users.noreply.github.com>
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.
Fixes #193.
Since 0.5.0,
supervisor.pydrives the watchdog. None ofWatchdogFSM's transitions could be reached: production called onlyinitialize()andshutdown(), to open and close the netlink and inotify subscriptions. The package nevertheless requiredtransitions, and the.rpmand PKGBUILD shipped a bundled copy of it.Changes
Code
ttp/watchdog/fsm.pybecomesttp/watchdog/subscriptions.py, a plain classEventSubscriptionswithopen()andclose(). What it does is unchanged:NFNLGRP_NFTABLES, the The watchdog never receives nftables events: its netlink subscription is undone by bind() #81 order;supervisor.pynow usesEventSubscriptionsand logs the heartbeat itself.--watchdogpreflight (require_watchdog_dependency,INSTALL_HINT,VENDOR_DIR,load_machine) is removed. It refused to start whentransitionswas missing.pyproject.tomlloses the mypyattr-definedoverride, which existed only forMachine's dynamic triggers. mypy is clean without it.Dependencies and packaging
transitionsis removed frompyproject.toml, fromoldest-supported.pinsandoldest.in, and from the locks. The locks were regenerated withuv pip compilewithout--upgrade, so the only diff is the removed lines.sixwas a runtime dependency only becausetransitionsneeded it, so it goes too. It stays in CI throughrfc3339-validator..deb: no morepython3-transitions..rpmand PKGBUILD: no bundled wheel, no/usr/lib/transparent-tor-proxy/vendor, nosix, no__requires_exclude.bundled-transitions.envis deleted.make_sbom.py: the bundled-component logic is gone. If an.rpmdeclaresbundled(...), the script refuses it rather than describing the package without it.smoke_test.shchecks that the watchdog imports.Tests
test_fsm.pybecomestest_watchdog_subscriptions.py. The six tests of dead transitions are removed; the tests for setup, failure containment,readd_watch,flush_event_buffersand cleanup stay.test_watchdog_dependency.pybecomestest_teardown_without_watchdog.py. It keeps only the two tests that hold whatever stops the import:stopandstop --restore-onlystill tear down.python-sixto the PKGBUILD makes it fail.ttp.cli,ttp.watchdog, the supervisor andEventSubscriptionsall import withtransitionsandsixblocked.Documentation
architecture.md,verification.md, the watchdog explanation, the API reference and the dependencies reference. The dependencies reference now says the AUR package no longer needspython-transitions.🤖 Generated with Claude Code