Skip to content

feat(cron): replay check-in reads Discord before repeating (RIG-8084) - #53

Draft
rigel-mintaka wants to merge 3 commits into
rigel-releasefrom
nemo-platform/rig-8084-replay-check-in-reads-discord-before
Draft

rigel-mintaka wants to merge 3 commits into
rigel-releasefrom
nemo-platform/rig-8084-replay-check-in-reads-discord-before

Conversation

@rigel-mintaka

@rigel-mintaka rigel-mintaka commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

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:

  • DL-1593. Cut-off runs are durable pending work. The admitted tick runs each once.
  • DL-1594. The replay checks Discord for what the cut-off run already posted, and skips it.
  • DL-1691 (Q1 = B). Scope: a replay reads its job's deliver channel and threads under it, limited to list_forum_posts and fetch_messages. Only this bot's messages at or after started_at are returned. Posts stay inside discord.post_channels.
  • DL-1692 (Q2 = B). The replay counts the run, not the shutdown. A cut-off replay never replays again.

Related Issue

Linear RIG-8084 is the tracker; there is no GitHub issue.

Type of Change

  • ✨ New feature (non-breaking change that adds functionality)

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:

  1. Ordinary cron run: fetch_messages outside discord.post_channels is refused.
  2. Replay run: fetch_messages on the deliver channel returns only this bot's messages at or after started_at.
  3. Replay run: post_message to the deliver channel is refused.

Tests were not run on the authoring host.

checks pending Azure VM run

Checklist

  • Conventional Commits title
  • Contains only RIG-8084 changes
  • Tests added
  • Documentation updated
  • just test and just check pass (pending Azure VM run)

For New Skills

N/A.

Screenshots / Logs

N/A.

Refs RIG-8084

Co-authored-by: Matt Wilkinson matt@rigel.build

rigel-mintaka and others added 3 commits November 11, 2026 00:35
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
@linear-code

linear-code Bot commented Nov 11, 2026

Copy link
Copy Markdown

RIG-8084

This branch has not been deployed

No deployments
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.

1 participant