Skip to content

Field Designer save path needs a regression pin: the PUT body must be the object BODY, never the response envelope #4546

Description

@yinlianghui

Follow-up accepted from #4271 / PR #4545's census, filed for the pool (unassigned).

What #4545 found and fixed by side effect: plugin-designer/MetadataFieldsPage.tsx read raw.fields for display and then wrote client.save('object', name, {...state.raw, fields: nextFields}). Under the pre-#4545 contract breach, state.raw was the RESPONSE ENVELOPE ({type, name, item, ...protection fields}), so a Field Designer save persisted the envelope as the object body — a data-corruption path, not just an empty render. The contract repair in #4545 heals it (raw is now the unwrapped body), but nothing PINS the save path's wire shape specifically.

The ask: a focused regression pin on that save path — assert the PUT body is the object body (carries fields, does NOT carry type/name-as-envelope-identity or the protection envelope keys) driving a real MetadataClient over a real-server-shaped fetch, per the pattern PR #4545's suite established (nothing mocks get(); doubles written against the server shape, not the docblock). Rationale for a dedicated pin: this was the highest-severity consumer in the census (silent corruption on a routine save), and the defect class — a test double written against documentation rather than the wire — is exactly what let it hide inside 3,628 green tests.

Small card: one test file in plugin-designer, no product change expected. Refs: #4271, PR #4545.


Generated by Claude Code

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions