refactor: clean up headless convergence args and config - #364
Merged
Conversation
Replace long argument lists in convergence functions with ConvergeContext struct, eliminating 6 clippy::too_many_arguments suppressions. Fix ensure_fika_headless to write to mod_overlay() instead of headless_base, keeping the base install directory unmodified and making Fika.Headless visible through the standard overlay layering. Exit watchers now read restart_policy, max_restart_attempts, and restart_backoff_cap from config on each loop iteration instead of caching them at spawn time. Config changes (e.g. switching restart policy or adjusting backoff) take effect immediately without needing to restart the supervisor. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.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.
Summary
converge(),ensure_clients(),remove_excess_clients(), andcreate_client_container()with aConvergeContextstruct, eliminating 3clippy::too_many_argumentssuppressionsspawn_exit_watcher()andexit_watcher_loop()with anExitWatcherCtxstruct, eliminating 3 more suppressions (including a duplicate#[allow])ensure_fika_headlessto write tomod_overlay()instead ofheadless_base, keeping the base headless install unmodifiedrestart_policy,max_restart_attempts, andrestart_backoff_capfrom config dynamically instead of caching at spawn time -- config changes take effect without supervisor restart_spt_versionparameter fromconverge()public APITest plan
cargo checkpassescargo clippy -- -D warningspasses (notoo_many_argumentssuppressions remain insrc/client/)cargo test-- all tests passserve.rs,service.rsx3)Implemented with the help of Claude Code