feat(webhook): add opt-in persistent session keys - #90571
Closed
jzOcb wants to merge 6 commits into
Closed
Conversation
Author
|
Follow-up fix after independent review: persistent and fallback delivery identities now use disjoint namespaces ( Also re-ran the focused webhook/session suite after this commit: 85 passed. |
Author
Author
|
Closing in favor of #90589, which contains the verified final branch head. |
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.
Summary
Adds an opt-in per-route
session_keytemplate so conversational webhook sources can reuse a Hermes session instead of creating a fresh delivery-ID session for every POST. Default behavior remains per-delivery.This supersedes the stale/conflicting implementation path in #57972 and covers the narrower constant-route proposal in #71570. It intentionally does not address cross-session approval routing (#71571).
Safety and behavior
session_keycreates a persistent conversation identity; unresolved templates safely fall back to the existing one-shot delivery session and still auto-close.session:<key>) and fallback (delivery:<delivery-id>) identities use disjoint namespaces, so a delivery ID cannot collide with, reuse, or auto-close a persistent conversation.deliver_extra, preventing concurrent turns from redirecting another turn’s response.Validation
The full
tests/gatewaysuite was also exercised locally. The targeted webhook coverage is green; remaining failures are existing macOS/environmental Discord/AF_UNIX/DNS isolation failures outside this diff.Credit
This branch preserves the authored commits from Gilles Gameiro and Atroci; the additional commits add profile-isolation, multi-delivery FIFO, and persistent-vs-fallback namespace-collision regression coverage.