@@ -46,12 +46,15 @@ def post(
4646 unresolved inputs, so callers can distinguish "no data yet" from "clean".
4747 purl_errors: when ``True`` (``→ purlErrors``), the server includes per-purl
4848 error rows for malformed/unresolvable inputs. ``None`` omits the param.
49- strict: client-side guard. When ``True``, compares the ``purl`` of each
50- requested component against the ``inputPurl``/``purl`` of the returned
51- rows and raises :class:`~socketdev.exceptions.APIPartialResponse` (with a
52- ``missing`` list) if any requested purl is absent from the response. This
53- surfaces partial batches even without ``alerts=True``. Only components that
54- carry a ``purl`` string are checked.
49+ strict: client-side guard. When ``True``, compares the exact ``purl`` string
50+ of each requested component against the returned ``inputPurl`` (or the
51+ ``purl`` fallback). The API defines ``inputPurl`` as the original,
52+ unmodified input before server normalization, so canonicalized ``purl``
53+ values do not cause false omissions. Raises
54+ :class:`~socketdev.exceptions.APIPartialResponse` (with a ``missing``
55+ list) if any requested purl is absent from the response. This surfaces
56+ partial batches even without ``alerts=True``. Only components that carry
57+ a ``purl`` string are checked.
5558 **kwargs: forwarded verbatim into the query string (back-compat passthrough for
5659 any params not yet promoted to first-class arguments).
5760
@@ -127,9 +130,11 @@ def post(
127130 def _raise_on_missing (components : list , results : list ) -> None :
128131 """Raise APIPartialResponse if any requested component purl is absent from results.
129132
130- Only components exposing a ``purl`` string are checked; the batch API echoes the
131- request identifier back as ``inputPurl`` (falling back to ``purl``), including
132- under ``value`` for typed ``purlError`` stream records.
133+ Only components exposing a ``purl`` string are checked. The batch API contract
134+ defines ``inputPurl`` as the original, unmodified input string before server-side
135+ normalization, so matching it exactly preserves the caller's identity even when
136+ the response's canonical ``purl`` differs. ``purl`` is retained as a fallback,
137+ and typed ``purlError`` stream records carry ``inputPurl`` under ``value``.
133138 """
134139 requested = [
135140 c ["purl" ]
0 commit comments