Skip to content

🔐 feat: Add Authenticated Discord Inbox APIs - #18296

Merged
berry-13 merged 1 commit into
berry-13/discord-dev-integrationfrom
berry-13/discord-ingress
Nov 19, 2026
Merged

berry-13 merged 1 commit into
berry-13/discord-dev-integrationfrom
berry-13/discord-ingress

Conversation

@berry-13

Copy link
Copy Markdown
Collaborator

Pull Request

Summary

Expose gateway-authenticated endpoints to submit, claim, defer, and finish inbox work in the application's scope. Derive the reply expiry from the Discord interaction ID.

Part 19 of the 100-part Discord stack. Depends on #18295, based on berry-13/discord-actions. Review this diff against its parent. Draft publication only; merge gates remain open.

Type of change

  • Feature

Testing

Tested environments/configuration: Existing committed implementation; no live services started for this publication.

Automated tests: git diff --check berry-13/discord-actions...berry-13/discord-ingress passed at a40a2fae09. This publication did not rerun this slice's test suites or full precheck. CI, acceptance evidence and local review must be reconciled with this head before marking it ready.

Screenshots / recordings

No user-facing change.

Risk / compatibility

Depends on the preceding stack entries. Scope: 8 files changed, 666 insertions(+).

Checklist

  • Existing relevant tests pass
  • Required dependency changes have been merged/published

@berry-13 berry-13 added the ✨ enhancement New feature or request label Nov 17, 2026
@berry-13
berry-13 added this pull request to stack #18378 November 17, 2026 23:05
@berry-13
berry-13 marked this pull request as ready for review November 17, 2026 23:35
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T18:48:47.243377Z 3d6e493 New commits
🔒 Security Review ✅ Completed 2026-11-17T23:38:43.610922Z a40a2fa Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a40a2fae09

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +78 to +82
const reply = discordPrivateReplySchema.parse(await deps.execute(record, fence));
const prepared = await deps.storage.prepareReply(
fence,
await deps.encrypt(JSON.stringify(reply)),
now(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Renew the inbox lease while executing the action

If execute and reply encryption take longer than the configured inbox lease (30 seconds by default), the lease expires before prepareReply runs. The storage implementation requires an unexpired lease, so preparation returns stale_fence; the subsequent finish(..., 'unavailable') also fails, and this claim returns no reply. The record remains reclaimable in processing, causing another claim to execute the action again rather than replay its result. Renew the lease during execution and stop processing if renewal fails so a slow successful action can still have its reply persisted.

Useful? React with 👍 / 👎.

@berry-13
berry-13 force-pushed the berry-13/discord-ingress branch 6 times, most recently from 1e31bff to b27c985 Compare November 19, 2026 18:47
Base automatically changed from berry-13/discord-actions to berry-13/discord-dev-integration November 19, 2026 18:47
@berry-13
berry-13 force-pushed the berry-13/discord-ingress branch from b27c985 to 3d6e493 Compare November 19, 2026 18:47
@berry-13
berry-13 merged commit 1be338e into berry-13/discord-dev-integration Nov 19, 2026
20 checks passed
@berry-13
berry-13 deleted the berry-13/discord-ingress branch November 19, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant