Skip to content

Comments

Bugfix/globalagentscreation#720

Open
Bionic711 wants to merge 2 commits intoDevelopmentfrom
bugfix/globalagentscreation
Open

Bugfix/globalagentscreation#720
Bionic711 wants to merge 2 commits intoDevelopmentfrom
bugfix/globalagentscreation

Conversation

@Bionic711
Copy link
Collaborator

Fixes the issue when creating global agents resulting from a validator that does not follow $refs.

@Bionic711 Bionic711 assigned Bionic711 and unassigned Bionic711 Feb 18, 2026
@Bionic711 Bionic711 added the bug Something isn't working label Feb 18, 2026
@Bionic711 Bionic711 requested a review from Copilot February 18, 2026 23:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes an agent validation issue where creating global agents failed with a PointerToNowhere: '/definitions/OtherSettings' error. The root cause was that the validator was incorrectly pointed at a sub-schema (schema['definitions']['Agent']) instead of the root schema, which stripped the shared definitions and broke JSON Schema $ref resolution. The fix updates validate_agent() to use the root schema with a proper RefResolver.

Changes:

  • Updated agent validation logic to use root schema and RefResolver for proper $ref resolution
  • Incremented application version from 0.237.011 to 0.237.049
  • Added comprehensive fix documentation

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
application/single_app/json_schema_validation.py Modified validate_agent() to use root schema with RefResolver instead of sub-schema
application/single_app/config.py Updated VERSION from "0.237.011" to "0.237.049"
docs/explanation/fixes/AGENT_SCHEMA_REF_RESOLUTION_FIX.md Added complete documentation of the fix including root cause, solution, and testing approach
Comments suppressed due to low confidence (2)

application/single_app/json_schema_validation.py:22

  • The conditional logic here may not work as intended. The check schema.get("$ref") and schema.get("definitions") will be true for the agent.schema.json (which has both), but the fix should apply unconditionally since the schema always has this structure. The else branch creates a validator without a resolver, which is the root cause of the bug being fixed. Consider simplifying this to always use the resolver when definitions exist, or remove the conditional entirely since agent.schema.json always has this structure.
    if schema.get("$ref") and schema.get("definitions"):
        validator = Draft7Validator(schema, resolver=RefResolver.from_schema(schema))
    else:
        validator = Draft7Validator(schema)

application/single_app/config.py:91

  • The version number jumps from 0.237.011 to 0.237.049, skipping many versions. According to the coding guidelines, only the third set of digits should be incremented by one. The version should be 0.237.012 instead of 0.237.049.
VERSION = "0.237.049"

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants