You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: --ask-again does not re-ask while the lost question is still open #22
A question whose Telegram message was lost cannot be asked again until it expires (approval_ttl, 12 h by default).
Seen on 2026-11-16 with v0.1.0, after #19: root wrote the question to the outbox, the listener could not read the file and removed it (level=WARN msg="bad outbox file, removed" ... permission denied). Root still logged result=asked, and pullgate status showed the question as open. Then:
pullgate status NAME --ask-again cleared the tip mark, but the next run logged result=nothing: decide in internal/gate/run.go returns Nothing when open != nil && open.SHA == tip, and --ask-again does not close the open question.
So the only ways out were to wait for the expiry or push a new commit.
Proposal
--ask-again also closes the open question for the tip (as closeOpen does), so the next run sends a new question with a new ID. An old Apply button for the closed question must not work (it already does not: approvals name the question ID).
The listener tells the owner when it removes a bad outbox file it could not read: a short notice "an outbox message of NAME could not be read and was removed; run pullgate status NAME --ask-again". It cannot read the text, but it knows the instance.
Done when
A test: an open question for the tip, then --ask-again, then a run sends a new question (new ID); an Apply for the old ID is refused.
A test: the listener removes an unreadable outbox file and sends one notice that names the instance and the command.
README "Config" or the status help says what --ask-again does with an open question.
Open question, --ask-again, new question with a new ID, old Apply refused: TestAskAgainReplacesALostQuestion in internal/gate/gate_test.go. Also TestAskAgainDropsAnApprovalWrittenBefore (a tap already in the inbox does nothing), TestAskAgainInAutoMode and TestAskAgainKeepsAnOpenQuestionForAnotherSHA.
The listener removes an unreadable outbox file and sends one notice with the instance and the command: TestBadOutboxFileTellsTheOwner in internal/listener/listener_test.go (one notice for an unreadable file and a broken file together, no file content in it). TestBadOutboxEntryThatStaysSendsNoNotice: no notice when the entry cannot be removed.
Docs: README ("Config", the --ask-again line), the status help in cmd/pullgate/main.go, DESIGN.md sections 7, 8 and 13, THREAT-MODEL.md T9.
Activity
groupsky commentedon Nov 17, 2026
Fixed in #35 (squash commit 38ecde6).
Evidence for each "Done when" box:
--ask-again, new question with a new ID, old Apply refused:TestAskAgainReplacesALostQuestionininternal/gate/gate_test.go. AlsoTestAskAgainDropsAnApprovalWrittenBefore(a tap already in the inbox does nothing),TestAskAgainInAutoModeandTestAskAgainKeepsAnOpenQuestionForAnotherSHA.TestBadOutboxFileTellsTheOwnerininternal/listener/listener_test.go(one notice for an unreadable file and a broken file together, no file content in it).TestBadOutboxEntryThatStaysSendsNoNotice: no notice when the entry cannot be removed.--ask-againline), thestatushelp incmd/pullgate/main.go, DESIGN.md sections 7, 8 and 13, THREAT-MODEL.md T9.CI was green on all checks before the merge.