Repository navigation
feat: ask less often: settle time, a "nothing to apply" check exit, and one more question after a wait - #53
Merged
Merged
Conversation
…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>
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.
Part of #41 (the "Released in a tagged version" box closes with the release).
What changes
[limits] settle(default0, as before). root keeps the time it first saw the tip (tip_sincein the state). While the tip is younger thansettle, 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 inaskandauto. The time is root's own clock, not the commit date (the writer sets that).checkexit 3 = "nothing to apply on this host". The tip is markednothing, 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). Inaskmode 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 againstquestions_per_day. It does nothing inautomode.pullgate status NAME(and/status) showssettle: settling until …andtip mark: nothing (the check found nothing to apply on this host)./checkand/ask-againreplies and/helpsay whenreask_afterasks again.contrib/examplesconfigs.Tests (
internal/gate/askless_test.go)TestSettleTwoTipsGiveOneQuestionForTheSecond,TestSettleTipSeenLongerAgoIsAskedAtOnce,TestSettleWithoutItAsksAtOnce,TestSettleClockBackStartsAgain,TestSettleInAutoModeTestCheckExit3IsNothingToApply(no message,nothingmark, applied SHA kept, next question lists both commits, exit 1 still a failed check),TestCheckExit3InAutoMode,TestCheckExit3InTheBrokenStateIsAFailedCheckTestReaskAfterSkip,TestReaskAfterExpiry,TestReaskCountsAgainstQuestionsPerDay,TestWithoutReaskNothingChanges,TestReaskNotInAutoModeTestCheckRequestRepliesSettlingAndNothing,TestStatusShowsNoSettleForAHandledTipinternal/config:TestSettleAndReask, and the refused casessettle 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_aftercould act inautomode in the broken state (nowaskmode only); "settling until" showed for a held or broken tip (now not); hints in/help,/checkand/ask-againreplies; a too strong sentence about clocks in THREAT-MODEL.md. Not changed, and why: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