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>
Resolve static map lookups along the call path, guard enum widening when
keys are bound, and add isolation tests for warmed-cache map routing.
Co-authored-by: Cursor <cursoragent@cursor.com>
Ensure abstract-type getter resolution merges subclass field values and trace indexed accessors on the requesting type, and extract terminal payloads from chained flatMap sendEvent calls.
Co-authored-by: Cursor <cursoragent@cursor.com>
Derive transition and state rawName from package-canonical fullIdentifier so JSON exports stay consistent when bare constants or mismatched short forms appear in source.
Co-authored-by: Cursor <cursoragent@cursor.com>
Propagate path bindings while exploring CallEdge constraints in CallGraphPathFinder so impossible dispatch arms are skipped before chain assembly, with inheritance fallback preserved for polymorphic resolution.
Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve property placeholders before call-chain linking, skip phantom routing states and lifecycle triggers from transition matching, dedupe exported states, and add golden JSON audit regression plus HTML lifecycle endpoint display.
Co-authored-by: Cursor <cursoragent@cursor.com>