Skip to content

fix(toolsets): pass visited set by reference to prevent diamond dependency duplication - #2311

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-5d6932ba
Mar 21, 2026
Merged

fix(toolsets): pass visited set by reference to prevent diamond dependency duplication#2311
teknium1 merged 1 commit into
mainfrom
hermes/hermes-5d6932ba

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Cherry-picked from PR #2292 by @Mibayy. Closes #2134.

resolve_toolset() called visited.copy() per sibling include, breaking dedup for diamond dependencies and causing duplicate cycle warnings. Pass by reference so siblings share the same visited set.

…dency duplication

Cherry-picked from PR #2292 by @Mibayy. Closes #2134.

resolve_toolset() called visited.copy() per sibling include, breaking
dedup for diamond dependencies (D resolved twice via B and C paths)
and causing duplicate cycle warnings.

Fix: pass visited directly so siblings share the same set. The .copy()
for the all/* alias at the top level is kept so each top-level toolset
gets an independent pass. Removes the print() cycle warning since
hitting a visited name now usually means diamond (not a bug).
@teknium1
teknium1 merged commit 237499d into main Mar 21, 2026
1 check passed
angelburgosrosado pushed a commit to angelburgosrosado/hermes-agent that referenced this pull request Apr 27, 2026
…5d6932ba

fix(toolsets): pass visited set by reference to prevent diamond dependency duplication
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
…5d6932ba

fix(toolsets): pass visited set by reference to prevent diamond dependency duplication
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…5d6932ba

fix(toolsets): pass visited set by reference to prevent diamond dependency duplication
melon-xf added a commit to melon-xf/hermes-agent that referenced this pull request Sep 3, 2026
…5d6932ba

fix(toolsets): pass visited set by reference to prevent diamond dependency duplication
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(toolsets): resolve_toolset() uses visited.copy() preventing cross-branch deduplication

1 participant