Skip to content

UTS: rest/unit housekeeping fixes - #538

Open
owenpearson wants to merge 1 commit into
mainfrom
fix/uts-housekeeping
Open

owenpearson wants to merge 1 commit into
mainfrom
fix/uts-housekeeping

Conversation

@owenpearson

@owenpearson owenpearson commented Sep 21, 2026

Copy link
Copy Markdown
Member

Fixes the seven housekeeping faults in uts/rest/unit/ described in #532. All changes are confined to uts/.

Checklist

  • 1. Leaked developer path — Replaced /Users/paddy/data/worknew/dev/dart-experiments/uts/rest/unit/rest_client.md with the repo-relative uts/rest/unit/rest_client.md in all six offenders (channel/publish.md, channel/history.md, channel/idempotency.md, encoding/message_encoding.md, presence/rest_presence.md, types/paginated_result.md), matching the convention already used by their one-level-down neighbours. Preserved each file's existing "defined in" / "described in" wording.
  • 2. Missing Test IDs — Added the six suggested IDs immediately after their headings: RSAN2a/delete-post-annotation-delete-0, RSAN3b/get-sends-get-0, RSAN3c/get-returns-paginated-result-0, RSAN3b/get-params-querystring-1 (all in channel/annotations.md), and RSL6a3/msgpack-fixtures-decode-0 / RSL6a3/msgpack-fixtures-round-trip-1 (in encoding/msgpack_interop.md).
  • 3. Duplicate RSC17 test — Dropped the byte-identical second ## RSC17 - ClientId Attribute section (client-id-matches-auth-1). The clientId-from-token case it was meant to cover is already tested by RSA7b - clientId from TokenDetails in auth/client_id.md, so writing a token-based test here would only duplicate that; the surviving client-id-from-options-0 section already asserts client.clientId == client.auth.clientId.
  • 4. Misfiled Realtime tests — Moved the REC3, REC3a, REC3b connectivity-check sections out of rest/unit/fallback.md into a new uts/realtime/unit/connection/connectivity_check_test.md, reindexing their IDs to the realtime/unit/... category. Dropped REC3, REC3a, REC3b from the fallback.md header spec-points list.
  • 5. RSN3b/RSN3c header claim — Dropped both from channels_collection.md:3; no get(name, options) call exists anywhere in uts/, so there is nothing to test (and RSN3c is soft-deprecated).
  • 6. RSC7b header claim — Dropped from rest_client.md:3; RSC7b is superseded by RSC7d per features.md, so a test would be wrong to write. Left the umbrella RSC7 in place (its children RSC7c/d/e are tested).
  • 7. RSC18 over-specified timing — Rewrote RSC18/basic-auth-over-http-rejected-1 to accept failure at either construction or request time: it now constructs the client, attempts a request, and asserts an error surfaced by the time the request would have gone out with no request reaching the mock. Also removed the non-spec-derived error.code == 40103 assertion arm (keeping the message-based arms), since 40103 does not appear in features.md.

Item 7 caveat

The issue notes 40103 is absent from features.md. Per this PR's scope I did not edit specifications/. The UTS-side resolution (loosening the assertion and dropping the un-derived error-code check) is done here. If constructor-time failure or the 40103 code is intended to be normative, that belongs in a separate features.md change to RSC18/RSA1.

Files changed

  • uts/rest/unit/channel/publish.md, history.md, idempotency.md
  • uts/rest/unit/encoding/message_encoding.md, msgpack_interop.md
  • uts/rest/unit/presence/rest_presence.md
  • uts/rest/unit/types/paginated_result.md
  • uts/rest/unit/channel/annotations.md
  • uts/rest/unit/channels_collection.md
  • uts/rest/unit/rest_client.md
  • uts/rest/unit/fallback.md
  • uts/realtime/unit/connection/connectivity_check_test.md (new)

Merge order

PR 7 of 7 — merge LAST. It touches fallback.md and rest_client.md (shared with the mock-HTTP PR) and several files shared with other PRs in the batch, so rebase after the rest of the batch has merged.

Closes #532

🤖 Generated with Claude Code

Removes a leaked absolute developer path, adds missing Test IDs, resolves a
duplicate RSC17 test, relocates misfiled Realtime tests, corrects bad header
claims (RSN3b/c, RSC7b), and loosens an over-specified RSC18 timing assertion.

Closes #532

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

This branch was successfully deployed

1 active deployment
staging/pull/538 6bd34bf7 Deployed Sep 21, 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

1 participant