Skip to content

feat(config): add update subkey with auto/pin/interval for runtime-tunable updater (PILOT-398)#19

Merged
TeoSlayer merged 1 commit into
mainfrom
openclaw/pilot-398-20260616-134140
Jun 16, 2026
Merged

feat(config): add update subkey with auto/pin/interval for runtime-tunable updater (PILOT-398)#19
TeoSlayer merged 1 commit into
mainfrom
openclaw/pilot-398-20260616-134140

Conversation

@matthew-pilot

Copy link
Copy Markdown
Collaborator

What

Adds the update subkey types and accessors to ~/.pilot/config.json, following the existing skill_inject pattern. 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

Field Type Purpose
auto *bool Enable/disable auto-update. Nil = updater default (currently enabled)
pin string Lock to a specific release tag. Empty = no pin (follow latest)
interval string Go duration string (e.g. "30m", "1h"). Empty = updater default

Verification

  • go build ./... — clean
  • go vet ./... — clean
  • go test ./... — all passing (existing + 6 new tests covering: missing file, roundtrip, disable, preserve other keys, coexistence with skill_inject)

Design notes

  • Read-modify-write is atomic via .tmp + rename (same pattern as SetEnabled)
  • Zero-value UpdateConfig returned when subkey is absent — callers apply their own defaults
  • Pointer Auto distinguishes "not set" from "explicitly false" so the updater can differentiate between absent config and explicit opt-out

Closes PILOT-398

@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

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
@TeoSlayer TeoSlayer force-pushed the openclaw/pilot-398-20260616-134140 branch from 748e9f5 to 94cc796 Compare June 16, 2026 17:53
@TeoSlayer TeoSlayer merged commit 4e87b4b into main Jun 16, 2026
3 checks passed
@TeoSlayer TeoSlayer deleted the openclaw/pilot-398-20260616-134140 branch June 16, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants