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>
Keep package heuristics for single-machine codebases and fail closed only when String/Object generic triggers are provably ambiguous across multiple beans.
Co-authored-by: Cursor <cursoragent@cursor.com>
Move functional-interface checks, cross-frame Supplier resolution, and transition link resolution into dedicated types so call graph and linker share one DRY implementation.
Co-authored-by: Cursor <cursoragent@cursor.com>
When callee code calls eventProvider.get(), walk back to the caller's Supplier argument instead of stopping at the parameter name; also skip Supplier-vs-enum type checks for already-resolved lambda/enum call-site arguments under JDT bindings.
Co-authored-by: Cursor <cursoragent@cursor.com>
Boolean request-param ternaries now expand into true/false binding variants so each call chain resolves a single event instead of AMBIGUOUS_WIDEN. Setter/constructor @Qualifier injection is traced for stateMachineId, and PaymentStateMachineConfig gets a dedicated golden with payment endpoints linked via paymentStateMachine.
Co-authored-by: Cursor <cursoragent@cursor.com>
Extract stateMachineId from @Qualifier on sendEvent receivers, route named beans via @EnableStateMachine before String/String type widening, and extend sourceState detection to SwitchExpression arrow cases.
Co-authored-by: Cursor <cursoragent@cursor.com>
Wire enterprise regression tests for linkResolution, extend REST body enum detection to nested DTOs/records, infer if-branch source states only from provable literals, and fix String/java.lang.String routing equivalence so shared-service scoping stays fail-closed without dropping valid chains.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add InheritanceCallTargetResolver for super/this/implicit dispatch across
call-graph engines, apply transition-ceiling to polymorphic events in
MachineEnumCanonicalizer, and cover JDT parity, deep hierarchy, and
pipeline behavior with new tests plus golden update.
Co-authored-by: Cursor <cursoragent@cursor.com>
Fail closed when enum predicates or polymorphicEvents cannot be resolved, infer candidates from configured transitions, and validate exports that link more transitions than the machine defines.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add generic constraint-aware enum member evaluation, prefer transitions[] over full enum inference, and regression tests for boolean enum dispatchers.
Co-authored-by: Cursor <cursoragent@cursor.com>
Centralizes domain key normalization from config class names so Standard* machines map to ORDER/DOCUMENT/USER consistently.
Co-authored-by: Cursor <cursoragent@cursor.com>
Retire legacy CallGraphBuilder, unify graph building and accessor resolution through shared helpers, and centralize AST/type utilities to cut drift across engines and enrichers.
Co-authored-by: Cursor <cursoragent@cursor.com>
Reduce multi-config call-chain cost by filtering triggers before pathfinding and cache path-binding walks per session, while avoiding debug string work on hot constant-resolution paths.
Co-authored-by: Cursor <cursoragent@cursor.com>