Skip to content

v0.1.17

Choose a tag to compare

@bo-unitysvc bo-unitysvc released this 03 May 18:59
· 54 commits to main since this release
ef26394

Highlights

Bugfix release. The _params field that 0.1.14 added to the doc record was rejected as an unknown field by the seller's listing-document schema validator, blocking every cohere submission. Fixed by removing the field — substitution still happens transparently via file_path redirection (the eager-substitution mechanism from 0.1.15 is unchanged).

Also folds in two follow-ups to the notification preset family that were merged after 0.1.16 cut: a looser body check and an optional UNITYSVC_API_KEY so local-mode tests pass against mock.svcmarket.com.

What changed — #36

Drop _params from the doc record (the Cohere-blocking fix)

PR #29 added _params to the record returned by doc_preset as a "downstream consumer can apply substitution" hand-off. PR #34 then made substitution eager via tmp-file redirection, so _params had no functional consumer left.

The dead field broke seller validation:

Schema validation error: {'Connectivity test': {..., '_params':
{'version_prefix': '/compatibility/v1'}, ...}}

The seller schema is a strict allowlist; _params is not on it. Drop the field entirely. Substitution still happens transparently via file_path → tmp file (PR #34's mechanism is unchanged).

Notification preset hardening

  • Loose body check — notification_connectivity previously required "ok" in the response body. Real notification upstreams differ widely (ntfy returns a receipt, mock echoes the request, gateway wraps with its own envelope). Switch to "HTTP 2xx + non-empty body" — lowest common denominator that confirms the upstream accepted the request without locking the preset to one upstream's response shape.
  • Optional UNITYSVC_API_KEY — local-mode test runs don't have the key set. Both notification_connectivity and notification_code_example now follow the same optional-key pattern as the api_* presets: include the Authorization header only if the env var is present.

Tests

104 passing — same as 0.1.16. The _params invariant is now a regression test: test_doc_preset_record_never_carries_params_field.

Compatibility

  • _params removal: only affects callers that were reading _params off the doc record. None known — the field was never documented as a public API and no consumer in the codebase used it.
  • Notification looser body check: pre-0.1.17 sellers using notification_connectivity against an upstream that returns "ok" in the body still pass ("ok" is non-empty). Stricter contracts that depended on the literal "ok" string for "is this notification gateway alive" will get the same pass signal from any non-empty response now.
  • Optional API key: backwards-compatible. Customers continue to supply the key and get the same Authorization header.

Roll-out

If you ship a service that uses parameter substitution (transcription, image-embed, or any future preset that declares parameters = { ... }):

  1. Pin unitysvc-data >= 0.1.17 everywhere it's installed (sellers, Celery worker).
  2. Re-render service listings — the _params field will no longer appear, and the seller schema validator stops rejecting submissions.

For Cohere specifically: re-run python data/cohere/scripts/update_services.py after the bump and re-submit services. The validation error that blocked the entire catalog should clear.