Repository navigation
feat: /status and /pause from Telegram - #51
Merged
Merged
Conversation
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>
3 of 4 tasks
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
/status [NAME]and/pause NAMEfrom Telegram, from the owner in the owner's chat only (as/check; others get no reply and write nothing).statusorpausein the instance check directory, with only its name in it.pullgate-check@NAME.pathnow watches these too.spool.TakeRequests: owner, regular file, exact content; anything else is removed and does nothing)./pause: root writes the pause filepaused 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 ofpullgate status(now also the pause reason), cleaned and in<pre>. Then the normal run goes on, so/statusnever skips a fetch./statusand replies to/pauseat most once a minute. The pause itself is never rate-limited./helplists both. DESIGN.md section 9, THREAT-MODEL.md T18b and the README describe them.Not in this PR:
/doctor. It needspullgate 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
/statuscould skip fetches; a race could replace a pause that root wrote; the listener and root limits did not match; docs. Left for #33:/resumemust check the whole reason line (and that the file is root's regular file), not only its prefix.Fixes #32
🤖 Generated with Claude Code