Skip to content

[P2] Action-param value-shape parity net: assert every FORM_FIELD_TYPES param round-trips to the endpoint contract #2714

Description

@os-zhuang

Why

Since #2700 / ADR-0059, ActionParamDialog routes every param through the shared form field-widget renderer (paramToField()getLazyFieldWidget). That was the whole win — but it also means each param now emits its widget's own value shape, and those shapes differ:

#2700's acceptance list explicitly called for value-shape parity coverage ("confirm each round-trips to what the action runner/endpoint expects; add coverage"), but no test net pins it today. Without one, a future widget swap can silently change a param's emitted shape and break an endpoint's input contract with no failing test.

Scope

  • A table/test net (mirroring the paramToField drift test's style) asserting, for each FORM_FIELD_TYPES type usable as a param, the shape the dialog emits on confirm (primitive vs. object vs. array; multiple → array).
  • Pin the known contracts that endpoints rely on: number→number, boolean→boolean, date→string, select→string, select+multiplestring[], lookup→id(s).
  • Document the emitted-shape table (README / ADR-0059 addendum) so param authors know what a type:'X' param will POST.

Explicitly out of scope (owned elsewhere)

Acceptance

  • A test fails if any param type's emitted value shape changes unexpectedly.
  • The emitted-shape contract is documented.

Refs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions