Skip to content

fix: inline registration schema definitions#423

Open
Subharup-31 wants to merge 1 commit into
getsentry:mainfrom
Subharup-31:fix/registration-schema-defs
Open

fix: inline registration schema definitions#423
Subharup-31 wants to merge 1 commit into
getsentry:mainfrom
Subharup-31:fix/registration-schema-defs

Conversation

@Subharup-31
Copy link
Copy Markdown

Summary

  • make registration output schemas a single self-contained JSON Schema resource
  • merge tool/error $defs into the registration wrapper and strip nested $id/$defs from oneOf schemas
  • update structured-output schema tests to assert wrapper-level $defs and no nested schema resources

Closes #419

Testing

  • npm test -- src/core/tests/structured-output-schema.test.ts
  • npm run generate:version && npm run typecheck
  • pre-commit hook: npm run format:check, npm run lint, npm run build

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5c5a61d. Configure here.

.$defs as JsonObject) ?? {}),
},
});
expect((jsonSchema.oneOf as JsonObject[])[0].$defs).toBeUndefined();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Smoke test asserts opposite of new behavior

High Severity

The smoke test in e2e-mcp-discovery.test.ts asserts listSimsOutputSchema?.oneOf?.[0]?.$defs is defined, but the production code change in getMcpOutputSchemaForRegistrationJson now strips $defs from oneOf entries via inlineRegistrationSchemaResource. The unit test explicitly asserts the opposite: oneOf[0].$defs is undefined. This smoke test will fail at runtime because it was not updated to match the new inlining behavior.

Additional Locations (1)
Fix in Cursor Fix in Web

Triggered by project rule: Bugbot Review Guide for XcodeBuildMCP

Reviewed by Cursor Bugbot for commit 5c5a61d. Configure here.

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.

[Bug]: registration.schema.json missing $defs causes PointerToNowhere for all structured-output tools

1 participant