Repository navigation
Link mentions of nodes created by an invariant play action - #4385
Merged
Merged
Conversation
…nsaction commits An invariant create_node action inserts through the no-dispatch in-transaction path, which never linked mention edges. The action now records the node on the transaction and with_transaction links its mentions after commit, as create_node does. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
mstomar125
force-pushed
the
issue-4358-invariant-mentions
branch
from
November 26, 2026 08:40
7806a28 to
2a9a985
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.
A node an invariant play action creates (
execute_create_node_in_tx) inserts throughinsert_node_in_tx_no_invariant_dispatch, which never callssync_created_mentions, so anodespace://link in its content had nomentionsedge until the node was next edited. Reaction actions go throughcreate_nodeand were linked.Decision
Link mentions on the invariant path (the issue's first option). Mentions stay derived, best-effort state outside the transaction (ADR-069 section 5): the action records the created node on
NodeServiceTx(defer_mention_links) andwith_transactionlinks it after commit viasync_created_mentions, the same routinecreate_nodeuses. A rolled-back transaction links nothing. The deferred-after-commit bookkeeping is now oneDeferredWorkstruct alongside the existing embedding refresh.Tests
a_node_an_invariant_action_creates_is_linked_to_what_its_content_mentions(integration): failed before the fix (no edge), passes after. Mutation checks, each reverted: removing thedefer_mention_linkscall fails it; making the post-commit loop a no-op fails it.Ran: the 56
playbook_invarianttests,bun run quality:fix,bun run test:changed(all green). The packages/agent lane is signed off for this batch; this PR does not touch it.Closes #4358
🤖 Generated with Claude Code