fix(substance_v4): replace update_metadata diff params with keyword args#514
Conversation
Code ReviewIssues Found
Mentions
Summary1 bug found. The |
Remove the current_metadata/updated_metadata pair — callers no longer need to supply existing state. The method now accepts individual keyword args for each updatable field, fetches current state internally, and only touches the fields explicitly provided. Custom metadata dict values follow the same semantics: only listed keys are affected, None deletes. Also promotes _UnsetType/_UNSET sentinel from chat_sessions.py to core/shared/types for reuse across collections.
271e249 to
317ee34
Compare
…sing scalar fields SubstanceV4Info has extra="allow" so API-omitted null fields are absent from the instance. getattr without a default raised AttributeError.
@claude addressed both the issues, fixing a broken interface is fix not a feat. |
|
Claude finished @prasad-albert's task in 48s —— View job Code Review Update
Both issues are resolved: Bug fix confirmed — Title convention — Agreed. Per AGENTS.md, No remaining issues. |
Summary
current_metadata/updated_metadatapair fromupdate_metadata— callers no longer need to supply existing stateLotCollection.update,InventoryCollection.update, etc.)metadatadict follows the same rule (only listed keys affected,Nonevalue deletes a field)_UnsetType/_UNSETsentinel fromchat_sessions.pytocore/shared/typesso it can be reused across collectionsdocs/examples/substance_v4.mdwith examples for each metadata field type (string, single-select, multi-select, delete)