Skip to content

feat(cli): try confirm-or-revert prefs - #3358

Draft
benallfree wants to merge 1 commit into
meshcore-dev:devfrom
MeshEnvy:feature/cli-try
Draft

feat(cli): try confirm-or-revert prefs#3358
benallfree wants to merge 1 commit into
meshcore-dev:devfrom
MeshEnvy:feature/cli-try

Conversation

@benallfree

@benallfree benallfree commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Draft for visibility. Adds try [reboot] <secs> <set-args>: apply a pref trial, persist it like set, and auto-revert on RTC timeout unless the same key is committed with set. Up to 4 concurrent slots in /try.json (survives reboot). Optional reboot reverts then reboots; set radio / set freq inherit reboot-on-revert.

Upstream CommonCLI + role loop() hooks only. No board variants, slim builds, or EnvyOS-specific radio/FEM work in this PR.

Prior art / related

  • tempradio (mainline): temporary RF 4-tuple, live apply, not saved to prefs. #1910 (parser hardening only).
  • hop.ignore (#2980): volatile RAM test knob, not persisted.

try covers any set-able pref (plus powersaving on|off): trial persisted, revert snapshot in /try.json, RTC timer, commit via matching set.

Sample commands

try 3600 radio.rxgain off
try reboot 3600 radio.rxgain off
try 3600 radio 915.0,250,11,5
try 1800 powersaving on
get try
set radio.rxgain off
get radio.rxgain

try 10 radio.rxgain off
get try
# wait ~10s
get radio.rxgain
get try

Test plan

  • USB: try 10 radio.rxgain offget try → wait → reverts
  • Reboot mid-trial: prefs + /try.json reload; timer still active
  • try then set same key commits and clears slot
  • try 3600 radio … reboot armed on revert
  • Denied keys rejected; fifth slot returns Error: try slots full

Co-authored-by: Cursor <cursoragent@cursor.com>
@LitBomb

LitBomb commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

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