Repository navigation
messaging: a message sent straight from a request carries the request's language (#9160) - #9166
Merged
delchev merged 2 commits intoDec 4, 2026
Conversation
…'s language (eclipse-dirigible#9160) OriginatingUserProperty.stamp read only ThreadLanguage, which the request filter clears since eclipse-dirigible#9043 and nothing binds from Accept-Language, so a message custom/ code sent during a request left without dirigible_originating_language and its listener answered in the base language. It now reads the language the way the outbox does: the bound thread language first, else the request's Accept-Language (RequestLanguage.of, core-base), else none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…text it set up (eclipse-dirigible#9160) An unmatched ThreadContextFacade.tearDown() after the test that never set one up left the thread's context half-open, and MessageProducerTest, run later on the same surefire thread, failed reading it with a NullPointerException (both unit-test legs of eclipse-dirigible#9166). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Cause
OriginatingUserProperty.stampstampeddirigible_originating_languagefromThreadLanguage.get()only. Since #9141 (#9043)HttpContextFilterclears the thread language at the start of every request and nothing binds it fromAccept-Language, so a message thatcustom/code sends straight through the SDKProducerduring a request left without a language, and its listener resolved refusals,CheckMessagestexts and the_LANGoverlay in the base language. Events written through a generated repository were unaffected: the outbox readsUserFacade.findLanguage().Change
stampreads the language by the outbox's rule: the bound thread language first (a handler re-sending keeps the originating one), else the request'sAccept-Language, else none (a job, a seed - unchanged).engine-listenersdoes not depend onapi-security, so it uses core-base'sRequestLanguage.of(request)with the request fromUserRequestVerifier- the same ruleUserFacade.findLanguageapplies (first range,*= none). The user stamp and the property names are unchanged.Verification
OriginatingUserPropertyTest(new): a bound language wins over the request's; with none bound the request's first range is stamped (bg-bg, lower case, exactly as the outbox records it);*stamps none; neither stamps none.engine-listenersunit suite green (120).IntentEventLanguageIT: a new method publishes acustom/controller that callsProducer.sendToQueueand a queue handler that refuses throughCheckMessagesand reads a multilingual row; called withAccept-Language: bg-BGthe handler's remark is Bulgarian, without a language it is the default text. Green with the change (both methods), and the new method fails at the Bulgarian assertion withOriginatingUserPropertyreverted.OriginatingUserPropertyTesttore down a context also after the test that never set one up, which left the surefire thread half-open and failedMessageProducerTest(5 NPEs) whenever it ran later on that thread - bothtestslegs of the first CI run. It now tears down only what it set up. Reproduced with-Dsurefire.runOrder=reversealphabetical(5 errors before, 0 after); theengine-listenerssuite is green in both orders (120).mvn formatter:validateon both modules with the cache wiped.Fixes #9160
🤖 Generated with Claude Code