Skip to content

Let proof serve behave like a whole server - #3

Merged
bbatsov merged 2 commits into
mainfrom
serve-like
Oct 8, 2026
Merged

bbatsov merged 2 commits into
mainfrom
serve-like

Conversation

@bbatsov

@bbatsov bbatsov commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

-like jank turns on every scenario jank does, for any server proof has a profile for, and the tests hold each server's scenarios to its column of the compatibility matrix.

Probing the servers to fill those in showed that no-stdin was wrong about Basilisp: it reads its own stdin, so it only returns an empty string right away when started in the background. ClojureCLR does the same but returns nil, and jank throws, which is now its own scenario.

no-stdin said reading input gets an empty string right away, like on
Basilisp. That's only half the story. Basilisp and ClojureCLR have no
stdin op and read their own stdin instead, so reading input waits for
the server's terminal, or gets the end of input right away when the
server was started in the background (an empty string on Basilisp, nil
on ClojureCLR). no-stdin now gets nil, which is what Clojure gives at
the end of input, and names ClojureCLR as well.

jank doesn't have a stdin op either, but its read-line throws ("TODO:
port read-line"), which a client sees as an eval error rather than a
value. That's the new read-line-throws scenario.

ClojureCLR also has no interrupt op, and the version it puts in
versions is a plain string, like Babashka's.
Testing a client against something like jank meant looking up which
scenarios jank does and listing them all. Now -like jank turns them on
at once, and the same goes for every other server proof has a profile
for. More scenarios can follow as before (e.g. -like jank byte-writes).

Each scenario lists the profiles of the servers that do it, and that's
where -like gets them from. The tests make sure each server's scenarios
get its column of the compatibility matrix, apart from eval.no-code
(clients always send some code) and the checks dialtone's and
repartee's profiles skip for their languages, and that Who names every
server a scenario lists.

proof list shows which scenarios each server gets. As the flag package
stops at the first scenario, a flag after one now gets a hint that
flags go first instead of an unknown scenario error.
@bbatsov
bbatsov merged commit 05c9c7c into main Oct 8, 2026
4 checks passed
@bbatsov
bbatsov deleted the serve-like branch October 8, 2026 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant