Commit ec05b910 authored by kzangeli's avatar kzangeli
Browse files

Merge branch 'fix/temporal-deleted-scope-null' into integration/all-fixes

# Conflicts:
#	testsuite-doubts.md
parents 1685281d fad5ab03
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
  "scope": [
    {
      "type": "Property",
      "value": [],
      "value": "urn:ngsi-ld:null",
      "deletedAt": "2024-12-19T08:43:32.422444Z"
    }
  ]
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
    "type": "Property",
    "values": [
      [
        [],
        "urn:ngsi-ld:null",
        "2024-12-19T08:48:50.936936Z"
      ]
    ]
+40 −0
Original line number Diff line number Diff line
@@ -3029,6 +3029,12 @@ the kind to Property. Same for **LanguageProperty** (`languageMap`) and
with `… removed` + `type changed from "<kind>" to "Property"`. The broker fix
belongs in its own MR — out of scope for the test-side change.

**Update (2026-06-05):** the broker-side tombstone fix has landed
(kind-preserving tombstone rows + the LanguageProperty `{"@none":
"urn:ngsi-ld:null"}` object form + scope pair-compression in temporalValues
mode); 020_17_02/03 and 020_18_02/03 pass. The two scope tests additionally
needed a fixture correction — see [[#91]].


## 88. DistOps write-op status-code mismatches — 30 tests across 7 patterns, mostly test-side design issues

@@ -3151,3 +3157,37 @@ exposed to this, fragile as a function of payload size.
**Status:** fixed in `fix/csub-status-after-initial-notification`
`compare_dictionaries_ignoring_keys` now passes `threshold_to_diff_deeper=0`
(the pre-8 behaviour: always itemize per key).


## 91. `020_19_01` / `020_20_01` — deleted-scope expectations encode the NGSI-LD Null as `[]`

**Hit:** with the deletedAt-tombstone setup of [[#87]] in place, both scope
tests still fail on the expectation fixtures
(`vehicle-temporal-representation-property-020-19.jsonld` /
`…-020-20.jsonld`), which represent the deleted scope instance as an empty
array:

```json
{ "type": "Property", "value": [], "deletedAt": "…" }      (020-19, normalized)
[ [], "2024-12-19T08:48:50.936936Z" ]                      (020-20, temporalValues pair)
```

**Spec:** TS 104-175 § 4.18 defines the Scope grammar in ABNF and states that
the special string `"urn:ngsi-ld:null"` (the NGSI-LD Null) "shall be **only**
used and **only** appear in case of **deleted scopes**" — i.e. a deleted scope
is represented by that string, and nothing else may represent it:

```abnf
Scope =  [%x2F] ScopeLevel *(%x2F ScopeLevel)
Scope =/ "urn:ngsi-ld:null"        ; the literal string "urn:ngsi-ld:null"
```

An empty array is not derivable from the grammar at all (and § 5.3.2.5's
deletion rule for temporal instances likewise substitutes the NGSI-LD Null,
never an empty container).

**Fix:** in both expectation fixtures, replace the empty-array scope value
with the string `"urn:ngsi-ld:null"`:

- 020-19 (normalized): `"value": "urn:ngsi-ld:null"`
- 020-20 (temporalValues): `[ "urn:ngsi-ld:null", "…" ]`