pepe-http 0.55.2 → 0.56.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,136 @@ 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.56.0](https://github.com/omarmhaimdat/pepe/compare/v0.55.2...v0.56.0) - 2026-10-26
10
+
11
+ ### Added
12
+
13
+ - *(serve)* pepe over HTTP, with workers and schedules ([#236](https://github.com/omarmhaimdat/pepe/pull/236))
14
+
15
+ Stacked on #235, which brings the guardrails and the numbers onto
16
+ `master`. Retarget this to `master` once that merges, rather than
17
+ merging it into `fix/guardrails`.
18
+
19
+ This is the API from all three phases of the design
20
+ (`docs/design/serve.md`). The web UI isn't in it. The docs are
21
+ `docs/serve.md`, also built into the docs site.
22
+
23
+ ## What
24
+
25
+ - **`pepe serve`.** Every run is a child `pepe`, under the server's
26
+ guardrails, the project's `pepe.toml` and the machine's settings. pepe's
27
+ own `--dry-run` checks each request first, so the guardrails decide
28
+ exactly as they do on the command line.
29
+ - **Same arguments as MCP.** A request takes the MCP tools' arguments,
30
+ so a value is never read as a flag.
31
+ - **Not taken over the API:** `webhook`, `slack`, `otlp`, `svg`, and
32
+ files outside the project.
33
+ - **Locked down by default:**
34
+ - It listens on loopback only.
35
+ - A token is required, either made and printed, or read with its names
36
+ from `--token-file`.
37
+ - Off loopback, it refuses to start without `--allow-host` and all three
38
+ caps.
39
+ - `--max-runs` (default 1) and an audit log in
40
+ `.pepe/serve/audit.jsonl`.
41
+ - **Runs:**
42
+ - Start one, or `dry_run` for the plan.
43
+ - List runs, and read one's state and report.
44
+ - Watch it live as Server-Sent Events, resumable from `Last-Event-ID`.
45
+ - Get its report as `json`, `html`, `md`, `txt` or `csv`.
46
+ - Pause, resume, stop, and change concurrency. A ping can be stopped and
47
+ still gives its report.
48
+ - **Tests:** list, read, save (as JSON keys or TOML), delete, their
49
+ recorded runs (shared with `pepe history`), `compare` with an optional
50
+ gate, and the report schemas.
51
+ - **Schedules:** a saved test every so often, at most once a minute. A
52
+ schedule that comes due while the server is full is skipped and says so.
53
+ - **Workers:**
54
+ - **Joining:** `pepe worker --join URL --name eu-1` dials out over a
55
+ WebSocket, so it works from behind NAT. `src/ws.rs` gains the server
56
+ side.
57
+ - **Splitting:** `"workers": "all"` or a list of names shares the count,
58
+ concurrency and rate among them.
59
+ - **Guardrails:** each worker runs its share under its own guardrails.
60
+ - **Merging:** each share returns its report with the latency histogram
61
+ whole (hidden `--histogram`), and the server adds them bucket by bucket,
62
+ so the merged p99 is exact.
63
+ - **`--events FILE`:** any run as JSON lines (start, progress each
64
+ second, anomalies, steering, the report last). It hooks into the
65
+ existing webhook calls, so every mode has it, with a ping progress line
66
+ of its own.
67
+
68
+ ## Checked end to end
69
+
70
+ Against the benchmark server, with a server in a scratch project, two
71
+ workers and a `pepe.toml` allowing only 127.0.0.1:
72
+
73
+ | | |
74
+ | --- | --- |
75
+ | No token, wrong token | 401 |
76
+ | `localhost` under `allow-host = ["127.0.0.1"]` | 422, "localhost isn't
77
+ an allowed host" |
78
+ | `webhook` in a request; `"file": "/etc/passwd"` | 400 each |
79
+ | `--listen 0.0.0.0` with no `max-rate` | refuses to start, naming
80
+ `--max-rate` |
81
+ | A 3 s run at 200/s | 600 requests; events: start, progress ×4, report,
82
+ end; `Last-Event-ID: 3` resumes at 4 |
83
+ | Pause, resume, concurrency 2, stop | each a `steered` event; the
84
+ report says interrupted |
85
+ | A third run under `--max-runs 2` | 429 |
86
+ | A ping, then pause; then stop | 409 "can be stopped, not steered";
87
+ then stopped with its report |
88
+ | A test saved as JSON, run twice, compared | both recorded under
89
+ `.pepe/runs/`, compare says `same` |
90
+ | 40,000 requests at 8 on `"workers": "all"` | 20,000 each; merged 158k
91
+ req/s, `exact_percentiles: true` |
92
+ | `-c 8` on a worker started with `--max-concurrency 4` | its share
93
+ refused by its own guardrail |
94
+ | A worker killed mid-run | the run ends on the other share, failing,
95
+ naming the one that left |
96
+ | A schedule every 60 s | it ran as `schedule:s1` |
97
+
98
+ 455 tests pass and clippy is clean. New tests cover tokens, the
99
+ off-loopback rule, events, merging (two shares whose p99 only the merged
100
+ histogram gets right, checked against the run schema), schedules, the
101
+ handshake key (the RFC's example), splitting, and the join URL.
102
+
103
+ ## Costs and limits
104
+
105
+ - **Binary size:** 8.38 → 9.05 MB (+8%), for hyper's server, its body
106
+ types and this code.
107
+ - **Distributed runs** are plain runs only, for now (a URL, or a saved
108
+ test of one); the other modes run on the server.
109
+ - **Orphaned shares:** a worker's process killed outright leaves its
110
+ share's child running to the end of its count or time. Every run is
111
+ bounded, so it can't run forever.
112
+
113
+
114
+
115
+ ### Fixed
116
+
117
+ - the guardrails and the numbers, onto master ([#235](https://github.com/omarmhaimdat/pepe/pull/235))
118
+
119
+ #233 (guardrails) and #234 (numbers) were merged into their stacked
120
+ bases (`perf/generator` and `fix/guardrails`), not into `master`, so
121
+ neither is in `master` or a release yet. This brings both onto `master`,
122
+ with master merged in. Both were already reviewed in their own PRs.
123
+
124
+ It also carries one fix to #233:
125
+
126
+ - **The MCP `run` tool sent nothing.** #233 put a `--` before a tool
127
+ call's URL, so a value starting with a dash couldn't be read as a flag.
128
+ But after a `--`, a plain run reads a curl command (`--curl -- curl …`),
129
+ so the URL went there and the run had nothing to send.
130
+ - **The fix:** what isn't a flag goes as it is now, and one that starts
131
+ with a dash is refused. A new test parses each tool's command the way
132
+ pepe will.
133
+ - **Checked through `pepe mcp`:** the `run` tool sends its 50 requests,
134
+ and a target of `--allow-host=127.0.0.1` is refused.
135
+
136
+ 442 tests pass, clippy is clean.
137
+
138
+
9
139
  ## [0.55.2](https://github.com/omarmhaimdat/pepe/compare/v0.55.1...v0.55.2) - 2026-10-24
10
140
 
11
141
  ### Performance