Skip to content

Conversation

@ubik2
Copy link
Contributor

@ubik2 ubik2 commented Sep 18, 2025

Ignore the messy types for now, since I'll do a better job later.
This just gets us through the integration tests.


Summary by cubic

Improved how we merge recipe argument schemas in Runner by hoisting $defs/definitions to the process schema and defaulting missing argument schemas to true. This fixes $ref resolution and unblocks integration tests.

  • Bug Fixes
    • Hoist $defs and definitions from recipe.argumentSchema to the top level of the process cell schema so refs resolve correctly.
    • Set properties.argument to true when argumentSchema is missing, instead of {}.

@ubik2 ubik2 requested a review from mathpirate September 18, 2025 21:49
@mathpirate
Copy link
Contributor

cool! LGTM, thank you so much for noticing this and jumping on it so quickly

i don't really understand this system well yet, so just to be completely sure: this operates at the level of a single schema, meaning that it won't cause name collisions if multiple schemas in a generated program use the same definition names, correct?

@ubik2
Copy link
Contributor Author

ubik2 commented Sep 18, 2025

cool! LGTM, thank you so much for noticing this and jumping on it so quickly

i don't really understand this system well yet, so just to be completely sure: this operates at the level of a single schema, meaning that it won't cause name collisions if multiple schemas in a generated program use the same definition names, correct?

Right, in this case, the top level schema has none of its own definitions, so no chance of conflicts.

Edit: We do have a similar situation with runner.ts generateHandlerSchema, and in that case, we could have a collision between the definitions in the event and the state. To properly handle those, we'd want to rename them and rewrite $refs, but for now, we just assume any collisions are actually the same type (practically, this is probably the case).

@mathpirate
Copy link
Contributor

cool! LGTM, thank you so much for noticing this and jumping on it so quickly
i don't really understand this system well yet, so just to be completely sure: this operates at the level of a single schema, meaning that it won't cause name collisions if multiple schemas in a generated program use the same definition names, correct?

Right, in this case, the top level schema has none of its own definitions, so no chance of conflicts.

awesome, sounds good, excited to try rebasing on this on my branch

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

@ubik2 ubik2 merged commit 985d516 into main Sep 18, 2025
8 checks passed
@ubik2 ubik2 deleted the robin/runner-schema-combination branch September 18, 2025 21:56
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.

3 participants