pepe-http 0.55.2 → 0.57.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,237 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
8
  ## [Unreleased]
9
+ ## [0.57.0](https://github.com/omarmhaimdat/pepe/compare/v0.56.0...v0.57.0) - 2026-10-26
10
+
11
+ ### Added
12
+
13
+ - *(serve)* pepe in a browser, every mode, in the front page's look ([#239](https://github.com/omarmhaimdat/pepe/pull/239))
14
+
15
+ #236 merged the server's API, but the browser page was pushed to its
16
+ branch after the merge, so none of it reached `master` or v0.56.0. This
17
+ brings those five commits onto `master`, unchanged: the diff against
18
+ `master` is exactly theirs.
19
+
20
+ ## What
21
+
22
+ `pepe serve` serves a page at `/`. The link the server prints opens it
23
+ already signed in.
24
+
25
+ - **Every mode runs from the browser, with all its options:**
26
+ - A load test, or a pasted curl command turned into one.
27
+ - OpenAPI: upload a spec, then pick its endpoints from a list.
28
+ - A flow written step by step in the browser, or an uploaded flow file.
29
+ - An access log uploaded and replayed against a base URL.
30
+ - Ping and ramp.
31
+ - For every mode: limits, timeout, threads, TLS, keep-alive, redirects,
32
+ compression, User-Agent, proxy, and values from a CSV.
33
+ - **The plan comes first:** each run's plan can be checked before
34
+ anything is sent.
35
+ - **A run, live:** its curves, its verdict as it forms, and pause,
36
+ resume, concurrency and stop. A finished run shows its mode's own
37
+ breakdown: per endpoint, flow step, replayed URL, ramp step or ping
38
+ target.
39
+ - **The other pages:** runs, saved tests and their history, schedules,
40
+ compare and workers.
41
+ - **The homepage's look:** cream and ink, square ink-outlined panels
42
+ with hard shadows, the lime and gold checker, headlines with a word
43
+ selected as in a terminal, the modes grid, and the light and dark
44
+ palettes with a toggle.
45
+ - **Phone width:** no page scrolls sideways.
46
+ - **Fonts:** Geist and Geist Mono (latin, variable from 400 to 600, 52
47
+ KB) are in the binary under the SIL Open Font License 1.1
48
+ (`src/serve/ui/fonts/OFL.txt`). The page always uses them and loads
49
+ nothing from elsewhere.
50
+
51
+ ## Safety
52
+
53
+ - **The token:**
54
+ - The page keeps it for the tab and removes it from the address bar.
55
+ - It's sent in a header.
56
+ - Live events are read through `fetch`, because `EventSource` can't send
57
+ a header.
58
+ - **Reports:** each opens as a plain link with a ticket for that run
59
+ alone that expires in 10 minutes (`POST /api/runs/ID/ticket`). A report
60
+ page runs no scripts.
61
+ - **Page policy:** scripts, calls and fonts come from this server only,
62
+ and the page can't be framed. A test checks the script never sets
63
+ markup, so nothing a target sends back becomes HTML.
64
+
65
+ The server gains what the page needs:
66
+
67
+ - **Uploads:** `PUT /api/files/NAME` into the project, up to 256 MB.
68
+ - **Helpers:** `GET /api/spec?file=` and `POST /api/curl`.
69
+ - **Run options:** `no_keepalive`, `no_redirects`, `no_compression` and
70
+ `user_agent`, for the MCP tools too.
71
+ - **`save` refused:** it is turned away over the API.
72
+
73
+ ## Checked
74
+
75
+ - **Every mode from the browser:** run from the page against a live
76
+ server, steering included. The pane checked phone and desktop widths and
77
+ both themes, the fonts were confirmed loaded and in use, and the console
78
+ was clean.
79
+ - **Tests:** 459 pass, clippy is clean with warnings as errors, and
80
+ rustfmt is clean.
81
+ - **Binary:** 9.05 → 9.23 MB with the page, its faces and the fonts.
82
+
83
+
84
+
85
+ ### Other
86
+
87
+ - *(nix)* update flake.lock ([#237](https://github.com/omarmhaimdat/pepe/pull/237))
88
+
89
+ Automated changes by the
90
+ [update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock)
91
+ GitHub Action.
92
+
93
+ ```
94
+ Flake lock file updates:
95
+
96
+ • Updated input 'nixpkgs':
97
+ 'github:NixOS/nixpkgs/fe13242281a67641c0102cdb1087f0ebe586c7df?narHash=sha256-zp8ToDMnqZcu4o4IH9pdwXFXGp7yLm/M0dEnNWnyd7I%3D' (2026-10-15)
98
+ → 'github:NixOS/nixpkgs/3ec636362e1816bc2f0888fa0fa2c69f1bc9e504?narHash=sha256-rZLrzrC6i%2BjnTAlvPZHogKDulY7WWDEv9hJeHieO7Zw%3D' (2026-10-23)
99
+ ```
100
+
101
+ ### Running GitHub Actions on this PR
102
+
103
+ GitHub Actions will not run workflows on pull requests which are opened
104
+ by a GitHub Action.
105
+
106
+ **To run GitHub Actions workflows on this PR, close and re-open this
107
+ pull request.**
108
+
109
+
110
+ ## [0.56.0](https://github.com/omarmhaimdat/pepe/compare/v0.55.2...v0.56.0) - 2026-10-26
111
+
112
+ ### Added
113
+
114
+ - *(serve)* pepe over HTTP, with workers and schedules ([#236](https://github.com/omarmhaimdat/pepe/pull/236))
115
+
116
+ Stacked on #235, which brings the guardrails and the numbers onto
117
+ `master`. Retarget this to `master` once that merges, rather than
118
+ merging it into `fix/guardrails`.
119
+
120
+ This is the API from all three phases of the design
121
+ (`docs/design/serve.md`). The web UI isn't in it. The docs are
122
+ `docs/serve.md`, also built into the docs site.
123
+
124
+ ## What
125
+
126
+ - **`pepe serve`.** Every run is a child `pepe`, under the server's
127
+ guardrails, the project's `pepe.toml` and the machine's settings. pepe's
128
+ own `--dry-run` checks each request first, so the guardrails decide
129
+ exactly as they do on the command line.
130
+ - **Same arguments as MCP.** A request takes the MCP tools' arguments,
131
+ so a value is never read as a flag.
132
+ - **Not taken over the API:** `webhook`, `slack`, `otlp`, `svg`, and
133
+ files outside the project.
134
+ - **Locked down by default:**
135
+ - It listens on loopback only.
136
+ - A token is required, either made and printed, or read with its names
137
+ from `--token-file`.
138
+ - Off loopback, it refuses to start without `--allow-host` and all three
139
+ caps.
140
+ - `--max-runs` (default 1) and an audit log in
141
+ `.pepe/serve/audit.jsonl`.
142
+ - **Runs:**
143
+ - Start one, or `dry_run` for the plan.
144
+ - List runs, and read one's state and report.
145
+ - Watch it live as Server-Sent Events, resumable from `Last-Event-ID`.
146
+ - Get its report as `json`, `html`, `md`, `txt` or `csv`.
147
+ - Pause, resume, stop, and change concurrency. A ping can be stopped and
148
+ still gives its report.
149
+ - **Tests:** list, read, save (as JSON keys or TOML), delete, their
150
+ recorded runs (shared with `pepe history`), `compare` with an optional
151
+ gate, and the report schemas.
152
+ - **Schedules:** a saved test every so often, at most once a minute. A
153
+ schedule that comes due while the server is full is skipped and says so.
154
+ - **Workers:**
155
+ - **Joining:** `pepe worker --join URL --name eu-1` dials out over a
156
+ WebSocket, so it works from behind NAT. `src/ws.rs` gains the server
157
+ side.
158
+ - **Splitting:** `"workers": "all"` or a list of names shares the count,
159
+ concurrency and rate among them.
160
+ - **Guardrails:** each worker runs its share under its own guardrails.
161
+ - **Merging:** each share returns its report with the latency histogram
162
+ whole (hidden `--histogram`), and the server adds them bucket by bucket,
163
+ so the merged p99 is exact.
164
+ - **`--events FILE`:** any run as JSON lines (start, progress each
165
+ second, anomalies, steering, the report last). It hooks into the
166
+ existing webhook calls, so every mode has it, with a ping progress line
167
+ of its own.
168
+
169
+ ## Checked end to end
170
+
171
+ Against the benchmark server, with a server in a scratch project, two
172
+ workers and a `pepe.toml` allowing only 127.0.0.1:
173
+
174
+ | | |
175
+ | --- | --- |
176
+ | No token, wrong token | 401 |
177
+ | `localhost` under `allow-host = ["127.0.0.1"]` | 422, "localhost isn't
178
+ an allowed host" |
179
+ | `webhook` in a request; `"file": "/etc/passwd"` | 400 each |
180
+ | `--listen 0.0.0.0` with no `max-rate` | refuses to start, naming
181
+ `--max-rate` |
182
+ | A 3 s run at 200/s | 600 requests; events: start, progress ×4, report,
183
+ end; `Last-Event-ID: 3` resumes at 4 |
184
+ | Pause, resume, concurrency 2, stop | each a `steered` event; the
185
+ report says interrupted |
186
+ | A third run under `--max-runs 2` | 429 |
187
+ | A ping, then pause; then stop | 409 "can be stopped, not steered";
188
+ then stopped with its report |
189
+ | A test saved as JSON, run twice, compared | both recorded under
190
+ `.pepe/runs/`, compare says `same` |
191
+ | 40,000 requests at 8 on `"workers": "all"` | 20,000 each; merged 158k
192
+ req/s, `exact_percentiles: true` |
193
+ | `-c 8` on a worker started with `--max-concurrency 4` | its share
194
+ refused by its own guardrail |
195
+ | A worker killed mid-run | the run ends on the other share, failing,
196
+ naming the one that left |
197
+ | A schedule every 60 s | it ran as `schedule:s1` |
198
+
199
+ 455 tests pass and clippy is clean. New tests cover tokens, the
200
+ off-loopback rule, events, merging (two shares whose p99 only the merged
201
+ histogram gets right, checked against the run schema), schedules, the
202
+ handshake key (the RFC's example), splitting, and the join URL.
203
+
204
+ ## Costs and limits
205
+
206
+ - **Binary size:** 8.38 → 9.05 MB (+8%), for hyper's server, its body
207
+ types and this code.
208
+ - **Distributed runs** are plain runs only, for now (a URL, or a saved
209
+ test of one); the other modes run on the server.
210
+ - **Orphaned shares:** a worker's process killed outright leaves its
211
+ share's child running to the end of its count or time. Every run is
212
+ bounded, so it can't run forever.
213
+
214
+
215
+
216
+ ### Fixed
217
+
218
+ - the guardrails and the numbers, onto master ([#235](https://github.com/omarmhaimdat/pepe/pull/235))
219
+
220
+ #233 (guardrails) and #234 (numbers) were merged into their stacked
221
+ bases (`perf/generator` and `fix/guardrails`), not into `master`, so
222
+ neither is in `master` or a release yet. This brings both onto `master`,
223
+ with master merged in. Both were already reviewed in their own PRs.
224
+
225
+ It also carries one fix to #233:
226
+
227
+ - **The MCP `run` tool sent nothing.** #233 put a `--` before a tool
228
+ call's URL, so a value starting with a dash couldn't be read as a flag.
229
+ But after a `--`, a plain run reads a curl command (`--curl -- curl …`),
230
+ so the URL went there and the run had nothing to send.
231
+ - **The fix:** what isn't a flag goes as it is now, and one that starts
232
+ with a dash is refused. A new test parses each tool's command the way
233
+ pepe will.
234
+ - **Checked through `pepe mcp`:** the `run` tool sends its 50 requests,
235
+ and a target of `--allow-host=127.0.0.1` is refused.
236
+
237
+ 442 tests pass, clippy is clean.
238
+
239
+
9
240
  ## [0.55.2](https://github.com/omarmhaimdat/pepe/compare/v0.55.1...v0.55.2) - 2026-10-24
10
241
 
11
242
  ### Performance