Spec points
- RSAN1c4: "If `idempotentRestPublishing` is enabled and the annotation has an empty `id`, the SDK should generate a base64-encoded random string, append `:0`, and set it as the `Annotation.id`."
- RSC22d: "If `idempotentRestPublishing` is enabled, then RSL1k1 should be applied (to each `BatchPublishSpec` separately)."
Observed behaviour
Only `RestChannel.publish()` generates idempotent IDs (via the `allEmptyIds()` / `idempotentRestPublishing` code path). Neither `RestAnnotations.publish()` nor `batchPublish()` generates them — messages are sent exactly as provided by the caller, with no `id` fields added.
Failing tests (2)
| Test |
Expected |
Actual |
| `RSAN1c4 - idempotent ID generated` |
Annotation `id` matches `:0` pattern |
`id` is undefined |
| `RSC22d - batch publish generates idempotent IDs` |
Messages in batch have generated `id` fields |
`id` property absent |
Reproduction
```bash
RUN_DEVIATIONS=1 npx mocha --grep "RSAN1c4" test/uts/rest/channel/annotations.test.ts
RUN_DEVIATIONS=1 npx mocha --grep "RSC22d" test/uts/rest/batch_publish.test.ts
```
From PR #2191, branch `uts-rest`.
┆Issue is synchronized with this Jira Task by Unito
Spec points
Observed behaviour
Only `RestChannel.publish()` generates idempotent IDs (via the `allEmptyIds()` / `idempotentRestPublishing` code path). Neither `RestAnnotations.publish()` nor `batchPublish()` generates them — messages are sent exactly as provided by the caller, with no `id` fields added.
Failing tests (2)
Reproduction
```bash
RUN_DEVIATIONS=1 npx mocha --grep "RSAN1c4" test/uts/rest/channel/annotations.test.ts
RUN_DEVIATIONS=1 npx mocha --grep "RSC22d" test/uts/rest/batch_publish.test.ts
```
From PR #2191, branch `uts-rest`.
┆Issue is synchronized with this Jira Task by Unito