plugrl_client.cpp: probe mode (SPEC 8.1) and the close reasons, checked in CI - #9
Merged
Merged
Conversation
…the checker sees what a client does with each action and how it handles closes The passive checker watched one connection and could not tell chunk-summed reward, terminal observations, time-major order, metadata-first, the close reasons or text frames from their violations. With --probe the client runs a probe env whose observation counts steps and echoes the applied action, and the checker drives the connection: it speaks late, sends a 2 MiB metadata frame, closes for a resync, stops the run, and answers with a text frame. raw_client.py implements the probe env, and its --bug option breaks each clause in turn; tests/test_conformance_probe.py checks that each is named.
…fter Found by the probe checker itself, on Linux, in about one run in two of the resync scenario: when the server's resync close arrived while the feedback was being sent, the send raised, the reset after it never ran, and env 0 carried its finished episode onto the next connection (t = 7, 11, 15 for an episode of 3). The packed feedback already holds the terminal observation, so resetting first changes nothing the server sees.
…ed in CI in every scenario `plugrl_client --probe host port batch` runs the probe environment, executes each chunk time-major and flushes it at the terminal step, and handles the section 7 close reasons: it reconnects after plugrl-server-resync with nothing resent, exits 0 on plugrl-server-stop, and exits 2 on a text frame. A close now raises ServerClosed with its code and reason, and a text frame TextFrame, instead of one generic error. Passive mode is unchanged.
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.
The C++ reference client gets the probe mode that #8 gave the Python one, so both reference clients are checked against the stricter checker on every change. Stacked on #8: merge #8 first.
plugrl_client --probe host port batchruns the SPEC 8.1 probe environment until the server stops the run.ServerClosedwith its status code and reason, parsed as RFC 6455 lays it out, instead of a generic "server closed the connection". A text frame raisesTextFrame. In probe mode:plugrl-server-resyncreconnects with nothing resent;plugrl-server-stopexits 0;dtype=<f8,first values: 0 0 0 1 0 0) still hold.plugrl-conformance --probe --scenario all.Checked on Linux (guangzhao, g++ with
-Wall -Wextra):textnote both reference clients have.