{"draft":null,"from":151,"to":152,"files":[{"path":"server/scale/README.md","added":53,"removed":0,"diff":"--- /dev/null\n+++ b/server/scale/README.md\n@@ -0,0 +1,53 @@\n+# Scale harness\n+\n+`scale.mjs` plays many agents across many projects against an abso open server (`server/`). It talks HTTP directly, as\n+the client does, so one machine can stand in for thousands of agents. Each project is its own Durable Object and its\n+own Artifacts repo, so total pushes a second should grow with the number of projects while each project's own latency\n+stays flat.\n+\n+## Run it\n+\n+```sh\n+# The token: ABSO_TOKEN, or a file. It is never printed.\n+ABSO_TOKEN=... node server/scale/scale.mjs --server https://abso.<you>.workers.dev --projects 10 --agents 5\n+node server/scale/scale.mjs --server https://abso.<you>.workers.dev --token-file ~/.abso-open/token --ramp\n+```\n+\n+Locally: `cd server && npm run dev` (`wrangler dev --local`, with `ABSO_TOKEN` in `.dev.vars`), then\n+`--server http://127.0.0.1:8787`.\n+\n+| Option | Default | What it does |\n+|---|---|---|\n+| `--server` | (required) | The server's URL. |\n+| `--projects` | 10 | Projects in the stage. |\n+| `--agents` | 5 | Agents per project. |\n+| `--rounds` | 3 | Edit, record and push rounds per agent. |\n+| `--overlap` | 0.2 | The share of rounds that edit one of the first lines of a shared file, `hot.txt`, instead of the agent's own file, so some pushes are held. |\n+| `--prefix` | `scale-<run id>` | Project names: `<prefix>-<stage>-p<n>`. |\n+| `--ramp` | off | Runs 1×1, 10×5, 50×10, 100×10 and 200×20 in order, one results file per stage, and stops early when errors pass 2%. |\n+| `--concurrency` | 256 | Requests in flight at once, across every agent. When requests a second come near this divided by the latency, the harness is the limit, not the server: raise it (the first ramp used 800). |\n+| `--max-seconds` | 240 | No new rounds start after this many seconds in a stage. |\n+| `--artifacts-sample` | 5 | Projects whose push out to Artifacts is timed. |\n+| `--artifacts-wait` | 180 | Seconds to wait for that push out. |\n+| `--token-file` | | Read the token from this file instead of `ABSO_TOKEN`. |\n+| `--out` | `server/scale/results` | Where the results files go. |\n+\n+## What each agent does\n+\n+1. Joins (`POST a/<agent>/sync`) and says what it is starting on (`a/<agent>/starting`).\n+2. Each round, edits its own file `agents/<agent>.txt`. With the overlap chance, it pulls and changes a line of `hot.txt`\n+   instead. It records the file (`a/<agent>/record`), pushes (`a/<agent>/publish`) and reads its news (`a/<agent>/news`).\n+3. A held push pulls and pushes again once with both sides kept, as `abso push --as-is` does after a pull.\n+\n+Each project starts with `init` and one binary file uploaded to `blobs/<sha256>`.\n+\n+## What it measures\n+\n+- Each operation's latency: p50, p95, p99 and max, in milliseconds.\n+- Pushes a second, overall and per project.\n+- Held pushes, and how many were still held after the retry.\n+- Errors by operation and status code.\n+- Time to Artifacts: for a sample of projects, it polls `GET /p/<project>/out` until `pushed.version` reaches shared's\n+  version. The server pushes out at most once a minute per project, so expect up to about a minute.\n+\n+The results are JSON in `results/` (summaries, not per-request logs), and a Markdown summary is printed."}],"unmatched":[]}