Skip to content

Implement #95: watch update CLI — knobs in place, grants survive - #98

Merged
hsliuustc0106 merged 1 commit into
mainfrom
feat/watch-update
Oct 4, 2026
Merged

hsliuustc0106 merged 1 commit into
mainfrom
feat/watch-update

Conversation

@hsliuustc0106

Copy link
Copy Markdown
Contributor

Claimed in the issue per the #92 protocol.

What lands

  • TaskStore.update_tuning — cadence and the three watch-kind dimensions (digest/stale/flaky) adjust in place with no scope_version bump; off clears a dimension; paused watches updatable, terminal rejected; enums enforced by the same validate.
  • update() boundary made honest: cadence_seconds leaves the authorization-scope field set — the watch update CLI: adjust cadence/digest/stale/flaky in place (no grant invalidation) #95 decision made structural rather than conventional. Purpose/notify/stop/target remain scope; changing them still bumps the version and revokes grants exactly as before.
  • CLI: nanodot watch update <id> [--cadence N] [--digest {off,6h,12h,24h}] [--stale {off,2d,3d,7d,14d}] [--flaky {on,off}] — at least one knob required (no-op rejected), result previewed, parse-time rejection of invalid values.
  • The dogfood upgrade pain that motivated this (cancel + recreate to turn on --digest) is now watch update <id> --digest 24h.

Acceptance (#95)

  • Each knob persists + validates + no scope_version bump + grants survive (both sides pinned: tuning keeps grants, update_scope still revokes)
  • CLI parse/reject rows (no-op, bad id, invalid values) and per-knob persistence
  • Paused updatable; terminal rejected
  • Legacy-row migration unaffected (existing migration tests green)
  • 706 pytest (8 new) green, offline dead-proxy verified

Closes #95

TaskStore.update_tuning changes cadence and the digest/stale/flaky
dimensions without touching scope_version, and cadence leaves update()'s
authorization-scope field set — adjusting it no longer invalidates
grants (the #95 semantics decision, made explicit: cadence/digest/
stale/flaky are operational knobs; purpose/notify/stop and target remain
scope). nanodot watch update <id> [--cadence N] [--digest ...] [--stale
...] [--flaky on|off] previews the result, requires at least one knob,
accepts paused watches, rejects terminal ones and no-op calls; 'off'
clears a dimension. Grant survival and scope-change revocation are both
pinned by tests either side of the boundary.

Closes #95
@hsliuustc0106
hsliuustc0106 merged commit a474549 into main Oct 4, 2026
4 checks passed
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.

watch update CLI: adjust cadence/digest/stale/flaky in place (no grant invalidation)

1 participant