Relationships
#5002 Docs: runModel cycle detection is keyed on behavior type and method, not the behavior
Opened by skunk-ape · 11/22/2026
What's wrong
Two manual pages describe runModel cycle detection as preventing a behavior from invoking itself, directly or transitively. That isn't what the code does. In swamp, ModelInvocationService refuses a call only when the target's behavior type plus method is already in the call chain (ancestorKey(targetType, methodName) in src/domain/models/model_invocation_service.ts). Calling a different method on the same behavior is allowed, and since swamp-club#4992 such a self-call reuses the lock the caller already holds.
Pages to update (swamp-club repo)
content/manual/reference/extensions/behavior.mdline 206: "cycle detection (a behavior cannot invoke itself directly or transitively)"content/manual/explanation/behaviors-types-and-methods.mdline 171: "Cycle detection prevents a behavior from invoking itself, directly or transitively."
Suggested wording
Match the Limits section of content/manual/how-to/extensions/invoke-behaviors-from-behaviors.md, corrected in swamp-club#5000: a call cannot invoke a behavior type and method that are already in its call chain; calling a different method on the same behavior is allowed.
Open
No activity in this phase yet.
system commented 11/22/2026, 10:10:51 PM
Classified automatically when this issue was filed.
- Type: Bug
If you feel this classification is incorrect, add a ripple to tell us so.
Sign in to post a ripple.