Skip to content

[test] Remove redundant circular reference TODO test #1148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions test/subgraph/SubgraphNode.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,7 @@ describe("SubgraphNode Execution", () => {
})

it("should prevent infinite recursion", () => {
// TODO: This test is currently skipped because cycle detection has a bug
// The fix is to pass 'visited' directly instead of 'new Set(visited)' in SubgraphNode.ts:299
// Cycle detection properly prevents infinite recursion when a subgraph contains itself
const subgraph = createTestSubgraph({ nodeCount: 1 })
const subgraphNode = createTestSubgraphNode(subgraph)

Expand Down Expand Up @@ -402,21 +401,6 @@ describe("SubgraphNode Execution", () => {
})

describe("SubgraphNode Edge Cases", () => {
it.todo("should detect circular references", () => {
// TODO: This test is currently skipped because cycle detection has a bug
// The fix is to pass 'visited' directly instead of 'new Set(visited)' in SubgraphNode.ts:299
const subgraph = createTestSubgraph({ nodeCount: 1 })
const subgraphNode = createTestSubgraphNode(subgraph)

// Add subgraph node to its own subgraph (circular reference)
subgraph.add(subgraphNode)

const executableNodes = new Map()
expect(() => {
subgraphNode.getInnerNodes(executableNodes)
}).toThrow(/while flattening subgraph/i)
})

it("should handle deep nesting", () => {
// Create a simpler deep nesting test that works with current implementation
const subgraph = createTestSubgraph({
Expand Down