Skip to content

Let proof proxy record a client as the start of a profile - #5

Merged
bbatsov merged 1 commit into
mainfrom
proxy-record
Oct 8, 2026
Merged

bbatsov merged 1 commit into
mainfrom
proxy-record

Conversation

@bbatsov

@bbatsov bbatsov commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Writing a client profile meant copying requests out of the -v transcript by hand. -record writes them as a draft profile instead, with the request ids dropped and the client's sessions named, so the draft replays as is. Each step waits for its reply, so requests sent while another one is still running (stdin, interrupt) still have to be edited out.

Writing a client profile starts with finding out what the client sends,
which meant copying requests out of the -v transcript by hand. -record
saves them as a client profile instead, with a check for each connection
and a step for each request. The steps leave out the request ids, as
proof gives requests ids of its own, and the sessions the client cloned
get names (across connections, as sessions outlive them), so the steps
use the sessions proof clones. What's left is reading the client's code
to see what it needs from each reply.

proof serve gets -record as well, since it grades clients the same way.
The recording is written even when the JSON report can't be, as getting
the client to do it all again isn't always easy.

Only the session field of a step stands for a session now, so code that
starts with $ goes to the server as it is.
@bbatsov
bbatsov merged commit b3dac21 into main Oct 8, 2026
4 checks passed
@bbatsov
bbatsov deleted the proxy-record branch October 8, 2026 08:44
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