Repository navigation
🔐 feat: Add Authenticated Discord Inbox APIs - #18296
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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".
| const reply = discordPrivateReplySchema.parse(await deps.execute(record, fence)); | ||
| const prepared = await deps.storage.prepareReply( | ||
| fence, | ||
| await deps.encrypt(JSON.stringify(reply)), | ||
| now(), |
There was a problem hiding this comment.
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 👍 / 👎.
1e31bff to
b27c985
Compare
b27c985 to
3d6e493
Compare
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
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-ingresspassed ata40a2fae09. 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