Skip to content

feat: /status and /pause from Telegram - #51

Merged
groupsky merged 2 commits into
mainfrom
feat/32-status-pause
Nov 19, 2026
Merged

groupsky merged 2 commits into
mainfrom
feat/32-status-pause

Conversation

@groupsky

Copy link
Copy Markdown
Contributor

What

/status [NAME] and /pause NAME from Telegram, from the owner in the owner's chat only (as /check; others get no reply and write nothing).

  • The listener writes a request file status or pause in the instance check directory, with only its name in it. pullgate-check@NAME.path now watches these too.
  • Root takes them in its run (spool.TakeRequests: owner, regular file, exact content; anything else is removed and does nothing).
  • /pause: root writes the pause file paused from Telegram at TIME, only if there is none. It uses a hard link, so a pause that is there, or one that root writes at the same moment, is never replaced. A reason after NAME is not sent to the host.
  • /status: a notice with the facts of pullgate status (now also the pause reason), cleaned and in <pre>. Then the normal run goes on, so /status never skips a fetch.
  • Rate limits: the listener takes the same command for the same instance once a minute; root answers /status and replies to /pause at most once a minute. The pause itself is never rate-limited.
  • /help lists both. DESIGN.md section 9, THREAT-MODEL.md T18b and the README describe them.

Not in this PR: /doctor. It needs pullgate doctor (#28). #50 takes it, and #28 blocks it.

Tests

internal/gate/request_test.go: TestStatusRequest, TestPauseRequest, TestPauseRequestKeepsAnOtherPause, TestListenerCannotPauseByOtherFiles. internal/listener/listener_test.go: TestStatusAndPauseCommands, TestStatusAndPauseNotForOthers, TestHelp.

Reviews

The security reviewer and a correctness review ran. Fixed: the path unit did not watch the new files (high); a stream of /status could skip fetches; a race could replace a pause that root wrote; the listener and root limits did not match; docs. Left for #33: /resume must check the whole reason line (and that the file is root's regular file), not only its prefix.

Fixes #32

🤖 Generated with Claude Code

groupsky and others added 2 commits November 19, 2026 14:22
Fixes #32

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ch, no replaced pause

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@groupsky
groupsky merged commit 9fa707e into main Nov 19, 2026
10 checks passed
@groupsky
groupsky deleted the feat/32-status-pause branch November 19, 2026 12:27
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: /status, /pause and /doctor from Telegram

1 participant