Skip to content

feat: /resume and /ask-again from Telegram, limited so they cannot undo a safety stop - #52

Merged
groupsky merged 2 commits into
mainfrom
feat/33-resume-ask-again
Nov 19, 2026
Merged

groupsky merged 2 commits into
mainfrom
feat/33-resume-ask-again

Conversation

@groupsky

Copy link
Copy Markdown
Contributor

What

/resume NAME and /ask-again NAME from Telegram, limited so that they cannot undo a safety stop. They go through request files resume and ask-again, as /status and /pause do.

  • /resume lifts only a pause that /pause wrote: root's regular file, one link, exactly one line paused 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-again clears only an open question of the last tip (it may be lost) or an expired mark. 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.
  • When /resume and /pause come in one run, the pause wins.
  • The "paused" hints say /resume NAME for 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-again while 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

groupsky and others added 2 commits November 19, 2026 14:27
…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>
@groupsky
groupsky merged commit b91914c into main Nov 19, 2026
10 checks passed
@groupsky
groupsky deleted the feat/33-resume-ask-again branch November 19, 2026 12:33
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.

feat: /resume and /ask-again from Telegram, limited so they cannot undo a safety stop

1 participant