Commit d73544df authored by kzangeli's avatar kzangeli
Browse files

fix(LdContextNotAvailable): extend 503→504 to 043_01/051_05/053_05 + comment ignored jsonldContext



Addresses review comments on this MR.

1. Sweep for tests asserting 503 against LdContextNotAvailable. Beyond
   028_07_02 (already fixed in this branch), the only three remaining are:
   - 043_01.robot — bumps ${expected_status_code} (covers all 5 tests).
   - 051_05.robot — status + paired "Service Unavailable" reason phrase
     → "Gateway Timeout".
   - 053_05.robot — status only.
   Verified: 043_01_01..05 and 053_05_01 PASS; no other 503 +
   LdContextNotAvailable pairings remain in the suite.

2. Document why `jsonldContext` stays in the ignore list as a temporary
   cross-broker workaround. TS 104-175 § 10.5.2.4 actually mandates
   auto-initialisation ("If not present, the jsonldContext field shall
   be initialized with the @context applicable for the Subscription"),
   but implementations don't all comply yet. See spec-doubts.md #16
   (the related subscription-vs-CSR fallback asymmetry). The ignore —
   and matching fixture omission of jsonldContext — should be removed
   once implementations converge on the spec's mandate.

   notificationTrigger does NOT need ignoring: every subscription-shaped
   expectation specifies it explicitly and the broker echoes user values,
   so deep-diff matches. !269's removal of notificationTrigger from the
   (previously dead-quoted) ignore list is correct as-is.

Co-Authored-By: default avatarClaude Opus 4.7 <noreply@anthropic.com>
parent d56b0681
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ Resource ${EXECDIR}/resources/JsonUtils.resource


*** Variables ***
${expected_status_code}=        503
${expected_status_code}=        504
${building_filename}=           building-unretrievable-context.jsonld
${subscription_filename}=       subscriptions/subscription-unretrievable-context.jsonld
${tea_filename}=                bus-temporal-representation-unretrievable-context.jsonld
+1 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ Create Initial @context condition from an external server
    Stop @context Local Server

    ${response}=    Delete a @context    ${uri}    true
    Check Response Status Code    503    ${response.status_code}
    Check Response Status Code    504    ${response.status_code}

Delete Initial @context condition from an external server
    Log    Delete initial contidions
+2 −2
Original line number Diff line number Diff line
@@ -31,8 +31,8 @@ ${uri} /api/v1/context.jsonld

    ${response}=    Delete a @context    ${uri}    true

    Check Response Status Code    503    ${response.status_code}
    Check Response Reason set to    ${response.reason}    Service Unavailable
    Check Response Status Code    504    ${response.status_code}
    Check Response Reason set to    ${response.reason}    Gateway Timeout
    Check Response Body Containing ProblemDetails Element
    ...    ${response.json()}
    ...    ${ERROR_TYPE_LD_CONTEXT_NOT_AVAILABLE}
+9 −0
Original line number Diff line number Diff line
@@ -277,6 +277,15 @@ Check Response Body Containing List Containing Subscription elements
    # after a notification has been delivered; the regex is scoped to the notification object
    # so the subscription-level status and notificationTrigger stay verified. (The previous
    # entries were double-quoted and never matched DeepDiff's single-quoted paths.)
    # `jsonldContext` is ignored as a temporary cross-broker workaround.
    # TS 104-175 § 10.5.2.4 actually MANDATES auto-initialisation:
    #     "If not present, the jsonldContext field shall be initialized
    #      with the @context applicable for the Subscription."
    # But implementations don't all comply yet — some emit nothing, others
    # emit a defaulted URL. See spec-doubts.md #16 (the related fallback
    # asymmetry between subscription and CSR). Drop this ignore — and
    # update fixtures to specify the expected initialized value — once
    # implementations converge on the spec's mandate.
    ${ignored_keys}=    Create List
    ...    ${context_regex_expr}
    ...    jsonldContext