Skip to content

UTS: correct wrong/nonexistent spec-point references in rest/unit Test IDs - #539

Open
owenpearson wants to merge 4 commits into
mainfrom
fix/uts-spec-point-references
Open

owenpearson wants to merge 4 commits into
mainfrom
fix/uts-spec-point-references

Conversation

@owenpearson

@owenpearson owenpearson commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

Several UTS Test IDs in uts/rest/unit cite spec points that name the wrong requirement or don't exist in features.md. This PR files those tests under the correct existing spec points and updates completion-status.md and the file tree in writing-test-specs.md to match. No assertions change, and features.md is not edited.

Renaming policy

Test IDs are copied into derived tests in ably-python, ably-js, Dart and .NET, so every rename means tag edits in those repos. A Test ID is renamed only when its spec point names a different requirement. A type-level id (TD1, TK1, TE1) or a parent-family id (TI, RSL1k) is less specific than it could be, but it isn't wrong. Those Test IDs stay as they are. Only their section headings and the spec-point lists name the more specific point.

Old → new Test IDs (10)

SDK repos can apply this table mechanically to their UTS: tags. No other Test ID changes.

Old Test ID New Test ID
rest/unit/RSA10e/authorize-saves-params-0 rest/unit/RSA10g/authorize-saves-params-0
rest/unit/RSA10g/authorize-updates-token-details-0 rest/unit/RSA16c/authorize-updates-token-details-0
rest/unit/RSA10h/authorize-replaces-auth-options-0 rest/unit/RSA10e/authorize-replaces-auth-options-0
rest/unit/RSA10j/authorize-replaces-existing-token-0 rest/unit/RSA10a/authorize-replaces-existing-token-1
rest/unit/RSA10l/authorize-error-propagated-0 rest/unit/RSA10i/authorize-error-propagated-1
rest/unit/RSL1k2/message-id-format-0 rest/unit/RSL1k1/message-id-format-1
rest/unit/RSL1k2/serial-increments-batch-1 rest/unit/RSL1k1/serial-increments-batch-2
rest/unit/RSL1k3/unique-base-ids-0 rest/unit/RSL1k1/unique-base-ids-3
rest/unit/RSL1k3/no-id-when-disabled-1 rest/unit/RSL1k1/no-id-when-disabled-4
rest/unit/RSL1k2/same-id-on-retry-2 rest/unit/RSL1k1/same-id-on-retry-5

The -<n> suffix is the 0-based index within a spec point in the file, so it changes when a test joins a spec point that already has tests (RSA10a, RSA10i, RSL1k1).

Why each one changes

Old id What the test asserts New id
RSA10e (authOptions with a means of getting a token) tokenParams passed to authorize() are stored and reused RSA10g
RSA10g (arguments stored as defaults) auth.tokenDetails holds the new token after authorize() RSA16c
RSA10h (Auth#clientId as default) an authCallback in the authOptions argument is used to get the token RSA10e (its literal text)
RSA10j (signature, arguments supersede) a second authorize() gets a fresh token RSA10a
RSA10l (deprecated authorise alias) a 401 from the token request propagates out of authorize() RSA10i (follows RSA8), as proposed in #575
RSL1k2 / RSL1k3 ×5 (client-supplied ids) library-generated <base>:<serial> ids: their format, serials, a unique base per publish, none generated when the option is disabled, and the same id reused on retry RSL1k1

Kept as is: Test ID unchanged, heading or spec-point list corrected (7)

Test ID Heading now names
rest/unit/TD1/token-details-attributes-0 TD2-TD6 (TD1 is the type; the attribute labels were off by one)
rest/unit/TK1/token-params-attributes-0 TK2, TK2a-TK2e (TK3–TK6 don't exist)
rest/unit/TE1/token-request-attributes-0 TE2-TE5 (the TE2/TE4 swap is fixed)
rest/unit/TI/errorinfo-from-json-0 TI2
rest/unit/TI/ably-exception-wraps-errorinfo-2 TI2
rest/unit/RSL1k/client-id-preserved-0 RSL1k2
rest/unit/RSL1k/mixed-ids-in-batch-1 RSL1k3, reworded to "Mixed client-supplied and absent IDs in batch" (under RSL1k3 the library generates no ids)

The attribute labels inside error_types.md are collapsed to TI1 (TI1, TI4 for href), and the nested-cause test now cites TI1 instead of TI5.

Other changes

  • authorize.md spec points: RSA10h, RSA10j and RSA10l are dropped, because none of them is tested in this file any more, and RSA16c is added.
  • completion-status.md:
    • RSA10 is now Partial (RSA10a, b, e, g, i, k).
    • The RSA16 row also credits authorize.md for RSA16c.
    • TI1–TI6 is Partial: error_types.md covers TI1, TI2 and TI4, and realtime/unit/auth/token_expiry_non_renewable_test.md covers TI5. Nothing tests TI3 or TI6.
    • TK1–TK6 becomes TK1, TK2, TK2a–TK2e.
  • writing-test-specs.md: the file tree's spec points for error_types.md and token_types.md are corrected.
  • Channel names in the renamed idempotency tests now use RSL1k1, as in the RTS4 rename (3f95977).

Interaction with other PRs

Merge order: merge after the mock-HTTP PR (#534, which shares auth/authorize.md) and the publish-body PR (#537, which shares channel/idempotency.md), and rebase after those.

Closes #525

🤖 Generated with Claude Code

…t IDs

Several Test IDs cited spec points that are wrong or absent from features.md
(e.g. TK3-TK6 do not exist). Relabels them to the correct existing spec points
and updates the generated completion-status.md accordingly.

Closes #525

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
owenpearson and others added 2 commits November 27, 2026 13:15
Test IDs are copied into derived tests in several SDKs, so a rename has a
downstream cost. Keep the renames where the old id names a different
requirement, and revert those where the old id is coarse but not wrong:
the type-level ids TD1, TK1 and TE1, and the parent-family ids TI and
RSL1k. Their section headings keep the more specific spec point.

File the authOptions test under RSA10e rather than RSA10j. It asserts that
an authCallback in the authOptions argument is used to obtain the token,
which is RSA10e's text, and it avoids a second RSA10j/...-0 id once #541
lands. RSA10j is no longer tested in this file, so it leaves the spec
points list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- error_types.md: the nested-cause test cited TI5, which is about log
  entries; the cause attribute is TI1.
- authorize.md: the RSA10l test checks that a token request error
  propagates out of authorize(), which RSA10i covers through RSA8;
  RSA10l is the deprecated authorise alias (see #575). Refile it as
  RSA10i/...-1 and drop RSA10l from the spec points list.
- completion-status.md: RSA10 is only partly covered, and authorize.md
  also covers RSA16c. Restore TI3, TI5 and TI6 to the ErrorInfo row,
  attributing TI5 to the realtime test that covers it.
- writing-test-specs.md: correct the spec points in the file tree for
  error_types.md and token_types.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Under RSL1k3 the library generates no ids when any message in the batch
has one, so the batch mixes client-supplied and absent ids, not client
and library ids. The Test ID is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
staging/pull/539 — 1567f0cf Deployed Nov 27, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

uts/rest/unit: tests filed under spec point ids that name the wrong requirement or do not exist, and completion-status.md inherits the error

1 participant