Skip to content

fix(tool): guard Object.entries against null in ToolRegistry.state#29369

Open
SpencerJung wants to merge 1 commit into
anomalyco:devfrom
SpencerJung:fix/27456-toolregistry-null
Open

fix(tool): guard Object.entries against null in ToolRegistry.state#29369
SpencerJung wants to merge 1 commit into
anomalyco:devfrom
SpencerJung:fix/27456-toolregistry-null

Conversation

@SpencerJung
Copy link
Copy Markdown

Fixes #27456. Adds null/undefined guards before Object.entries() calls in ToolRegistry.state to prevent crashes when tool modules contain re-exports or unexpected shapes.

@github-actions
Copy link
Copy Markdown
Contributor

ghost commented May 26, 2026

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions
Copy link
Copy Markdown
Contributor

ghost commented May 26, 2026

The following comment was made by an LLM, it may be inaccurate:

Found a potential duplicate:

PR #27512: "fix: add null checks in ToolRegistry to handle re-export barrels"
#27512

This appears to be closely related to PR #29369. Both PRs address adding null checks in ToolRegistry to handle edge cases with re-exports and prevent crashes when tool modules have unexpected shapes. The #27512 PR specifically mentions "re-export barrels" which aligns with the description of the current PR.

You may want to verify if #27512 was already merged and if this PR (#29369) is addressing the same issue or a different occurrence.

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

Labels

needs:compliance This means the issue will auto-close after 2 hours.

Projects

None yet

1 participant