mirror of
https://github.com/PerpetualSoftware/pad.git
synced 2026-10-26 06:19:49 +00:00
2ef5a5e954
* fix(server): a bulk status or priority change refuses an item whose collection has no such field (BUG-3154) Both callers of bulkFieldUpdate pass a key the SERVER chose: `priority` for set-priority, `status` for a status-only move. Validation walks only declared fields, so on a collection declaring neither, the value was stored as an orphan field no schema-driven surface renders, and the item was listed under `updated` although the operation has no meaning there. bulkFieldUpdate now refuses any change key the item's collection does not declare (items.UndeclaredOverrideKeys, the helper the move override check uses) before reading the blob. The item lands in failed[] with validation_error naming the collection and the field, nothing is written, and the rest of the batch applies. Putting it in bulkFieldUpdate rather than per op closes the class for any future fixed-key op; there are exactly two callers today. Single-item update still ACCEPTS undeclared keys with warnings.undeclared_fields (BUG-2850): there the caller types the key and round-trips whole blobs. Here the caller named an operation. The web lane menu already gates both actions on the schema declaring the field, so no UI path reaches the refusal. WebMCP's pad_item.bulk-update does, so ToolSurfaceVersion goes to 0.44. The entry states that stdio and remote, which issue a per-item PATCH, still accept the key with a warning. Claude-Session: https://claude.ai/code/session_01Vf8uZmYdsrQqJtbAmjUFSX * fix(server): a status override on a bulk collection move refuses a target with no status field (BUG-3154, codex round 1) bulkMoveCollection merges req.Status after MigrateFields, which keeps only target-declared fields, and validation walks only declared fields, so a move into a collection with no `status` field still stored an orphan. It now makes the same per-item refusal against the stripped target schema, the schema the override is validated against. The 0.44 prose now names this path, and says the server-chosen versus caller-typed line belongs to the HTTP doors, not the catalog call. Claude-Session: https://claude.ai/code/session_01Vf8uZmYdsrQqJtbAmjUFSX