-
Notifications
You must be signed in to change notification settings - Fork 310
schema-based request validation with bounds for contracts endpoints #1196
Copy link
Copy link
Labels
GRANTFOX OSSGrantFox open-source campaign taskGrantFox open-source campaign taskMAYBE REWARDEDMay be rewarded under the GrantFox campaignMay be rewarded under the GrantFox campaignOfficial Campaign | FWC26GrantFox FWC26 official campaignGrantFox FWC26 official campaignTHIRD CAMPAIGNarea:contractscontractscontractspriority:mediumMedium priorityMedium prioritystack:nodejsNode.jsNode.jsstack:typescriptTypeScriptTypeScripttype:refactorRefactor without behavior changeRefactor without behavior change
Description
Activity
Metadata
Metadata
Assignees
Labels
GRANTFOX OSSGrantFox open-source campaign taskGrantFox open-source campaign taskMAYBE REWARDEDMay be rewarded under the GrantFox campaignMay be rewarded under the GrantFox campaignOfficial Campaign | FWC26GrantFox FWC26 official campaignGrantFox FWC26 official campaignTHIRD CAMPAIGNarea:contractscontractscontractspriority:mediumMedium priorityMedium prioritystack:nodejsNode.jsNode.jsstack:typescriptTypeScriptTypeScripttype:refactorRefactor without behavior changeRefactor without behavior change
Summary
contracts inputs are validated inconsistently and some bounds are missing, allowing oversized or malformed payloads through. Add declarative schema validation with explicit bounds at the boundary.
Why this matters
Unvalidated input is a correctness and security risk. Declarative schemas make the contract explicit, consistent, and testable.
Requirements
validation_error(field-level details).Technical guidance
Edge cases — each must have a test
Acceptance criteria
npm run lint,npm test, andnpm run buildall pass locallyCloses #<issue>Out of scope
Rewards
Part of the GrantFox OSS / Official Campaign (FWC26) — this task may be rewarded. PR quality is assessed by AI: depth, correctness under edge cases, meaningful tests, and clean design are what earn the reward. Shallow changes (typos, formatting, trivial docs) do not qualify.