Skip to content

fix(fes): validate properties of options objects - #9361

Draft
Ayush4958 wants to merge 1 commit into
processing:mainfrom
Ayush4958:fix/7752-fes-object-properties
Draft

Ayush4958 wants to merge 1 commit into
processing:mainfrom
Ayush4958:fix/7752-fes-object-properties

Conversation

@Ayush4958

@Ayush4958 Ayush4958 commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Resolves #7752

[WIP]

Changes:
When calling p5 func. that take a settings object, FES previously only checked if an object was passed, ignoring any mistakes inside it

  • If a setting has the wrong type (like passing text instead of true or false), FES now points directly to the setting that needs fixing
  • If a setting accepts specific choices (like 'seconds' or 'frames'), FES warns when an invalid value is used.
  • Normal settings objects with extra custom properties still work without false warnings.
  • Added unit tests covering settings objects across the validator.

PR Checklist

- Preserve child properties from JSDoc in convert.mjs and shared-helpers.mjs

- Dynamically construct Zod object schemas for options bag descriptors

- Add structural scoring penalty (+3) to avoid overload tie-breaking against primitives

- Decompose error paths to avoid undefined parameter positions in FES messages

- Add unit tests for options object validation in param_errors.js
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.

[2.0]: Properties of objects aren't being checked correctly by FES

1 participant