Skip to content

feat: ask less often: settle time, a "nothing to apply" check exit, and one more question after a wait - #53

Merged
groupsky merged 1 commit into
mainfrom
feat/41-ask-less-often
Nov 20, 2026
Merged

groupsky merged 1 commit into
mainfrom
feat/41-ask-less-often

Conversation

@groupsky

Copy link
Copy Markdown
Contributor

Part of #41 (the "Released in a tagged version" box closes with the release).

What changes

  • [limits] settle (default 0, as before). root keeps the time it first saw the tip (tip_since in the state). While the tip is younger than settle, a run logs "settling" and stops: no check, no question, no notice. A new tip, or a clock that went back, starts the wait again. It works in ask and auto. The time is root's own clock, not the commit date (the writer sets that).
  • check exit 3 = "nothing to apply on this host". The tip is marked nothing, no message is sent, and the applied SHA stays, so the next question lists every commit since the last real apply. Any other non-zero status, a timeout or a signal is a failed check, as before. In the broken state, exit 3 is a failed check with its notice, so the owner sees that a fix forward was not asked.
  • [limits] reask_after (default off). In ask mode a tip marked skipped or expired is asked once more when its mark is this old and it is still the tip. A second Skip starts the wait again. It counts against questions_per_day. It does nothing in auto mode.
  • pullgate status NAME (and /status) shows settle: settling until … and tip mark: nothing (the check found nothing to apply on this host).
  • The Skip reply, the "expired" edit, the /check and /ask-again replies and /help say when reask_after asks again.
  • DESIGN.md §5, §7, §11, §13; THREAT-MODEL.md T11 and T15; README; both contrib/examples configs.

Tests (internal/gate/askless_test.go)

  • TestSettleTwoTipsGiveOneQuestionForTheSecond, TestSettleTipSeenLongerAgoIsAskedAtOnce, TestSettleWithoutItAsksAtOnce, TestSettleClockBackStartsAgain, TestSettleInAutoMode
  • TestCheckExit3IsNothingToApply (no message, nothing mark, applied SHA kept, next question lists both commits, exit 1 still a failed check), TestCheckExit3InAutoMode, TestCheckExit3InTheBrokenStateIsAFailedCheck
  • TestReaskAfterSkip, TestReaskAfterExpiry, TestReaskCountsAgainstQuestionsPerDay, TestWithoutReaskNothingChanges, TestReaskNotInAutoMode
  • TestCheckRequestRepliesSettlingAndNothing, TestStatusShowsNoSettleForAHandledTip
  • internal/config: TestSettleAndReask, and the refused cases settle too long, settle below 0, reask below 0.

Reviews

The security reviewer (.claude/agents/security-reviewer.md) and a correctness review ran on the diff. Fixed from them: exit 3 in the broken state was silent (now a failed check with a notice); reask_after could act in auto mode in the broken state (now ask mode only); "settling until" showed for a held or broken tip (now not); hints in /help, /check and /ask-again replies; a too strong sentence about clocks in THREAT-MODEL.md. Not changed, and why:

  • An open question for an older tip stays open while a new tip settles. This is the same as today while a new tip is checked; it is now written in DESIGN.md §7.
  • A state file from an older version has no tip_since, so the tip it knew waits one settle time after the update. This fails closed; it is written in DESIGN.md §7.

🤖 Generated with Claude Code

…nd one more question after a wait

- [limits] settle: a tip is checked and asked only when root has seen it
  unchanged for this long (its own clock, kept as tip_since in the state).
- check exit 3: "nothing to apply on this host". The tip is marked
  nothing, no message is sent, and the applied SHA stays. In the broken
  state exit 3 is a failed check with its notice.
- [limits] reask_after: in ask mode a skipped or expired tip is asked once
  more when its mark is this old. It counts against questions_per_day.
- pullgate status shows "settling until …" and the nothing mark.

Closes #41 except the release box.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@groupsky
groupsky merged commit 533f7c9 into main Nov 20, 2026
10 checks passed
@groupsky
groupsky deleted the feat/41-ask-less-often branch November 20, 2026 08:15
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.

1 participant