Skip to content

fix(intent): the posting header comment must not name a channel it does not bind - #6935

Merged
delchev merged 1 commit into
masterfrom
fix/posting-comment-channel
Aug 25, 2026
Merged

fix(intent): the posting header comment must not name a channel it does not bind#6935
delchev merged 1 commit into
masterfrom
fix/posting-comment-channel

Conversation

@delchev

@delchev delchev commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #6933, which merged with smoke-tests red. This is what turned it red.

IntentEmissionCoverageIT asserts that an onCreate posting's generated file does not contain -transitioned anywhere:

assertTrue(!createPosting.contains("-transitioned"), "an onCreate posting must not bind the -transitioned topic");

#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 the onCreate ones, 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

  • The header comment names the one moment the handler binds, through the same pre-rendered ${moment} the class summary already 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; a whole-file scan also trips on prose that merely names it.

Verification

IntentEmissionCoverageIT, IntentEngineIT, EdmModelRoundTripIT and ModelGenerationIT run together locally: 63 tests, all green (the same set reproduced the failure before the fix). formatter:validate clean.

🤖 Generated with Claude Code

…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>
@delchev
delchev merged commit 29bb32c into master Aug 25, 2026
8 of 10 checks passed
@delchev
delchev deleted the fix/posting-comment-channel branch August 25, 2026 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant