Repository navigation
feat(cron): replay check-in reads Discord before repeating (RIG-8084) - #53
Draft
rigel-mintaka wants to merge 3 commits into
Draft
rigel-mintaka wants to merge 3 commits into
rigel-mintaka wants to merge 3 commits into
Conversation
Co-authored-by: Matt Wilkinson <matt@rigel.build>
…IG-8084) Tell replay sessions to check earlier Discord posts before repeating work. Co-authored-by: Matt Wilkinson <matt@rigel.build> tmp-resolve-notice
A replay may read its job's deliver channel, and threads under it, inside its window. Reads return only this bot's messages at or after started_at and never grant ordinary channel history. Posts there stay refused. Co-authored-by: Matt Wilkinson <matt@rigel.build> tmp-resolve-doc tmp-sched
This branch has not been deployed
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 does this PR do?
Finishes RIG-8084 T2. A replay of a cron run cut off by a gateway restart now checks the job's Discord deliver channel before it repeats work. A replay may read that channel inside its window. It never gets ordinary channel history and never posts there.
Rulings:
deliverchannel and threads under it, limited tolist_forum_postsandfetch_messages. Only this bot's messages at or afterstarted_atare returned. Posts stay insidediscord.post_channels.Related Issue
Linear RIG-8084 is the tracker; there is no GitHub issue.
Type of Change
Changes Made
tools/discord_tool.py: replay read window and its filters.cron/scheduler.py: binds the window after the delivery target is published.cron/scheduler_prompt.py: the replay notice after_CRON_HINT.tests/cron/test_replay_deliver_read.py: BDD tests.website/docs/developer-guide/cron-internals.md: one paragraph.How to Test
Steps to verify:
fetch_messagesoutsidediscord.post_channelsis refused.fetch_messageson the deliver channel returns only this bot's messages at or afterstarted_at.post_messageto the deliver channel is refused.Tests were not run on the authoring host.
checks pending Azure VM run
Checklist
just testandjust checkpass (pending Azure VM run)For New Skills
N/A.
Screenshots / Logs
N/A.
Refs RIG-8084
Co-authored-by: Matt Wilkinson matt@rigel.build