kbase / workspace_deluxe

The Workspace Service (WSS) is primarily a language independent remote storage and retrieval system for KBase typed objects (TO) defined with the KBase Interface Description Language (KIDL).
MIT License
1 stars 17 forks source link

Users can set `@metadata` fields in user meta if the souce field isn't set in the object #743

Open MrCreosote opened 3 months ago

MrCreosote commented 3 months ago

Normally @metadata fields in user metadata are populated from the object contents. However, if the object doesn't contain the field in question, the user can submit arbitrary values when saving an object. This could be very confusing for @metadata fields where the value is constrained, like a list length or range, etc.

Change the behavior so the user metadata for an @metadata field is either populated from the object data or not at all. Note that this is a backwards incompatible change and it's not clear what impact this would have on current processes. I suspect minimal but I don't have any evidence along those lines.

The behavior could work several ways:

  1. Throw an error when setting a @metadata field.
  2. Silently ignore the input
  3. 2) by default, with a strict toggle for 1)