fix #34: preserve FIFO submitted turns#38
Merged
Conversation
627c81b to
651ae4e
Compare
651ae4e to
0a520e9
Compare
Root cause: user-message live submission had two independent paths. Core submit used FIFO admission, while Telegram could pre-open a turn and submit directly to the provider, and the compatibility reuse path let start_turn participate in submitted-turn state without owning a permit. Fix: make LucarneCore::submit_turn the single user-message live submission entry, create the durable turn inside that path, remove start_turn submitted-turn compatibility, and route Telegram/WeChat user submissions through core admission. Telegram still completes lifecycle after projection drain to clear callbacks registered while draining already-queued events. Regression guard: submit_turns_wait_for_prior_turn_completion_per_workspace covers same-workspace FIFO, core_service_stress covers open/submit/record/complete, Telegram active-conversation and turn projection tests cover no duplicate notification/final-message behavior, and full workspace + journey suites pass.
0a520e9 to
96ba98b
Compare
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
LucarneCore::submit_turnthe single user-message live submission entry and remove thestart_turnsubmitted-turn compatibility pathdocs/decisions/2026-06-01-turn-queue-fifo-admission.mdVerification
cargo +nightly check -Zbuild-dir-new-layoutcargo +nightly test -Zbuild-dir-new-layout --workspace --all-features -- --quietcargo +nightly test -Zbuild-dir-new-layout --workspace --all-features journey -- --nocapturecore_service_stress, Telegram active-conversation notification test, andlucarne-telegram turn::Fixes #34