Repository navigation
feat: /resume and /ask-again from Telegram, limited so they cannot undo a safety stop - #52
Merged
Merged
Conversation
…do a safety stop Fixes #33 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 tasks done
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.
What
/resume NAMEand/ask-again NAMEfrom Telegram, limited so that they cannot undo a safety stop. They go through request filesresumeandask-again, as/statusand/pausedo./resumelifts only a pause that/pausewrote: root's regular file, one link, exactly one linepaused from Telegram at YYYY-MM-DD HH:MM UTC. It moves the file aside and checks that it is the file it checked; a pause that root writes at the same moment is put back. A pause by pullgate itself (a cut-off apply), by root, or with any other text stays, and the reply says what to run as root. It never ends the broken state (feat: fix forward after a failed rollback instead of a pause that needs root #34)./ask-againclears only an open question of the last tip (it may be lost) or anexpiredmark. It refuses skipped, failed, held, refused and check-failed commits, the failed commit of the broken state, and a paused or off instance. It saves the state before the listener closes the old message./resumeand/pausecome in one run, the pause wins./resume NAMEfor a/pause, and the root command otherwise./help, DESIGN.md section 9, THREAT-MODEL.md T18b and the README describe them. T18b also says: if you suspect the token, pause as root.Tests
internal/gate/request_test.go:TestResumeLiftsOnlyATelegramPause(root--pause, a cut-off pause, a planted prefix, two lines, and a real/pause),TestTelegramPauseFileForm(hard link, symlink, trailing space, not UTC),TestResumeDoesNotEndBroken,TestPauseWinsOverResumeInOneRun,TestAskAgainOnlyExpiredOrLost(expired, lost, and skipped, failed, held, refused, check-failed),TestAskAgainRefusedWhilePausedOrBroken.internal/listener/listener_test.go:TestResumeAndAskAgainCommands,TestHelp.Reviews
The security reviewer and a correctness review ran. Neither found a way past the limits. Fixed: the race between the check and the remove (medium),
/ask-againwhile paused (medium), the order of save and edit, pause before resume in one run, the hints, the log line, the docs, and more deny tests.Fixes #33
🤖 Generated with Claude Code