Skip to content

fix(schema): dataset create/update body is contract-invalid — FE sends model_parameters/processing_functions/draft_id which evaluation_set_schema (additionalProperties:false) forbids #135

@IsraelTraigent

Description

@IsraelTraigent

Summary

The dataset create/update request body the portal actually sends is invalid against the contract: datasets/evaluation_set_schema.json is additionalProperties:false and does not define model_parameters, processing_functions, or draft_id, yet the FE create/update form sends all three. This is the opposite drift direction from #123 (there the contract requires fields the client can't send; here the client sends fields the contract forbids). The backend is loose and ignores them today, so the contract is over-strict AND wrong-by-omission.

Evidence

  • Contract (schema v4.5.0 @ f295109): datasets/dataset_schema.json (the POST/PUT /datasets body) is an allOf over evaluation_set_schema.json, which has additionalProperties:false (:251) and whose properties (:146-241) do not include model_parameters, processing_functions, or draft_id.
  • Frontend (@frontend fe-035, TraigentFrontend @87615d2b): buildBenchmarkSubmissionData (CreateBenchmark.tsx:289-298) builds {description,name,label,type,use_case,examples,model_parameters,processing_functions} + conditional generator_config/evaluator_config (:302-307), draft_id (:308-309), id (edit only); POSTed raw to /datasets / PUT /datasets/:id (:1023-1030).
  • Backend (@backend be-014): create_benchmark requires only [name,type,label] and validates loosely — it ignores the extra keys (does not 422). So the runtime works; the published contract does not describe it.

Impact

A consumer validating the real portal create/update body against the contract (hybrid validation, codegen, a strict gateway, a future strict BE) rejects a legitimate payload. The contract neither documents the optional model_parameters/processing_functions/draft_id fields nor allows them.

Fix direction

Add model_parameters, processing_functions, draft_id (and confirm generator_config/evaluator_config) as optional properties on the dataset create schema, or split a create-request schema with additionalProperties:true for forward-compat. Coordinate with #123 (introduce a Create-request schema that omits server-generated id/examples_count and admits these client fields).

Acceptance Criteria

  • The dataset create/update contract accepts model_parameters, processing_functions, draft_id.
  • The real FE create payload validates against the contract.

Contributing surfaces

  • @Schema — contract omits the fields + additionalProperties:false (sc-042).
  • @frontend — sends them (fe-035, CreateBenchmark.tsx:289-309).
  • @backend — loose, ignores extras (be-014).

Related

Pairs with #123 (create/resource conflation), #124 (datasets catalog). Session 2026-06-12-dev-portal-interaction-map-e2e (sc-042).

Metadata

Metadata

Assignees

Labels

area:cloudCloud portal and SaaS platformbugSomething isn't workingpriority:mediumP2 — planned work

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions