Files
crossbar/docs/plans/v1/07-smoke-readme.md
T
kyleandClaude Fable 5.1 c457046f8b v1 plan: leases, limiter, chooser, fingerprint, SQLite store, accounting, admin — acceptance tests first, no reference
Every given test compiled against a panic-only interface skeleton (go vet clean); nothing was
implemented. modernc.org/sqlite v1.59.0 vetted in a scratch module (WAL works); go.sum given.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-25 03:10:24 -07:00

54 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# v1 task 07: the smoke run and the README
**Branch:** `v1` (run `git switch v1`; `git status --short` must be empty, otherwise stop)
**Commit subject:** `Smoke run for v1; README for leases, admin and accounting`
## Goal
Prove v1 end to end with the given `tools/smoke.sh` — leases, header route, pin, queue, drain,
failover and recovery, streaming with the usage chunk intact, usage and metrics — and bring the
README up to date.
## Files
- Copy (**replaces** v0's): `tools/smoke.sh`, `cmd/fakeupstream/main.go`
- Modify: `README.md`, `docs/implementer-log.md`
## Steps
- [ ] **1. Copy and run.**
```sh
git switch v1
cp docs/plans/v1/_files/tools/smoke.sh tools/
cp docs/plans/v1/_files/cmd/fakeupstream/main.go cmd/fakeupstream/
make smoke
```
Expected last line: `smoke: ok (stream spread N ms)`, N ≥ 600. The script prints which numbered
check failed and crossbar's log. A failure is a defect in tasks 01–06 **or in the script**: fix
code only when a rule from an earlier task was broken; if the script's expectation contradicts a
task rule, stop and report which.
- [ ] **2. Update `README.md`.** Keep the seven v0 sections; change: the intro (leases, not "first
healthy host"); `## Configure` gets `db`, `lease_idle`, `retention`, `queue_max` in the table and
the new `example.toml`; `## Point clients at it` adds the `X-Crossbar-Route` header
alternative; `## Inspect` becomes `## Operate` and documents all six endpoints with one example
each (`GET hosts`, `GET routes`, `POST routes/{route}` pin and release, `POST hosts/{host}`
drain, `GET usage` JSON and text, `GET metrics`), taken from the smoke run; `## What v1 does not
do`: context-size guard, wake-on-LAN, Tailscale identity, `/slots` — see `PLAN.md` v2.
- [ ] **3. Run the gate.** `make gate`. **4. Log and commit.** Row `v1/07-smoke-readme`, with the smoke line in Notes.
```sh
git add tools/smoke.sh cmd/fakeupstream/main.go README.md docs/implementer-log.md
git commit
```
## Done when
- `make smoke` prints `smoke: ok (…)`; `make gate` prints `gate: ok`; both copied files byte-identical.
## Stop and report if
- `make smoke` fails twice in the same way.