Skip to content

Conversation

@krewenki
Copy link

what

  • Add cycle protection to module autoplanning graph builder so self-referential and cyclic modules don’t recurse forever.
  • Include fixtures for self-import and mutual module cycles and add regression tests to modules_test.go.
  • Keep project membership propagation intact while short-circuiting revisits.

why

  • Autoplan module indexing was re-entering already-loaded modules, leading to stack overflows when a module imported itself or formed a cycle.
  • Cycle guard plus regression tests prevent the crash and cover both self and mutual dependency cases.

tests

  • GOCACHE=/Users/warren.krewenki/src/.gocache go test ./server/events -count=1

references

@dosubot dosubot bot added bug Something isn't working go Pull requests that update Go code labels Dec 12, 2025
@krewenki krewenki force-pushed the krewenki/autoplan-infinite-loop branch from 5100915 to f392e53 Compare December 12, 2025 17:01
@krewenki krewenki changed the title Prevent autoplan module recursion cycles fix(events): prevent autoplan module recursion cycles Dec 12, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 14, 2025
@krewenki krewenki force-pushed the krewenki/autoplan-infinite-loop branch from f392e53 to 3c5fdf8 Compare December 14, 2025 19:58
@krewenki
Copy link
Author

@lukemassa - Thanks for the review. I wanted to clarify: Is there anything else for me to do here or will it be merged by someone on the team when they're ready to incorporate it?

@lukemassa
Copy link
Contributor

@lukemassa - Thanks for the review. I wanted to clarify: Is there anything else for me to do here or will it be merged by someone on the team when they're ready to incorporate it?

Nothing from me; at this point a maintainer will either merge or comment with questions/concerns

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working go Pull requests that update Go code lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Autoplan module indexing stack overflows when a module imports itself

2 participants