Repository navigation
Serve the search attribute registry natively, as published PHP does - #550
Conversation
GET, POST and DELETE /api/search-attributes list, register and remove a namespace's custom definitions for operators, with PHP's rules: trimmed request strings, Laravel's validation messages, reserved system names and aliases, duplicates that keep their type, a per-namespace limit (DW_MAX_SEARCH_ATTRIBUTES, default 100) and protected system attributes. An empty custom map renders as a JSON array, as PHP renders it. A racing duplicate registration is refused as a duplicate rather than a server error. The search-attributes fixture drives two fresh namespaces through the published SDK and raw requests. Start and upsert still refuse attribute values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Parity run 39473462838 failed in one job, mysql-execution (existing-php-mysql-matrix). The native recording of the parallel SDK query-direction cohort got HTTP status 0 (no response) where the contract expects 200: |
…butes # Conflicts: # docs/rust-server-port.md
|
Merged main ( Parity. I cancelled the Shared Server fixtures run for the merged head (39507850761) as a duplicate:
Local check of the merged head. On SQLite, the native lib suite (122) and the execution suite (290, including the three Auto-merge is on for the required checks. |
…butes # Conflicts: # .github/workflows/server-parity.yml # docs/rust-server-port.md # rust/src/runtime/http.rs # scripts/conformance/server-parity/contract.mjs # scripts/conformance/server-parity/probe.php
|
Local checks of the merged head:
The Shared Server fixtures run for this head (39517434159) is left running. Auto-merge stays on. |
|



Part of #325: the search attribute registry, one of the API families the CLI uses that native lacked.
What changes
Native serves the published registry routes, for operators, in the default namespace or a named one:
GET /api/search-attributesPOST /api/search-attributesDELETE /api/search-attributes/{name}They behave as PHP's
SearchAttributeControllerdoes:[], as PHP renders it.TrimStrings). Laravel's validation then applies, with its published messages and error counts. Further refusals:409 name_reserved.409 attribute_already_exists, keeping the original type.DW_MAX_SEARCH_ATTRIBUTES(legacyWORKFLOW_MAX_SEARCH_ATTRIBUTES, default 100) per namespace:422 search_attribute_limit_reached.409 system_attributefor a system attribute,404 attribute_not_foundfor an absent one.When two registrations of one name race, the unique key decides the winner, and native refuses the loser as a duplicate. PHP surfaces that race as a server error.
Not covered
Native start and upsert still refuse search attribute values, so a definition is registry state only. PHP's enforcement of registered types on start, upsert and visibility filters needs its own fixtures.
Evidence
search-attributesdrives two fresh namespaces through the published SDK 2.2.6 and raw requests. It covers the empty and filled listings, trimming, namespace isolation, the duplicate, three reserved names, six invalid bodies, both removal refusals and the 100-definition limit. The contract checks PHP's exact bodies.tests/Unit/ServerParitySearchAttributeContractTest.mjs(17 tests) is added to the CI list.🤖 Generated with Claude Code