fix(reasoner): store business id as property on DDL-created vertices - #622
Open
JJUN99 wants to merge 2 commits into
Open
fix(reasoner): store business id as property on DDL-created vertices#622JJUN99 wants to merge 2 commits into
JJUN99 wants to merge 2 commits into
Conversation
Vertices created by a rule Action (createNodeInstance) never received an
"id" entry in their property map: extractVertex() only used the computed
business id to build the internal IVertexId.
Any subsequent rule execution that uses such a vertex as a start id then
crashes while assembling debug info:
java.lang.NullPointerException
at LocalRDG.generateStartNodeDebugInfo(LocalRDG.java:1461) // get("id").toString()
at LocalRDG.getResult
at LocalReasonerRunner.doRun
LocalReasonerRunner.run() swallows the Throwable and returns an empty
result, so the caller treats it as "0 matches". In the concept-reasoning
pipeline this silently drops belongTo classification of generated events
and stops leadTo propagation (reproducible with the supplychain example:
47 generated events, 0 classified).
Preserve the business id and store it in the vertex property map, which
matches how vertices loaded from the warehouse are shaped.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
JJUN99
requested review from
andylau-55,
caszkgui,
fishjoy,
matthewhyx,
royzhao,
wangsff,
yixianlzz and
youdonghai
as code owners
August 11, 2026 03:34
Contributor
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
Author
|
Note on the failing |
This was referenced Aug 11, 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.
Symptom
Events created by a concept rule's Action block (
createNodeInstance) never receive theirbelongToclassification, and concept-level propagation over them silently stops. No error is visible indocker logsor in the client response — the exception only appears in the server'scommon-error.log.Root cause
ExtractVertexImpl.extractVertex()computes a business id for the new vertex (either from theidentry in the Action's value map, or by concatenating the internal ids of all pattern-bound vertices) but only uses it to build the internalIVertexId. The vertex property map never gets anidentry.Any subsequent rule execution that uses such a vertex as a start id then crashes while assembling debug info:
LocalReasonerRunner.run()catches all Throwables and returns an empty result, so the caller treats the failed run as "0 matches": generated events lose theirbelongToclassification and causal propagation stops.Fix
Preserve the computed business id and store it in the vertex property map, matching the shape of vertices loaded from the warehouse.
Verification
Reproduced with the supplychain example (0.8 server): rule ④ (price rise → cost rise) creates 47 CompanyEvent vertices; before the fix all 47 follow-up classification runs died with the NPE above (47 entries in common-error.log, 0 belongTo edges). After the fix: 0 NPEs, 47/47 belongTo edges.