Prove commandKey variants from compile-time Map.of routes instead of failing closed when dispatch uses map lookup rather than switch or enum valueOf.
Co-authored-by: Cursor <cursoragent@cursor.com>
Recursively peel predicate chains like matchesOrder -> isOrderKey(normalize(raw)) when extracting if-chain literals and inlining branch constraints, with regression tests for static-import, multi-module, and nested forms.
Co-authored-by: Cursor <cursoragent@cursor.com>
Recognize single-literal equals predicates in if-chains, inline them (including negated else-if constraints) for branch compatibility, skip traversing into predicate helpers during alias walks, and fail closed when a path variable cannot be proven.
Co-authored-by: Cursor <cursoragent@cursor.com>
Expand machineType routing when dispatchers use java.util.Objects.equals with helper-wrapped parameters, and evaluate those compound constraints without breaking existing receiver-equals forms.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use balanced-paren receiver-equals substitution so compound branch constraints stay correct while supporting forms like "ORDER".equalsIgnoreCase(normalizeType(machineType)).
Co-authored-by: Cursor <cursoragent@cursor.com>
When helper invocations have no receiver, look up single static imports and static star imports before giving up; add cross-package, chained-helper, and fail-closed expander regressions.
Co-authored-by: Cursor <cursoragent@cursor.com>
EntryPointBindingExpander follows single-arg normalize helpers declared on other types and accepts switch selectors wrapped by those helpers when extracting string case arms.
Co-authored-by: Cursor <cursoragent@cursor.com>
Enum.valueOf(normalize(event)) now expands when normalize trivially forwards its parameter; add expander regression test and assert flow highlight helper in enterprise HTML export.
Co-authored-by: Cursor <cursoragent@cursor.com>
Local renames like eventCode = event or normalized = event.trim() no longer break Enum.valueOf case extraction; add multi-hop and normalization coverage in EntryPointBindingExpanderTest.
Co-authored-by: Cursor <cursoragent@cursor.com>
Structured {source, event} steps in state_machine_enterprise flows.json enable HTML flow highlighting; fix additional-state configuration in layered_dispatcher_sample and refresh enterprise golden JSON.
Co-authored-by: Cursor <cursoragent@cursor.com>
Expanded REST endpoints share the same controller method, so class/method matching grouped unrelated call chains; prefer entry point name when present and cover with enterprise HTML tests.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add FlowStep with backward-compatible JSON (strings or objects), precompute linkKey in HTML export, and document precise flow highlighting in flows.json.
Co-authored-by: Cursor <cursoragent@cursor.com>
Embed linkKey on matchedTransitions in HTML metadata so explorer highlighting uses the same SVG #link_* suffix as PlantUML, avoiding JS/Java format drift while keeping golden JSON unchanged.
Co-authored-by: Cursor <cursoragent@cursor.com>
AMBIGUOUS_WIDEN call chains with matched transitions now appear in the sidebar with an Ambiguous link badge, use dashed highlight styling, and participate in endpoint hover when link keys are available.
Co-authored-by: Cursor <cursoragent@cursor.com>
HtmlExporter now propagates event/state formats into PlantUML anchors and template.js buildLinkKey, with layered-dispatcher and fqn regression tests guarding endpoint highlight consistency.
Co-authored-by: Cursor <cursoragent@cursor.com>
Machine-scoped transition/state labels and polymorphic event harvesting now use context-aware canonicalizeLabel so ambiguous import-style enum names are not rewritten during export or validation.
Co-authored-by: Cursor <cursoragent@cursor.com>
Switch-arm equality now requires compatible enum types when both sides are package-qualified, while still accepting import-style vs FQN pairs like DomainCommand.ORDER_PAY.
Co-authored-by: Cursor <cursoragent@cursor.com>
requireCanonical and event matching now use context-aware enum checks so ambiguous import-style identifiers are not falsely rewritten during export validation.
Co-authored-by: Cursor <cursoragent@cursor.com>
Property placeholders on JSON re-export now qualify through applyResolution with CodebaseContext so ambiguous enum names fail closed instead of guessing without bindings.
Co-authored-by: Cursor <cursoragent@cursor.com>
Stop rewriting trigger events in TriggerPoint construction; qualify with context during property resolution and export. Upgrade heuristic simple names to JDT binding FQNs for user types only, preserving java.* platform types.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use machine event type and CodebaseContext for trusted valueOf widen checks and resolveLinkResolution, and apply context-aware enum type matching when expanding symbolic polymorphic placeholders.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use label-only canonicalization for shared-infrastructure triggers, resolve valueOf enum types from JDT bindings when available, and allow trusted valueOf widens using the machine event type when the trigger omits type FQNs.
Co-authored-by: Cursor <cursoragent@cursor.com>
Stop rewriting polymorphic events in TriggerPoint construction without ambiguity context; canonicalize labels at link time while preserving type FQNs for shared-infrastructure routing.
Co-authored-by: Cursor <cursoragent@cursor.com>
Reject import-style polymorphic candidates when deciding whether an ambiguous valueOf widen is machine-scoped and safe to link.
Co-authored-by: Cursor <cursoragent@cursor.com>
Stop rewriting OrderEvent.PAY to the machine package when the simple name is ambiguous, and apply the same guard when capping polymorphic events to configured transitions.
Co-authored-by: Cursor <cursoragent@cursor.com>
Pass CodebaseContext into StrictFqnMatchingEngine so import-style OrderEvent.PAY
cannot match a.OrderEvent.PAY when OrderEvent is ambiguous across packages.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use package-aware simple-name compatibility in VariableTracer and preserve
case-insensitive field-to-type matching only when the simple name is unambiguous.
Co-authored-by: Cursor <cursoragent@cursor.com>
Reject cross-package class matching and enum parameter compatibility when
types share an ambiguous simple name but differ by package-qualified FQN.
Co-authored-by: Cursor <cursoragent@cursor.com>
When an interface simple name is ambiguous, resolve FQN implementation
lookups within the requested package only, and stop capping polymorphic
candidates to machine transitions by constant name across enum types.
Co-authored-by: Cursor <cursoragent@cursor.com>
Do not backfill polymorphic events from configured transitions when a
trigger is ambiguous without enum-member constraints, and block symbolic
inference when the symbolic type simple name is ambiguous across packages.
Co-authored-by: Cursor <cursoragent@cursor.com>
Scope bare polymorphic enum constants to the trigger parameter type (fail
closed on ambiguous simple names and cross-enum constant names), and fail
closed on runtime valueOf widens unless every candidate is package-qualified
for the trigger's declared event type.
Co-authored-by: Cursor <cursoragent@cursor.com>
Block expandSymbolicPolymorphicEvents from widening <SYMBOLIC: OrderEvent.*>
when the simple type name is ambiguous across packages, and emit symbolic
markers from the call graph when enum values cannot be resolved.
Co-authored-by: Cursor <cursoragent@cursor.com>
Remove direct enumValuesMap scan in expandDeclaredEnumValues so ambiguous
OrderEvent-style names fail closed instead of picking an arbitrary package.
Co-authored-by: Cursor <cursoragent@cursor.com>
Ensures the call graph and linker fail closed when multiple enums share the same simple name across packages and bindings are unavailable.
Co-authored-by: Cursor <cursoragent@cursor.com>
Prevent getImplementations("Name") from widening to unrelated classes when multiple types share the same simple name across packages.
Co-authored-by: Cursor <cursoragent@cursor.com>
Track enum name collisions during scan and refuse to resolve enum values by simple name when multiple enums share the same identifier across packages.
Co-authored-by: Cursor <cursoragent@cursor.com>
When inferring missing trigger sourceState from the transition table, preserve enum type context (Type.CONST) so different state enums sharing a constant name do not collapse into a single inferred source.
Co-authored-by: Cursor <cursoragent@cursor.com>
Require parameter-name or setter-name agreement when inferring a field qualifier from constructor/autowired parameter annotations, preventing false-positive routing for multi-bean StateMachine<String,String> injections.
Co-authored-by: Cursor <cursoragent@cursor.com>
Allow BooleanConstraintEvaluator to substitute simple routing-key bindings like order.pay while avoiding accidental substitution of variable names.
Co-authored-by: Cursor <cursoragent@cursor.com>
Tighten CallGraphPathFinder heuristic matching to avoid cross-class linking when only method names are available and class ownership is unknown.
Co-authored-by: Cursor <cursoragent@cursor.com>
Ensures record component access (req.type()) flows into sendEvent() consistently between heuristic and JDT call-graph engines.
Co-authored-by: Cursor <cursoragent@cursor.com>
Ensures public field access (req.type) flows into sendEvent() consistently between heuristic and JDT call-graph engines.
Co-authored-by: Cursor <cursoragent@cursor.com>