Repository navigation
UTS: make history's time-range test detect an ignored range, and fix the RSL2b labels - #588
Open
owenpearson wants to merge 2 commits into
Open
owenpearson wants to merge 2 commits into
owenpearson wants to merge 2 commits into
Conversation
The four assertions in history.md's time-range test only say what each window contains. The unfiltered page contains both batches, so all four hold for a client that drops `start`, `end` or both. Assert that every item in each window carries that window's name prefix, which an ignored `end` fails in the early window and an ignored `start` fails in the late window. Also assert `min_late_ts > max_early_ts`, the premise the 2ms wait exists to establish, so a same-millisecond pair of batches fails on the premise rather than on the window checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
features.md has RSL2b1 as `start`/`end`, RSL2b2 as `direction` and RSL2b3 as `limit`. Both history.md files had these rotated by one. Integration tier: direction forwards becomes RSL2b2, the limit parameter RSL2b3 and the time range RSL2b1, with their Test IDs. Unit tier: default direction becomes RSL2b2. The limit parameter becomes RSL2b3, joining default-limit-hundred-0, so it takes the -1 suffix and moves below that section to keep the suffix in file order; the section is otherwise unchanged. Channel names follow the new points. The time range test's heading now names RSL2b1; its Test ID keeps the parent RSL2, which is less specific but not wrong. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the two defects reported in #549:
rest/integration/history.md's time-range test passes whenstartandendare ignored, and the threeRSL2bsections in bothhistory.mdfiles are filed under the wrong sub-point.1. The time-range test now fails when the range is ignored
The test builds an early and a late window from server-assigned timestamps, but its four assertions only say what each page contains: each is non-empty, the early page has an
early*name and the late page alate*name. An unfiltered page contains both batches, so all four hold for a client (or server) that dropsstart,endor both. The test was green when the range was ignored.The assertions now:
min_late_ts > max_early_tsfirst. This is the premise the 2 ms wait exists to establish and the boundary arithmetic depends on. If both batches land in one millisecond, the test fails here and not on a window check that could never hold.ANYchecks withALL: every item in the early window starts withearly, and every item in the late window withlate. Thelength >= 1checks stay, soALLcan't pass on an empty page. The UTS pseudocode has noNONEidiom, so this usesALLrather than theNONElines suggested in the issue.Both window checks are needed, because each mutation fails only one of them:
ALLearly in early windowALLlate in late windowstartandendstartend(Evaluated against the sandbox timestamps measured in #549. The issue's sandbox runs also confirm the server filters both bounds exclusively, so the new assertions pass against a correct client.)
SDKs need to re-derive this test. ably-js (
uts-integrationbranch), ably-dotnet (AIT-1378/uts-integration) and ably-cocoa (main) all carry the original four assertions verbatim, so they pass whether or not theirstart/endreach the request. ably-python already asserts the premise and the exclusions locally, under aUTS SPEC ERRORcomment.2. The
RSL2bsections are filed under the points they testfeatures.mddefines RSL2b1 asstart/end, RSL2b2 asdirectionand RSL2b3 aslimit. Both history files had these rotated by one.rest/integration/history.md): direction forwards moves to RSL2b2, the limit parameter to RSL2b3 and the time range to RSL2b1. The heading, Test ID and "Spec requirement" line change for each.rest/unit/channel/history.md):default-limit-hundred-0was already correctly under RSL2b3 and keeps its id, so the limit test takes the-1suffix. The section also moves belowdefault-limit-hundred-0, so the suffix follows file order. Its content is unchanged (git diff --color-movedshows a pure move plus relabels).rest/unit/RSL2/history-time-range-1stays as it is:RSL2is the parent point, so it's less specific than it could be but not wrong. Without this, no unit test would be filed under RSL2b1.The
Spec points:lines already list RSL2b1–b3 and haven't changed, nor hascompletion-status.md.Old → new Test IDs (5)
This follows the policy in #539: a Test ID is renamed only when its spec point names a different requirement, and parent-family ids stay as they are. SDK repos can apply this table mechanically to their
UTS:tags.rest/integration/RSL2b1/history-direction-forwards-0rest/integration/RSL2b2/history-direction-forwards-0rest/integration/RSL2b2/history-limit-parameter-0rest/integration/RSL2b3/history-limit-parameter-0rest/integration/RSL2b3/history-time-range-0rest/integration/RSL2b1/history-time-range-0rest/unit/RSL2b1/default-direction-backwards-0rest/unit/RSL2b2/default-direction-backwards-0rest/unit/RSL2b2/limit-parameter-0rest/unit/RSL2b3/limit-parameter-1No other Test ID changes.
Interaction with other PRs
#538 also edits
rest/unit/channel/history.md, but only the mock-infrastructure path near the top of the file. It touches a different hunk, so the two merge cleanly.Closes #549
🤖 Generated with Claude Code