feat(config): add update subkey with auto/pin/interval for runtime-tunable updater (PILOT-398)#19
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…nable updater (PILOT-398) Adds UpdateConfig type to ~/.pilot/config.json under the "update" key, following the same pattern as the existing "skill_inject" subkey. This lets pilot-updater read config each tick instead of relying on launch flags alone. - Auto (bool): enable/disable auto-update at runtime - Pin (string): lock to a specific release tag - Interval (string): Go duration string for check frequency All fields are zero-value nillable — absent key = updater uses its defaults. SetUpdateConfig/GetUpdateConfig read-modify-write atomically, preserving other subkeys in the shared config file. Closes PILOT-398
748e9f5 to
94cc796
Compare
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.
What
Adds the
updatesubkey types and accessors to~/.pilot/config.json, following the existingskill_injectpattern. This is the library-side change that enables pilot-updater and pilotctl to read/write update settings at runtime instead of relying solely on launch flags.Fields
autopinintervalVerification
go build ./...— cleango vet ./...— cleango test ./...— all passing (existing + 6 new tests covering: missing file, roundtrip, disable, preserve other keys, coexistence with skill_inject)Design notes
SetEnabled)UpdateConfigreturned when subkey is absent — callers apply their own defaultsAutodistinguishes "not set" from "explicitly false" so the updater can differentiate between absent config and explicit opt-outCloses PILOT-398