@gigzen/populace 1.3.3 → 1.3.4
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/README.md
CHANGED
|
@@ -25,18 +25,19 @@ applying**. Then it hands you a report on what broke.
|
|
|
25
25
|
|
|
26
26
|
---
|
|
27
27
|
|
|
28
|
-
## It has done this to a real
|
|
28
|
+
## It has done this to a real app
|
|
29
29
|
|
|
30
30
|

|
|
31
31
|
|
|
32
|
-
That is
|
|
32
|
+
That is a later run. The first one is the interesting one.
|
|
33
33
|
|
|
34
34
|
### What happened, in plain English
|
|
35
35
|
|
|
36
36
|
On **9 August 2026** we pointed Populace at **Buzz** — a gig-worker platform
|
|
37
37
|
on Android with a live Postgres backend, 17 tables and 48 row-level-security
|
|
38
|
-
policies. It
|
|
39
|
-
|
|
38
|
+
policies. It has since been renamed [**Waggle**](https://shakhtar-sankur.github.io/gigzen/waggle.html).
|
|
39
|
+
It had not launched yet, but it was signed, and it had been through a full manual
|
|
40
|
+
test of every screen by the person who wrote it, and it had passed.
|
|
40
41
|
|
|
41
42
|
We started six simulated drivers: three in **Manila**, three in **Mumbai**. Each
|
|
42
43
|
one signed up for a real account, set a profile, started driving a plausible
|
|
@@ -137,6 +138,20 @@ Two files land in whatever directory you ran it from: `populace-report.json` for
|
|
|
137
138
|
CI, and `populace-report.html`, which is one self-contained page you can email
|
|
138
139
|
to someone who was not watching your terminal.
|
|
139
140
|
|
|
141
|
+
### Or skip the terminal
|
|
142
|
+
|
|
143
|
+
[**Populace Studio**](https://github.com/Shakhtar-Sankur/populace/releases/latest) is
|
|
144
|
+
the same engine in a window, for Windows, with no Node or npm needed. Download the
|
|
145
|
+
installer or the portable build and check it against `SHA256SUMS.txt` on the release.
|
|
146
|
+
Neither is code-signed yet, so Windows SmartScreen will warn before the first launch.
|
|
147
|
+
|
|
148
|
+
Studio shows every simulated person on a world map as they move, and a box per contract
|
|
149
|
+
method with its live latency. A method your adapter implements but the run never called is
|
|
150
|
+
drawn dashed and named in the verdict, so it is not counted as covered. When something breaks,
|
|
151
|
+
Studio shows the failing method and the database's own error text while the run is still
|
|
152
|
+
going. It does not reimplement the engine: every run is the same command a terminal would
|
|
153
|
+
issue, and Studio prints that command.
|
|
154
|
+
|
|
140
155
|
---
|
|
141
156
|
|
|
142
157
|
## Point it at your own app
|
|
@@ -152,7 +167,7 @@ You write **one adapter** — thirteen small methods, each answering "how does
|
|
|
152
167
|
this happen in my app?". Two are required (`createUser`, `deleteUser`);
|
|
153
168
|
everything else is optional and anything you skip is reported as untested rather
|
|
154
169
|
than quietly passing. Full spec in [adapters/contract.md](adapters/contract.md),
|
|
155
|
-
and [adapters/
|
|
170
|
+
and [adapters/waggle.mjs](adapters/waggle.mjs) is a complete real-world
|
|
156
171
|
example in ~150 lines.
|
|
157
172
|
|
|
158
173
|
`populace doctor` on a fresh scaffold says `2/13` and refuses to run — a method
|
|
@@ -418,7 +433,7 @@ multi-user simulation is best at finding.
|
|
|
418
433
|
- **A populated app** instead of an empty one — the cold-start problem, solved for demos and for judging your own UX
|
|
419
434
|
- **Multi-user paths exercised** without recruiting humans: presence, receipts, realtime fan-out, membership counts
|
|
420
435
|
- **Permission rules tested by users who genuinely have different identities**
|
|
421
|
-
- **Latency per endpoint** (p50/p95/
|
|
436
|
+
- **Latency per endpoint** (p50/p95/max) under N concurrent users
|
|
422
437
|
- **Failures grouped by shape**, not exact text, so one bug is one line rather than fifty
|
|
423
438
|
- **Account deletion actually tested** — the path almost nobody exercises and the one regulators ask about
|
|
424
439
|
- **`populace-report.json`** for CI; the run exits non-zero when problems are found
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
// Adapter:
|
|
1
|
+
// Adapter: Waggle — a gig-driver tracking app on Supabase.
|
|
2
|
+
//
|
|
3
|
+
// (This file was adapters/buzzbuzz.mjs until the app was renamed Waggle. The
|
|
4
|
+
// table names and the phone-to-email scheme below are the app's own and did
|
|
5
|
+
// not change with the name.)
|
|
2
6
|
//
|
|
3
7
|
// Populace's first customer, and the reference implementation. Read this
|
|
4
8
|
// alongside contract.md to see what a complete adapter looks like: it is ~140
|
|
@@ -20,13 +24,13 @@ export function createAdapter(target) {
|
|
|
20
24
|
|
|
21
25
|
if (!url || !key) {
|
|
22
26
|
throw new Error(
|
|
23
|
-
"
|
|
27
|
+
"waggle adapter needs target.url and target.key.\n" +
|
|
24
28
|
" Set BUZZBUZZ_TEST_URL and BUZZBUZZ_TEST_KEY in your environment.",
|
|
25
29
|
);
|
|
26
30
|
}
|
|
27
31
|
|
|
28
32
|
return {
|
|
29
|
-
name: "
|
|
33
|
+
name: "waggle",
|
|
30
34
|
|
|
31
35
|
// supabase-js RETURNS network errors rather than throwing, so without this
|
|
32
36
|
// a wrong URL looks identical to "that account doesn't exist" — and a run
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* An adapter for a plain REST API — the second one Populace has ever had, and
|
|
3
3
|
* the reason the portability claim is more than a hope.
|
|
4
4
|
*
|
|
5
|
-
* Read this next to adapters/
|
|
5
|
+
* Read this next to adapters/waggle.mjs. They share no library, no id type,
|
|
6
6
|
* no error convention and no auth mechanism, and the engine cannot tell them
|
|
7
7
|
* apart. That is the whole argument.
|
|
8
8
|
*
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
// Run it — PowerShell (Windows):
|
|
4
4
|
// $env:BUZZBUZZ_TEST_URL="https://<your-TEST-project>.supabase.co"
|
|
5
5
|
// $env:BUZZBUZZ_TEST_KEY="<test project publishable key>"
|
|
6
|
-
// node src/cli.mjs run --config examples/
|
|
6
|
+
// node src/cli.mjs run --config examples/waggle/populace.config.mjs
|
|
7
7
|
//
|
|
8
8
|
// Run it — bash/zsh (macOS, Linux):
|
|
9
9
|
// BUZZBUZZ_TEST_URL=... BUZZBUZZ_TEST_KEY=... \
|
|
10
|
-
// node src/cli.mjs run --config examples/
|
|
10
|
+
// node src/cli.mjs run --config examples/waggle/populace.config.mjs
|
|
11
11
|
//
|
|
12
12
|
// The test project needs the same schema as production. Run these against it:
|
|
13
13
|
// schema.sql · social_features.sql · groups.sql · direct_messages.sql
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
export default {
|
|
20
20
|
app: "Buzz",
|
|
21
|
-
adapter: "../../adapters/
|
|
21
|
+
adapter: "../../adapters/waggle.mjs",
|
|
22
22
|
environment: "test",
|
|
23
23
|
|
|
24
24
|
target: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Buzz against the local Supabase stack, at a scale the hosted project refuses.
|
|
2
2
|
//
|
|
3
|
-
// Why this file exists rather than reusing examples/
|
|
3
|
+
// Why this file exists rather than reusing examples/waggle:
|
|
4
4
|
//
|
|
5
5
|
// The hosted test project applies Supabase's default auth rate limit of 30 sign
|
|
6
6
|
// ups per five minutes per IP address. Measured on 2026-08-24: a 250-driver run
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
// npx supabase start
|
|
21
21
|
//
|
|
22
22
|
// Then either pick this file in Populace Studio, or:
|
|
23
|
-
// node src/cli.mjs run --config examples/
|
|
23
|
+
// node src/cli.mjs run --config examples/waggle-local/populace.config.mjs
|
|
24
24
|
|
|
25
25
|
export default {
|
|
26
26
|
app: "Buzz",
|
|
27
|
-
adapter: "../../adapters/
|
|
27
|
+
adapter: "../../adapters/waggle.mjs",
|
|
28
28
|
environment: "test",
|
|
29
29
|
|
|
30
30
|
// The local stack's fixed development address and publishable key. These are
|
|
@@ -35,7 +35,7 @@ export default {
|
|
|
35
35
|
key: "sb_publishable_ACJWlzQHlZjBrEguHvfOxg_3BJgxAaH",
|
|
36
36
|
},
|
|
37
37
|
|
|
38
|
-
// Kept identical to examples/
|
|
38
|
+
// Kept identical to examples/waggle. A local run is no reason to relax the
|
|
39
39
|
// guard: if one of these ever appears in `target.url` above, refuse to start.
|
|
40
40
|
neverRunAgainst: [
|
|
41
41
|
"https://rqzuuvlougzhynckvqzd.supabase.co",
|
package/package.json
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@gigzen/populace",
|
|
3
|
-
"version": "1.3.
|
|
4
|
-
"description": "A simulated population that uses your app through its real API, so you can test what needs more than one person.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
"populace": "./src/cli.mjs"
|
|
8
|
-
},
|
|
9
|
-
"main": "./src/index.mjs",
|
|
10
|
-
"exports": {
|
|
11
|
-
".": "./src/index.mjs",
|
|
12
|
-
"./engine": "./src/engine/index.mjs"
|
|
13
|
-
},
|
|
14
|
-
"files": [
|
|
15
|
-
"src",
|
|
16
|
-
"adapters",
|
|
17
|
-
"examples",
|
|
18
|
-
"!**/populace-report.json",
|
|
19
|
-
"!**/populace-report.html",
|
|
20
|
-
"!examples/
|
|
21
|
-
"populace.config.example.mjs",
|
|
22
|
-
"README.md",
|
|
23
|
-
"LICENSE",
|
|
24
|
-
"action.yml"
|
|
25
|
-
],
|
|
26
|
-
"scripts": {
|
|
27
|
-
"demo": "node src/cli.mjs demo",
|
|
28
|
-
"doctor": "node src/cli.mjs doctor",
|
|
29
|
-
"test": "node src/selftest.mjs",
|
|
30
|
-
"prepublishOnly": "node src/selftest.mjs"
|
|
31
|
-
},
|
|
32
|
-
"engines": {
|
|
33
|
-
"node": ">=18"
|
|
34
|
-
},
|
|
35
|
-
"keywords": [
|
|
36
|
-
"simulation",
|
|
37
|
-
"testing",
|
|
38
|
-
"load-testing",
|
|
39
|
-
"multi-user",
|
|
40
|
-
"synthetic-users",
|
|
41
|
-
"qa"
|
|
42
|
-
],
|
|
43
|
-
"license": "AGPL-3.0-only",
|
|
44
|
-
"dependencies": {},
|
|
45
|
-
"devDependencies": {
|
|
46
|
-
"@supabase/supabase-js": "^2.45.0"
|
|
47
|
-
},
|
|
48
|
-
"author": "Sankur Kundu <sankur.kundu.tw@gmail.com>",
|
|
49
|
-
"repository": {
|
|
50
|
-
"type": "git",
|
|
51
|
-
"url": "git+https://github.com/Shakhtar-Sankur/populace.git"
|
|
52
|
-
},
|
|
53
|
-
"homepage": "https://github.com/Shakhtar-Sankur/populace#readme",
|
|
54
|
-
"bugs": {
|
|
55
|
-
"url": "https://github.com/Shakhtar-Sankur/populace/issues"
|
|
56
|
-
},
|
|
57
|
-
"publishConfig": {
|
|
58
|
-
"access": "public"
|
|
59
|
-
}
|
|
60
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@gigzen/populace",
|
|
3
|
+
"version": "1.3.4",
|
|
4
|
+
"description": "A simulated population that uses your app through its real API, so you can test what needs more than one person.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"populace": "./src/cli.mjs"
|
|
8
|
+
},
|
|
9
|
+
"main": "./src/index.mjs",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": "./src/index.mjs",
|
|
12
|
+
"./engine": "./src/engine/index.mjs"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"src",
|
|
16
|
+
"adapters",
|
|
17
|
+
"examples",
|
|
18
|
+
"!**/populace-report.json",
|
|
19
|
+
"!**/populace-report.html",
|
|
20
|
+
"!examples/waggle/run-test.ps1",
|
|
21
|
+
"populace.config.example.mjs",
|
|
22
|
+
"README.md",
|
|
23
|
+
"LICENSE",
|
|
24
|
+
"action.yml"
|
|
25
|
+
],
|
|
26
|
+
"scripts": {
|
|
27
|
+
"demo": "node src/cli.mjs demo",
|
|
28
|
+
"doctor": "node src/cli.mjs doctor",
|
|
29
|
+
"test": "node src/selftest.mjs",
|
|
30
|
+
"prepublishOnly": "node src/selftest.mjs"
|
|
31
|
+
},
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">=18"
|
|
34
|
+
},
|
|
35
|
+
"keywords": [
|
|
36
|
+
"simulation",
|
|
37
|
+
"testing",
|
|
38
|
+
"load-testing",
|
|
39
|
+
"multi-user",
|
|
40
|
+
"synthetic-users",
|
|
41
|
+
"qa"
|
|
42
|
+
],
|
|
43
|
+
"license": "AGPL-3.0-only",
|
|
44
|
+
"dependencies": {},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@supabase/supabase-js": "^2.45.0"
|
|
47
|
+
},
|
|
48
|
+
"author": "Sankur Kundu <sankur.kundu.tw@gmail.com>",
|
|
49
|
+
"repository": {
|
|
50
|
+
"type": "git",
|
|
51
|
+
"url": "git+https://github.com/Shakhtar-Sankur/populace.git"
|
|
52
|
+
},
|
|
53
|
+
"homepage": "https://github.com/Shakhtar-Sankur/populace#readme",
|
|
54
|
+
"bugs": {
|
|
55
|
+
"url": "https://github.com/Shakhtar-Sankur/populace/issues"
|
|
56
|
+
},
|
|
57
|
+
"publishConfig": {
|
|
58
|
+
"access": "public"
|
|
59
|
+
}
|
|
60
|
+
}
|