Skip to content

fix(discord): durable Notifications delivery and retry safety - #793

Draft
johoja12 wants to merge 1 commit into
Ark0N:masterfrom
johoja12:upstream/discord-delivery
Draft

johoja12 wants to merge 1 commit into
Ark0N:masterfrom
johoja12:upstream/discord-delivery

Conversation

@johoja12

@johoja12 johoja12 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Part 1 of the review split requested in #769. This changes the existing Notifications-mode transport only: authorized inbound message IDs are durably claimed before terminal/attachment writes, partial input is never blindly replayed, and full-text output parts record their payload fingerprints and confirmed message IDs separately. Retries skip confirmed parts and stop on uncertainty. Unversioned identical automatic notices also pause after uncertain delivery; deliberate notices remain distinct requests.

REST retries use one enforced nonce, preserve multipart payloads, respect the real retry-after and do not retry ambiguous thread creation. The journal is bounded to 2048 metadata records/2 MB with seven-day retention and private atomic writes. It contains no prompt/response/file bytes or token. Invalid journals fail closed. Acceptance is transport acceptance, never fabricated task completion.

Scope excludes Full-mode channels/threads and transcript readers, questions and model controls, Activity/history/Results, generated files and remote uploads. Those remain in the draft integration reference #769 and will be reviewed separately.

Validation: 116 delivery and existing bridge tests pass, including duplicate/restarted inbound events, partial input, persistent-store refusal, refused/uncertain multipart output, formatter changes, nonce reuse, retry limits and scope cancellation. Typecheck, lint and format checks pass. Isolated curl /api/status and /api/discord return success with Discord disabled; the temporary instance was stopped. No production deployment or diagnostic Discord messages.

Tracking: johoja12#218 (parent johoja12#97).

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