fix(intent): the posting header comment must not name a channel it does not bind - #6935
Merged
Conversation
…es not bind
IntentEmissionCoverageIT asserts an onCreate posting's generated file does
not contain "-transitioned" at all, and the axis-neutral header comment I
wrote enumerated every channel - so every posting, including the onCreate
ones, now carried that literal in its javadoc. The assertion was right: a
generated handler should not talk about a channel it does not subscribe to.
The comment now names the ONE moment the handler binds, through the same
pre-rendered ${moment} the class summary uses, and points at destination()
for the topic itself. The reason a system status write publishes
-transitioned rather than -updated belongs to the module guide, not to every
generated file's header.
The assertion is anchored on the destination()'s return literal
("-transitioned\";") to match its positive sibling one line above: what must
not happen is BINDING the status channel, and a whole-file scan also trips
on prose that merely names it.
Co-Authored-By: Claude Opus 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.
Follow-up to #6933, which merged with
smoke-testsred. This is what turned it red.IntentEmissionCoverageITasserts that anonCreateposting's generated file does not contain-transitionedanywhere:#6933 replaced
Posting.java.template's two-state#if($isCreate)header comment with an axis-neutral one that enumerated every channel - so every posting, including theonCreateones, now carried that literal in its javadoc and the assertion tripped. The assertion was right: a generated handler should not talk about a channel it does not subscribe to.The fix
${moment}the class summary already uses, and points atdestination()for the topic itself. The reason a system status write publishes-transitionedrather than-updatedbelongs to the module guide, not to every generated file's header.destination()'s return literal (-transitioned";) to match its positive sibling one line above. What must not happen is binding the status channel; a whole-file scan also trips on prose that merely names it.Verification
IntentEmissionCoverageIT,IntentEngineIT,EdmModelRoundTripITandModelGenerationITrun together locally: 63 tests, all green (the same set reproduced the failure before the fix).formatter:validateclean.🤖 Generated with Claude Code