diff --git a/tests/cursor_lookback_contract.py b/tests/cursor_lookback_contract.py index 9ae14a3..ee9bd0e 100644 --- a/tests/cursor_lookback_contract.py +++ b/tests/cursor_lookback_contract.py @@ -66,6 +66,11 @@ def read_frame(connection, buffered): return payload, buffered +# The sample archive's events are stamped in 2023, so every segment is older +# than now-36h and the floor takes upstream's clamp branch: the MinSeq of the +# freshest SEALED segment. The sample's third segment is left active (unsealed) +# and startup resumes it in place, as upstream's ingest.Open does, so the floor +# is segment 1's min_seq (2001) -- not the active segment's first seq (4001). if MODE == "default": connection, status, headers, buffered = handshake("/subscribe-v2?cursor=1") try: @@ -74,7 +79,7 @@ if MODE == "default": body, _ = read_exact(connection, buffered, length) text = body.decode() assert "subscribe: cursor too old" in text - assert "cursor 1 below lookback floor 4001" in text + assert "cursor 1 below lookback floor 2001" in text finally: connection.close() @@ -83,7 +88,7 @@ if MODE == "default": assert status.startswith("HTTP/1.1 101") payload, _ = read_frame(connection, buffered) event = json.loads(payload) - assert event["time_us"] == 1_700_000_004_001_000 + assert event["time_us"] == 1_700_000_002_001_000 finally: connection.close() elif MODE == "wide":