Commit 499aade
feat(client)!: live-verified spec drift batch + verification harness
Reusable harness (``scripts/spec_drift_verify.py`` + per-issue probe
scripts) for running tagged POSTs against a live Katana tenant and
cleaning up afterwards. Every test artifact gets an ``SDT-<date>``
prefix and is recorded in ``/tmp/spec-drift-ledger.jsonl``; a single
``cleanup`` subcommand walks the ledger in reverse and deletes
everything (idempotent — already-deleted rows are skipped).
Spec-drift findings encoded in ``docs/katana-openapi.yaml``:
**#737 — CustomFieldDefinition**
- ``id``: ``integer`` → ``string, format: uuid`` (per README example,
inferred — couldn't live-verify because our API key lacks create
permission on this endpoint, but README is authoritative and the
shape is universal across Katana custom-field surfaces).
- ``field_type``: ``string maxLength: 50`` → new
``CustomFieldType`` enum (``shortText`` / ``number`` /
``singleSelect`` / ``date`` / ``boolean`` / ``url``). Verified
via live-API 422 introspection.
- ``entity_type``: ``string maxLength: 50`` → new
``CustomFieldEntityType`` enum with **19 values** (vs README's
documented 1). Verified via live-API 422 introspection — the
enum spans SalesOrder, SalesOrderRow, ManufacturingOrder*,
PurchaseOrder*, StockAdjustment*, Production*, Customer,
ProductVariant, MaterialVariant, ServiceVariant.
- ``CustomFieldDefinition`` no longer extends ``UpdatableEntity``
because the singleton's ``id`` is a UUID string, not the integer
``BaseEntity`` defines for the rest of the API surface.
``created_at`` / ``updated_at`` are inlined.
**#736 — variant_bin_locations + CreateServiceVariant.sku**
- ``POST /variant_bin_locations`` request body wrapped in array
(``minItems: 1, maxItems: 500``). The endpoint description
already said "accepts up to 500 variant storage bin objects"
but the schema was a single object. Verified via live API:
single-object body returns ``422 must be array``.
- ``CreateServiceVariantRequest.sku`` is no longer required. The
field is nullable. Verified by creating a service variant via
the live API with ``sku`` omitted — server accepted it and
returned ``sku: null``.
**#738 — StockTransferRowRequest.quantity**
- Changed from ``number`` to ``string``. Verified via live-API
422 introspection — sending a JSON number returns
``must be string``. Wire format is a fixed-precision decimal
string (e.g. ``"1.0000000000"``). MCP boundary in
``stock_transfers._build_row_requests`` stringifies the pydantic
``float`` input at the call site.
**#739 — SalesOrderFulfillment**
- No spec change needed. Verified ``sales_order_fulfillment_rows``
IS required on create — local spec is correct, README is stale.
Findings deferred to follow-ups:
- **#734** ``custom_fields`` shape — live API rejects array-shaped
custom_fields with ``must be object`` at both SO and SO-row
create paths; dict-shape is accepted. Local READ schemas use
structured-array shape, which contradicts this. Read-side
verification requires a populated example (tenant has zero
``custom_field_definitions`` and our key can't create them).
Sweeping all the READ schemas is broader than this PR.
- **#736** ``CustomFieldDefinition`` ``options`` shape, ``id`` type
via live API, ``UpdateCustomerRequest.default_billing_id``,
``Operator`` fields — all blocked by either authorization
(custom_field_definitions endpoint) or absence of populated
fixtures on this tenant.
BREAKING CHANGE: ``CustomFieldDefinition.id`` becomes a UUID string
(was integer); ``field_type`` / ``entity_type`` become enums;
``CreateServiceVariantRequest.sku`` is no longer required (callers
omitting it will continue to work, but ``required`` removal is a
schema-level breaking change); ``StockTransferRowRequest.quantity``
becomes a string. The MCP ``stock_transfers`` boundary already
stringifies the input float so MCP callers don't have to.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent aa79747 commit 499aade
23 files changed
Lines changed: 1615 additions & 235 deletions
File tree
- docs
- katana_mcp_server/src/katana_mcp/tools/foundation
- katana_public_api_client
- api
- custom_fields
- variant_default_storage_bin
- models_pydantic/_generated
- models
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7624 | 7624 | | |
7625 | 7625 | | |
7626 | 7626 | | |
7627 | | - | |
| 7627 | + | |
| 7628 | + | |
| 7629 | + | |
| 7630 | + | |
7628 | 7631 | | |
7629 | 7632 | | |
7630 | | - | |
7631 | | - | |
7632 | 7633 | | |
7633 | 7634 | | |
7634 | | - | |
7635 | | - | |
| 7635 | + | |
| 7636 | + | |
| 7637 | + | |
| 7638 | + | |
| 7639 | + | |
| 7640 | + | |
| 7641 | + | |
7636 | 7642 | | |
7637 | 7643 | | |
7638 | 7644 | | |
| |||
10650 | 10656 | | |
10651 | 10657 | | |
10652 | 10658 | | |
| 10659 | + | |
| 10660 | + | |
| 10661 | + | |
| 10662 | + | |
| 10663 | + | |
| 10664 | + | |
| 10665 | + | |
| 10666 | + | |
| 10667 | + | |
| 10668 | + | |
| 10669 | + | |
| 10670 | + | |
| 10671 | + | |
| 10672 | + | |
| 10673 | + | |
| 10674 | + | |
| 10675 | + | |
| 10676 | + | |
| 10677 | + | |
| 10678 | + | |
| 10679 | + | |
| 10680 | + | |
| 10681 | + | |
| 10682 | + | |
| 10683 | + | |
| 10684 | + | |
| 10685 | + | |
| 10686 | + | |
| 10687 | + | |
| 10688 | + | |
| 10689 | + | |
| 10690 | + | |
| 10691 | + | |
| 10692 | + | |
| 10693 | + | |
| 10694 | + | |
| 10695 | + | |
| 10696 | + | |
| 10697 | + | |
| 10698 | + | |
| 10699 | + | |
| 10700 | + | |
| 10701 | + | |
| 10702 | + | |
| 10703 | + | |
10653 | 10704 | | |
10654 | 10705 | | |
10655 | 10706 | | |
10656 | 10707 | | |
10657 | 10708 | | |
10658 | 10709 | | |
10659 | | - | |
10660 | | - | |
10661 | | - | |
10662 | | - | |
10663 | | - | |
10664 | | - | |
10665 | | - | |
10666 | | - | |
10667 | | - | |
10668 | | - | |
10669 | | - | |
10670 | | - | |
10671 | | - | |
10672 | | - | |
10673 | | - | |
10674 | | - | |
10675 | | - | |
10676 | | - | |
10677 | | - | |
10678 | | - | |
10679 | | - | |
10680 | | - | |
10681 | | - | |
10682 | | - | |
10683 | | - | |
10684 | | - | |
10685 | | - | |
10686 | | - | |
10687 | | - | |
10688 | | - | |
10689 | | - | |
10690 | | - | |
10691 | | - | |
10692 | | - | |
10693 | | - | |
10694 | | - | |
10695 | | - | |
10696 | | - | |
10697 | | - | |
10698 | | - | |
10699 | | - | |
10700 | | - | |
10701 | | - | |
10702 | | - | |
10703 | | - | |
10704 | | - | |
10705 | | - | |
10706 | | - | |
10707 | | - | |
| 10710 | + | |
| 10711 | + | |
| 10712 | + | |
| 10713 | + | |
| 10714 | + | |
| 10715 | + | |
| 10716 | + | |
| 10717 | + | |
| 10718 | + | |
| 10719 | + | |
| 10720 | + | |
| 10721 | + | |
| 10722 | + | |
| 10723 | + | |
| 10724 | + | |
| 10725 | + | |
| 10726 | + | |
| 10727 | + | |
| 10728 | + | |
| 10729 | + | |
| 10730 | + | |
| 10731 | + | |
| 10732 | + | |
| 10733 | + | |
| 10734 | + | |
| 10735 | + | |
| 10736 | + | |
| 10737 | + | |
| 10738 | + | |
| 10739 | + | |
| 10740 | + | |
| 10741 | + | |
| 10742 | + | |
| 10743 | + | |
| 10744 | + | |
| 10745 | + | |
| 10746 | + | |
| 10747 | + | |
| 10748 | + | |
| 10749 | + | |
| 10750 | + | |
| 10751 | + | |
| 10752 | + | |
| 10753 | + | |
| 10754 | + | |
| 10755 | + | |
| 10756 | + | |
| 10757 | + | |
| 10758 | + | |
| 10759 | + | |
| 10760 | + | |
| 10761 | + | |
| 10762 | + | |
| 10763 | + | |
| 10764 | + | |
| 10765 | + | |
| 10766 | + | |
| 10767 | + | |
| 10768 | + | |
| 10769 | + | |
| 10770 | + | |
| 10771 | + | |
| 10772 | + | |
| 10773 | + | |
| 10774 | + | |
10708 | 10775 | | |
10709 | | - | |
10710 | | - | |
10711 | | - | |
10712 | | - | |
10713 | | - | |
| 10776 | + | |
| 10777 | + | |
| 10778 | + | |
| 10779 | + | |
| 10780 | + | |
10714 | 10781 | | |
10715 | 10782 | | |
10716 | | - | |
10717 | | - | |
10718 | | - | |
10719 | | - | |
10720 | | - | |
10721 | | - | |
| 10783 | + | |
| 10784 | + | |
| 10785 | + | |
| 10786 | + | |
| 10787 | + | |
| 10788 | + | |
| 10789 | + | |
| 10790 | + | |
| 10791 | + | |
10722 | 10792 | | |
10723 | 10793 | | |
10724 | 10794 | | |
| |||
10734 | 10804 | | |
10735 | 10805 | | |
10736 | 10806 | | |
10737 | | - | |
10738 | | - | |
10739 | | - | |
| 10807 | + | |
| 10808 | + | |
| 10809 | + | |
| 10810 | + | |
| 10811 | + | |
| 10812 | + | |
10740 | 10813 | | |
10741 | | - | |
10742 | | - | |
10743 | | - | |
| 10814 | + | |
| 10815 | + | |
| 10816 | + | |
| 10817 | + | |
| 10818 | + | |
| 10819 | + | |
10744 | 10820 | | |
10745 | 10821 | | |
10746 | 10822 | | |
10747 | | - | |
| 10823 | + | |
| 10824 | + | |
| 10825 | + | |
10748 | 10826 | | |
10749 | 10827 | | |
10750 | 10828 | | |
| |||
10755 | 10833 | | |
10756 | 10834 | | |
10757 | 10835 | | |
10758 | | - | |
| 10836 | + | |
| 10837 | + | |
| 10838 | + | |
| 10839 | + | |
| 10840 | + | |
| 10841 | + | |
| 10842 | + | |
10759 | 10843 | | |
10760 | | - | |
10761 | | - | |
10762 | | - | |
10763 | | - | |
10764 | | - | |
| 10844 | + | |
| 10845 | + | |
| 10846 | + | |
| 10847 | + | |
| 10848 | + | |
10765 | 10849 | | |
10766 | | - | |
10767 | | - | |
10768 | | - | |
10769 | | - | |
| 10850 | + | |
| 10851 | + | |
| 10852 | + | |
| 10853 | + | |
10770 | 10854 | | |
10771 | 10855 | | |
10772 | 10856 | | |
| |||
10801 | 10885 | | |
10802 | 10886 | | |
10803 | 10887 | | |
10804 | | - | |
10805 | | - | |
10806 | | - | |
10807 | | - | |
10808 | | - | |
10809 | | - | |
| 10888 | + | |
| 10889 | + | |
| 10890 | + | |
| 10891 | + | |
| 10892 | + | |
| 10893 | + | |
10810 | 10894 | | |
10811 | | - | |
10812 | | - | |
10813 | | - | |
10814 | | - | |
10815 | | - | |
10816 | | - | |
| 10895 | + | |
| 10896 | + | |
| 10897 | + | |
| 10898 | + | |
| 10899 | + | |
| 10900 | + | |
| 10901 | + | |
| 10902 | + | |
| 10903 | + | |
10817 | 10904 | | |
10818 | 10905 | | |
10819 | 10906 | | |
| |||
12739 | 12826 | | |
12740 | 12827 | | |
12741 | 12828 | | |
12742 | | - | |
12743 | | - | |
| 12829 | + | |
| 12830 | + | |
| 12831 | + | |
| 12832 | + | |
| 12833 | + | |
| 12834 | + | |
12744 | 12835 | | |
12745 | 12836 | | |
12746 | 12837 | | |
| |||
17245 | 17336 | | |
17246 | 17337 | | |
17247 | 17338 | | |
| 17339 | + | |
| 17340 | + | |
| 17341 | + | |
| 17342 | + | |
| 17343 | + | |
17248 | 17344 | | |
17249 | 17345 | | |
17250 | 17346 | | |
17251 | 17347 | | |
17252 | 17348 | | |
17253 | 17349 | | |
17254 | 17350 | | |
17255 | | - | |
| 17351 | + | |
| 17352 | + | |
| 17353 | + | |
| 17354 | + | |
| 17355 | + | |
17256 | 17356 | | |
17257 | 17357 | | |
17258 | 17358 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
292 | 296 | | |
293 | 297 | | |
294 | | - | |
| 298 | + | |
295 | 299 | | |
296 | 300 | | |
297 | 301 | | |
| |||
0 commit comments