feat(intent): generates completion hook — sourceStatus flips the source after the target is created#6237
Merged
Merged
Conversation
…ce after the target is created generates: gains an optional sourceStatus: <EntityStatus seed id> - the completion hook the create-from flow was missing: once the target exists, the SOURCE document reaches its post-generation status (the canonical case: a proforma flips to INVOICED the moment the invoice is generated; previously that link was one-way and the flip was manual). A workflow-style system write: persisted via updateWithoutEvent (no -updated re-fire, onUpdate reactions stay quiet) and the source's -transitioned topic IS published, so posting glue / integrations can observe the transition. Parser requires the from entity to declare a function: EntityStatus relation; the glue pre-resolves the FK property and seed id; the Generate template emits the flip after the save (and after the items clone). Verified live: proforma -> Generate Invoice -> invoice created -> proforma Status == 3 (INVOICED). GlueGeneratesTest covers the glue resolution + the no-hook default; full engine-intent suite 114/114. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 10, 2026
Closed
delchev
added a commit
that referenced
this pull request
Jul 10, 2026
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.
What
generates:(create-from) gains an optionalsourceStatus: <EntityStatus seed id>— the completion hook the flow was missing:Until now the create-from link was one-way: the target was created through its repository (numbering, status init, calculated fields all fire), but the source stayed in its pre-generation status and the flip was a manual step.
Semantics
A workflow-style system write, consistent with the setter delegates: the source's EntityStatus FK is set after the target (and its cloned items) are saved, persisted via
updateWithoutEvent— no-updatedre-fire, so onUpdate reactions stay quiet — and the source's-transitionedtopic is published, so posting glue and integrations observe the transition like any other status change.sourceStatusrequires thefromentity to declare afunction: EntityStatusrelation.generatesblocks generate byte-identical code.Generate.java.template.Verification
Status == 3(INVOICED).GlueGeneratesTest: the resolved hook fields and the no-hook default (guards the byte-identical path for existing blocks). Full engine-intent suite 114/114.intent-assistant-guide.md, module README (the item moves out of the Planned list).🤖 Generated with Claude Code