ravensight-playtest 0.8.3 → 0.10.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.
Files changed (66) hide show
  1. package/README.md +280 -66
  2. package/addons/ravensight_driver/driver.gd +666 -21
  3. package/docs/ADAPTERS.md +11 -7
  4. package/docs/NATIVE_RUNNER.md +3 -1
  5. package/docs/godot-driver.md +127 -13
  6. package/package.json +8 -6
  7. package/src/api/client.js +4 -3
  8. package/src/cli.js +84 -25
  9. package/src/commands/check.js +30 -4
  10. package/src/commands/fakeCore.js +1 -0
  11. package/src/commands/hosted.js +41 -12
  12. package/src/commands/init.js +17 -1
  13. package/src/commands/run.js +209 -14
  14. package/src/commands/upload.js +6 -2
  15. package/src/commands/validate.js +1 -1
  16. package/src/commands/validateHosted.js +50 -5
  17. package/src/config.js +33 -2
  18. package/src/hosted/archivePreflight.js +7 -7
  19. package/src/hosted/buildUpload.js +89 -8
  20. package/src/hosted/recordedRun.js +141 -26
  21. package/src/hosted/status.js +19 -10
  22. package/src/run/actionSelector.js +14 -3
  23. package/src/run/aggregate.js +57 -3
  24. package/src/run/anygame/controlbook.js +179 -0
  25. package/src/run/anygame/genre.js +179 -0
  26. package/src/run/anygame/index.js +258 -0
  27. package/src/run/anygame/language.js +336 -0
  28. package/src/run/anygame/memory.js +330 -0
  29. package/src/run/anygame/shared-hashes.json +10 -0
  30. package/src/run/anygame/shared.js +24 -0
  31. package/src/run/anygame/sound.js +342 -0
  32. package/src/run/args.js +75 -8
  33. package/src/run/choiceCheck.js +312 -0
  34. package/src/run/context.js +254 -13
  35. package/src/run/drivers/godot-observation.js +93 -6
  36. package/src/run/drivers/godot.js +769 -46
  37. package/src/run/drivers/recording.js +24 -4
  38. package/src/run/drivers/web.js +1242 -77
  39. package/src/run/edgePass.js +731 -0
  40. package/src/run/fixLoop.js +5 -4
  41. package/src/run/focus.js +65 -0
  42. package/src/run/gamepad.js +108 -0
  43. package/src/run/godotEdgePass.js +235 -0
  44. package/src/run/godotTesterProbes.js +192 -0
  45. package/src/run/headings.js +21 -0
  46. package/src/run/honesty.js +544 -0
  47. package/src/run/inputs.js +256 -0
  48. package/src/run/marks.js +142 -0
  49. package/src/run/personaLoop.js +1000 -79
  50. package/src/run/phone.js +7 -0
  51. package/src/run/pixels.js +215 -0
  52. package/src/run/playClock.js +162 -0
  53. package/src/run/readiness.js +585 -0
  54. package/src/run/refusal.js +67 -0
  55. package/src/run/regions.js +119 -0
  56. package/src/run/report.js +14 -2
  57. package/src/run/reportChecks.js +472 -0
  58. package/src/run/resume.js +3 -2
  59. package/src/run/screenshots.js +161 -0
  60. package/src/run/strip.js +114 -0
  61. package/src/run/testerLedger.js +312 -0
  62. package/src/run/testerProbes.js +584 -0
  63. package/src/run/thinRun.js +102 -0
  64. package/src/run/timeFreeze.js +79 -0
  65. package/src/run/tools.js +454 -29
  66. package/src/runDefaults.js +24 -2
package/README.md CHANGED
@@ -1,62 +1,147 @@
1
1
  # ravensight-playtest
2
2
 
3
- Hosted playtests run your uploaded build on our machines instead of yours. One
4
- persona plays it twice, once with Geri and once with Freki, and the dashboard
5
- gets a report for each and a comparison. They use a separate command from the
6
- local `run`:
3
+ ## What can be playtested today
4
+
5
+ - **Web builds from any engine**, in the cloud (`hosted run`) or on this
6
+ machine (`run --driver playwright_web` with `--build-url` or `--build-dir`).
7
+ - **Godot projects on this machine** (`run --driver godot_driver`).
8
+
9
+ **Native builds cannot be playtested today**: Unity, Unreal, desktop, iOS and
10
+ Android builds. The cloud accepts web builds only. The CLI's native drivers
11
+ (`desktop_driver`, `unity_driver`, `unreal_driver`, `android_driver`,
12
+ `ios_driver`) are experimental: each needs a separate automation server that
13
+ you run yourself and that Ravensight does not provide, and none of them has
14
+ been tested against a real automation server. For a Unity game, build for the
15
+ Web platform and playtest that web build.
16
+
17
+ Cloud playtests run your uploaded build on our machines instead of yours, with
18
+ one playtester per persona: Geri and Freki play your game together, Geri
19
+ thinks and Freki acts. Each persona plays on its own cloud machine at the same
20
+ time, and the dashboard gets a report for each persona and one report that
21
+ covers them all. They use a separate command from the local `run`:
7
22
 
8
23
  ```sh
9
24
  ravensight-playtest hosted run --wait
25
+ ravensight-playtest hosted run --personas speedrunner,completionist --tier small --minutes 10 --focus "beat the first boss"
10
26
  ravensight-playtest hosted status ha_...
11
27
  ravensight-playtest hosted cancel ha_...
12
28
  ```
13
29
 
14
30
  `hosted run` uses the game this directory is linked to (or `--game`), picks the
15
31
  newest build that passed its static archive check on a ready profile (or the one
16
- named by `--build`), asks the server for a quote and prints it: each unit and
17
- its price, the hosted compute for each mode, the total and what is due now from
18
- prepaid funds, the expiry, and the statements you accept with it (the refund
19
- rules for a failed build and for cancellation, no network access for the game,
20
- the separate validation hold). It asks before it charges. `--yes` answers for
21
- you, a run with no terminal and no `--yes` is a no, and `--json` needs `--yes`.
22
- A balance that does not meet the quote's funding requirement stops before the
23
- question, and nothing is charged.
32
+ named by `--build`), asks the server for a quote and prints it: the tier and
33
+ play length, one line per persona with its price, any non-refundable setup fee,
34
+ the total and what is due now from prepaid funds, the expiry, and the
35
+ statements you accept with it (the refund rules for a failed build, for
36
+ cancellation and for a build too large for its tier, and the separate
37
+ validation hold). The whole total is reserved at once. It asks before it
38
+ charges. `--yes` answers for you, a run with no terminal and no `--yes` is a
39
+ no, and `--json` needs `--yes`. A balance that does not meet the quote's
40
+ funding requirement stops before the question, and nothing is charged.
24
41
 
25
42
  | Flag | Effect |
26
43
  |---|---|
27
44
  | `--build <id>` | Use this build instead of the newest ready one. |
28
- | `--persona <slug>` | The persona for both runs. Default `curious-kid`. |
29
- | `--video`, `--transcript` | Save video or transcripts of both sessions in their reports. Priced in the quote. |
30
- | `--wait` | Stay until the run finishes, printing each phase change and the queue place while it waits, then each mode's outcome. Works with a saved quote file too. |
45
+ | `--personas <list>` | More personas to add, comma separated. `fresh-eyes`, a first time player, is always included; each persona adds its own price. `ravensight-playtest personas` lists them. |
46
+ | `--tier <name>` | `jam`, `small`, `medium` or `large`. The default is the tier your build's size needs; a smaller one is refused before any charge. |
47
+ | `--minutes <n>` | Minutes of play per persona, from the tier's own length up to 120. Geri's thinking budget and the action limit grow with it, and so does the price. |
48
+ | `--start <query>` | Open the build with this query or hash, such as `?level=3` or `#boss`. It stays on your build. |
49
+ | `--focus <goal>` | A goal every persona puts first, such as "only test levels 3 to 5". Up to five times. |
50
+ | `--avoid <thing>` | Something every persona stays out of, such as "the settings menu". Up to five times. |
51
+ | `--save <file>` | A save file every persona starts from, at most 1 MiB. It is uploaded before the quote, free, and the quote names it. |
52
+ | `--save-target <where>` | Where the game reads the save. See "Starting from a save file" below. Without it the game reads the save through the playtest save hook. |
53
+ | `--video` | Save a video of each persona's session in its report. |
54
+ | `--wait` | Stay until the run finishes, printing each phase change and each persona's queue place while it waits, then each persona's outcome. Works with a saved quote file too. |
31
55
  | `--game <id>` | Override the linked game. |
32
56
  | `--even-if-unknown` | Buy a run even though an earlier admission for this game has no known outcome yet. Without it, `hosted run` refuses before quoting while such a record exists, because that earlier run may have been charged: ask with `hosted status` first. |
33
57
  | `-y, --yes` | Answer the price confirmation with yes. Needed without a terminal and with `--json`. |
34
58
 
59
+ The tiers, by unpacked build size: Jam (under 50 MB, 5 minutes), Small (under
60
+ 250 MB, 8 minutes), Medium (up to the hosted limit, 15 minutes) and Large (30
61
+ minutes on a bigger machine, with a non-refundable setup fee). The quote states
62
+ every price; the server computes it.
63
+
35
64
  `hosted run` prints the hosted run id and job id as soon as the run is admitted.
36
- A run waiting for a hosted machine shows its place, such as "Queued, position 2,
37
- expected to start in about 14 minutes" or "Queued, starting now", and `--wait`
38
- prints it again whenever it moves.
65
+ A persona waiting for a cloud machine shows its place, such as "speedrunner:
66
+ queued, position 2, expected to start in about 14 minutes", and `--wait` prints
67
+ it again whenever it moves.
39
68
 
40
69
  The phases are the dashboard's: queued, provisioning, running, capturing,
41
70
  analyzing, then report ready, failed or canceled. `hosted status <id>` prints
42
- the current one (`--wait` to follow it) with each mode's state and findings and
43
- the dashboard link to the report. With `--wait`, a failed run exits 1 and a
71
+ the current one (`--wait` to follow it) with each persona's state and findings
72
+ and the dashboard link to the report. With `--wait`, a failed run exits 1 and a
44
73
  canceled one exits 10. `hosted cancel <id>` asks first, then requests
45
- cancellation: work already done follows the accepted policy and unstarted work
46
- is refunded during settlement.
74
+ cancellation: work already done follows the accepted policy and each persona
75
+ that has not started is refunded during settlement.
76
+
77
+ If a persona's build is too large for the tier (it runs out of memory, the
78
+ browser crashes under memory pressure, or the frame rate stays too low to
79
+ play), that persona stops early. It keeps the machine time and model spend it
80
+ used plus the quote's under-scope fee, the rest of its price is refunded, and
81
+ the report names the tier to choose.
82
+
83
+ ### Build size, tier and video
84
+
85
+ A build's tier follows what it unpacks to: Jam up to 50 MB, Small up to 250
86
+ MB, Medium up to 1 GB and Large up to 4 GB. `build upload` sends a ZIP of up
87
+ to 300 MB in one request and a larger one in 64 MB parts, up to 4 GB zipped
88
+ (one ZIP, no ZIP64). The dashboard uploads up to 300 MB; a larger build is
89
+ uploaded here. The quote refuses a tier smaller than the build needs, with
90
+ the build's real unpacked size and the tier to choose, before any charge.
91
+
92
+ A persona's video is one file for a run of ten minutes or less and one file
93
+ per started ten minutes for a longer run. The report plays the parts in
94
+ order. Each part is kept 90 days, as the one video is, and the price of a
95
+ longer run carries every part.
96
+
97
+ ### Starting from a save file
98
+
99
+ `--save <file>` starts every persona from your save: turn 150, level 12, a
100
+ full inventory. The file is at most 1 MiB. `--save-target` says where your
101
+ game reads it, and the save is placed there before the game's page loads:
102
+
103
+ | `--save-target` | Where it goes |
104
+ |---|---|
105
+ | `godot:user://saves/slot1.sav` | A file in a Godot web export's `user://` folder. |
106
+ | `localstorage:save_v1` | One local storage key, the file as UTF-8 text. |
107
+ | `idbfs:/mount/path/save.dat` | A file in an engine's browser file storage, by its full path (any engine built with Emscripten that mounts IDBFS). |
108
+ | `hook` (the default) | Nothing is placed. The game reads the save itself, see below. |
109
+
110
+ The hook is there whenever a save was sent, whatever the target. Before any of
111
+ your game's scripts run, the page has `window.RavensightPlaytest.save`: an
112
+ object with `name`, `bytes`, `url` and `target`. A GET of `url`, on the game's
113
+ own address, answers the file's bytes. A game that keeps its saves somewhere
114
+ else reads it at boot, for example:
115
+
116
+ ```js
117
+ const save = window.RavensightPlaytest && window.RavensightPlaytest.save;
118
+ if (save) loadGame(new Uint8Array(await (await fetch(save.url)).arrayBuffer()));
119
+ ```
120
+
121
+ In Godot, `JavaScriptBridge.eval("window.RavensightPlaytest ? window.RavensightPlaytest.save.url : ''")`
122
+ gives the address for an `HTTPRequest`; in Unity, a small `.jslib` function
123
+ reads the same object.
124
+
125
+ What is not placed for you: Unity's web player keeps `persistentDataPath` and
126
+ PlayerPrefs under a folder whose name is derived from the address the build is
127
+ served from, which is the cloud machine's own and changes every run, so a
128
+ Unity save cannot be dropped into place before the game boots. A Unity build
129
+ uses the hook, or `localstorage:` if that is where it saves. Cookies, the
130
+ Cache API, the origin private file system and a save made of several files
131
+ are not placed either; the hook covers them. A local run plays your own
132
+ browser profile or project, where your save already is.
47
133
 
48
134
  To review a quote before paying, save it and confirm it later:
49
135
 
50
136
  ```sh
51
- ravensight-playtest hosted quote --game GAME --build BUILD --video --output hosted-quote.json
137
+ ravensight-playtest hosted quote --game GAME --build BUILD --personas speedrunner --video --output hosted-quote.json
52
138
  ravensight-playtest hosted run hosted-quote.json --wait
53
139
  ```
54
140
 
55
- `hosted quote` uses the same default persona as `hosted run`, `curious-kid`, and
56
- says so; `--persona` names another.
141
+ `hosted quote` takes the same personas, tier, length and focus as `hosted run`.
57
142
 
58
143
  `--profile` is needed only when the server advertises more than one build
59
- profile; the error lists them. The quote names the full Geri then Freki price, prepaid amount, evidence
144
+ profile; the error lists them. The quote names every persona's price, the prepaid amount, evidence
60
145
  options, expiry and refund rules. It charges nothing. `hosted run` confirms
61
146
  that saved quote before one admission request. Its durable journal blocks an
62
147
  automatic second POST after an uncertain outcome; preserve it for reconciliation.
@@ -117,13 +202,18 @@ to be returned after cleanup. The server’s isolated validator remains
117
202
  authoritative. A passing local check does not establish engine, GPU or license
118
203
  compatibility.
119
204
 
120
- The current upload protocol is one streamed presigned PUT. Multipart upload
121
- and byte-range resume are not advertised. The original upload journal is kept
205
+ A ZIP of up to 300 MB is sent as one streamed presigned PUT. A larger one, up
206
+ to 4 GB, is sent in 64 MB parts, in order, each streamed from disk with its
207
+ exact length; a part that fails is sent again, and a part address that has
208
+ expired is signed again by the server. Parts are not resumed across separate
209
+ commands. The original upload journal is kept (under
210
+ `.ravensight/hosted-uploads/`, or at the path `--journal <file>` names)
122
211
  after an uncertain response, and repeating that upload cannot silently request
123
212
  a second reservation. A different journal does not cancel or refund an earlier
124
213
  upload. Reports and existing run-upload journals are left intact. Larger limits
125
- and native executable formats are usable only when the server advertises a
126
- ready profile and the corresponding upload and runtime support exists. This
214
+ are usable only when the server advertises a ready profile. The cloud accepts
215
+ web builds only today, so a native executable cannot be played in the cloud,
216
+ even when it passes a local `build preflight` check. This
127
217
  source addition does not claim an accepted AAA engine run or a published CLI
128
218
  release.
129
219
 
@@ -180,8 +270,8 @@ In CI, set `RAVENSIGHT_TOKEN` instead and skip `login` entirely.
180
270
  ## Upgrading to 0.3.2
181
271
 
182
272
  - **A plain `run` plays one persona, not two.** The default persona set is now
183
- `curious-kid` alone, so a first run costs one persona run. Name more with
184
- `--personas curious-kid,grumpy-veteran` (or `personas` in
273
+ `fresh-eyes` alone, so a first run costs one persona run. Name more with
274
+ `--personas fresh-eyes,grumpy-veteran` (or `personas` in
185
275
  `.ravensight/config.json`); `ravensight-playtest personas` lists the slugs.
186
276
  A script that relied on two personas by default has to name them.
187
277
  - **`run` checks the build before it prices anything.** A web build's URL has
@@ -271,8 +361,10 @@ break on a missing optional tool or a newer release. `check` reserves no units
271
361
  and starts no job, and says so at the end of its output: everything it asks the
272
362
  server is a read, including the price estimate.
273
363
 
274
- For a native driver (`ios_driver`, `android_driver`, `desktop_driver`,
275
- `unity_driver`, `unreal_driver`) the `build` row reads the driver config and
364
+ The native drivers are experimental and not a supported way to playtest today
365
+ (see [What can be playtested today](#what-can-be-playtested-today)); these rows
366
+ are reference for anyone trying one. For a native driver (`ios_driver`,
367
+ `android_driver`, `desktop_driver`, `unity_driver`, `unreal_driver`) the `build` row reads the driver config and
276
368
  confirms the app it names exists on disk (an app named by bundle id or package
277
369
  can only be confirmed by the server, so that is a warning), and the
278
370
  `automation server` row is the free capability probe: `GET /status` on the
@@ -280,8 +372,8 @@ config's loopback endpoint, `POST /session` with the run's own capabilities,
280
372
  `GET /session/:id/source` to confirm the app opened and answers, then
281
373
  `DELETE /session/:id`. The detail names the step that failed. A session the
282
374
  probe could not close is a warning. This talks only to your own local server.
283
- [docs/NATIVE_RUNNER.md](docs/NATIVE_RUNNER.md) walks through an iOS simulator
284
- setup with the expected rows at each step.
375
+ [docs/NATIVE_RUNNER.md](docs/NATIVE_RUNNER.md) walks through an untested iOS
376
+ simulator setup with the expected rows at each step.
285
377
 
286
378
  `check --json` prints one object:
287
379
 
@@ -333,7 +425,36 @@ automatically. `check` shows that same warning as a row when it applies.
333
425
  | `--godot-path <path>` | Where Godot is, if it is not on the PATH. |
334
426
  | `--web` | Check the browser even when this repo is not linked to a web build. |
335
427
  | `--driver <name>` | Check the setup for this driver instead of the configured one. |
336
- | `--driver-config <file>` | The native driver config to probe, instead of the configured build. |
428
+ | `--driver-config <file>` | The experimental native driver config to probe, instead of the configured build. |
429
+ | `--godot-project <dir>` | The Godot project a `godot_driver` run would play. Read for the `full run` rows below; the game is not started. |
430
+ | `--no-record-video` | Say the run will pass the same flag, so the video row warns. A run records by default. |
431
+
432
+ #### The `full run` rows
433
+
434
+ A run is charged whether it covered the game or stalled on its second screen.
435
+ `check` ends with rows named `full run:` that look for what makes a run come
436
+ back thin. They read this machine only, start nothing, and are warnings at
437
+ most: `check` still says Ready and `run` still runs. Each row names its fix.
438
+
439
+ | Row | Warns when | Fix |
440
+ |---|---|---|
441
+ | `full run: brief` | How to start is under 40 characters, controls under 20, fewer than two success criteria, or no known issues and no design intent notes. | `brief`: the menu path, every choice on the way by name, each input, what a full session reaches, what you already know. |
442
+ | `full run: controls` | A Godot scene or script has a pressable node (`Button`, `TextureButton`, `LinkButton`, `CheckBox`, `CheckButton`, `MenuButton`, `TouchScreenButton`) with no `text`, no `tooltip_text`, no `accessibility_name` and no labelled child. | Set `text`, or `tooltip_text`: the driver reads a tooltip or an accessible name as the label of a control that shows no text, prints it as `label="..."`, and clicks by it. |
443
+ | `full run: screens the driver can read` | A script has `_draw` and reads mouse or touch input itself, or the main scene's root is 3D. | The state hook, a named `Button` over each pressable region, and `--long`. |
444
+ | `full run: game state` | No script defines `_ravensight_state()`. | A node in the `ravensight_state` group with `func _ravensight_state() -> Dictionary`. |
445
+ | `full run: fonts` | The game's strings or the brief use letters outside Latin, Greek and Cyrillic, and no `.ttf`, `.otf` or `.ttc` in the project maps them (read from each font's `cmap`), or one does and no project font is set. | Ship a font that covers the language and set it as the project font. |
446
+ | `full run: video` | `--no-record-video` was passed. | Leave it out: a run keeps a video on this machine by default. |
447
+
448
+ The scan is a static read: it skips `.godot`, `.git`, `node_modules` and the
449
+ driver's own addon, reads at most 4,000 files and 512 KB of each text file, and
450
+ takes a control that is given a child or handed to one of the script's own
451
+ functions as labelled. `check --json` carries the same facts under `readiness`.
452
+
453
+ When a job ends, `run` prints each tagged capability note the personas wrote
454
+ under "What this run didn't cover" (`[no_label]`, `[drawn_screen]`,
455
+ `[no_state]`, `[font]`, `[outline_cut]`, `[no_way_in]`, `[input]`,
456
+ `[too_fast]`, `[brief_gap]`, `[budget]`) with what to add before the next run.
457
+ Before the price is confirmed it also says when no video will be recorded.
337
458
 
338
459
  ### init
339
460
 
@@ -353,6 +474,14 @@ login).
353
474
  | `--game <gameId>` | The game to link. Optional with one visible game, or in a terminal. |
354
475
  | `--force` | Relink a repo that is already linked. |
355
476
 
477
+ A fresh link writes `"uploads": { "video": false, "step_log": true }`, and
478
+ `init` says once that a persona run uploads its step log (`transcript.jsonl`:
479
+ the inputs sent, what each screen showed and the persona's notes) so the
480
+ dashboard can show the evidence report, that it is kept 90 days, and how to
481
+ keep it on your machine: `"step_log": false` there, or `--no-upload-step-log`
482
+ on one run. Relinking keeps the `uploads` a project already has and says the
483
+ same; an older `"transcript": false` is not an opt out.
484
+
356
485
  A repository with a `project.godot` at its root is linked with `driver:
357
486
  godot_driver` and `build: { kind: godot_project, ref: "." }`, so `run` needs no
358
487
  `--driver` or `--godot-project`. The concurrency written is the one `check`
@@ -368,8 +497,8 @@ default marked. A free read. Takes `--game <gameId>` and `--json`.
368
497
 
369
498
  Writes the expectations brief: your goals, what success looks like, how the game
370
499
  is controlled, where a persona starts. Then prints what the run `run` would
371
- start costs ("A run of 1 persona (curious-kid) would cost $1.00: a persona run
372
- $1.00 each"; the game profile is a separate job), whether your balance covers it, and, past 8 personas, the same wall-clock
500
+ start costs ("A run of 1 persona (fresh-eyes) would cost $6.40: a persona run
501
+ $6.40 each"; the game profile is a separate job), whether your balance covers it, and, past 8 personas, the same wall-clock
373
502
  warning `run` shows. A brief is required before `run`; the server answers 409
374
503
  `brief_required` without one.
375
504
 
@@ -380,7 +509,7 @@ warning `run` shows. A brief is required before `run`; the server answers 409
380
509
  | `--draft` | Save as a draft even when it looks complete. |
381
510
  | `--from <file>` | Read the fields from a JSON file instead of asking. |
382
511
  | `--game <gameId>` | The game, when this repo is not linked. |
383
- | `--modules <list>`, `--personas <list>` | Price this module and persona list in the estimate it prints. Every unit is named with its own price, such as "profile job $4.00, a persona run $1.00 each". |
512
+ | `--modules <list>`, `--personas <list>` | Price this module and persona list in the estimate it prints. Every unit is named with its own price, such as "profile job $8.40, a persona run $6.40 each". |
384
513
 
385
514
  #### The `brief --from` file
386
515
 
@@ -447,22 +576,37 @@ run options below.
447
576
  Registers a job, plays it, writes the reports, uploads them, finishes the job.
448
577
  Prints the price and asks before spending. Before any charge, even with
449
578
  `--yes`, it prints one bold line with the persona count and the total ("This
450
- run: 1 persona (curious-kid) on playwright_web, $1.00 in total: a persona run
451
- $1.00 each"), the balance, and what a persona run buys: the action budget (the
579
+ run: 1 persona (fresh-eyes) on playwright_web, $6.40 in total: a persona run
580
+ $6.40 each"), the balance, and what a persona run buys: the action budget (the
452
581
  persona's patience in the pack, lowered by `--max-actions` or the server's
453
582
  ceiling) and that sign-up alone can take 8 of those actions. A `test_account`
454
583
  in the brief lets the persona sign in instead. An unknown `--personas` slug is
455
584
  refused with the valid slugs before anything is priced.
456
585
 
457
- `--long` makes every persona run a long run: twice the actions, model budget
458
- and wall time of a standard run, for a game whose screens are heavy or whose
459
- goal is far in. It costs twice a standard run. The price is the server's
586
+ `--long` makes every persona run a long run: twice the actions and wall time
587
+ of a standard run and a larger model budget ($1.50 where a standard run has
588
+ $0.90), for a game whose screens are heavy or whose goal is far in. It costs
589
+ more than a standard run ($8.20 against $6.40 today). The price is the server's
460
590
  estimate for the long run, printed and confirmed like any other, never a figure
461
591
  built into the CLI. Locally a long run uses the run's own action limit when the
462
592
  server's register answer carries one, otherwise twice the standard ceilings
463
593
  (the persona's patience and the per run ceiling); `--max-actions` still only
464
594
  lowers it. `check` suggests `--long` when the first screen is heavy.
465
595
 
596
+ `--tier` plays a run on one of the cloud tiers' allowances from this machine,
597
+ and `--minutes` sets how long: `--tier medium --minutes 30` gives every
598
+ persona the Medium tier's model budget and action count scaled to thirty
599
+ minutes. Each tier has its own shortest length (jam 5, small 8, medium 15,
600
+ large 30 minutes) and a local run may go up to 240. The price is the server's,
601
+ from the same cost formula as every other run with no cloud machine in it,
602
+ printed and confirmed before any charge. A tier run stops on the clock: play
603
+ ends when the minutes sold have been played (time the game ran), or when the
604
+ run's wall clock is nearly used, a fifth of it being kept for the report.
605
+ `--focus` and `--avoid` give every persona goals
606
+ to put first and things to stay out of, up to five of each, and `--start`
607
+ opens a web build at a query or hash. They are printed before the price and
608
+ a resumed job keeps them.
609
+
466
610
  Before the estimate, `run` checks the build is up, so a down server is never
467
611
  paid for. Set `preflight` in `.ravensight/config.json` to name what to check:
468
612
 
@@ -476,7 +620,10 @@ With no `preflight`, a web build's own URL has to answer 2xx or 3xx; other
476
620
  drivers are not checked unless a `preflight.url` is set. A failure prints the
477
621
  status it saw (or the network error), exits 1, and registers nothing.
478
622
 
479
- With a native driver, `run` first runs the `build` and `automation server` rows
623
+ Native drivers are experimental, need an automation server you run yourself,
624
+ and have not been tested against a real one (see
625
+ [What can be playtested today](#what-can-be-playtested-today)). With a native
626
+ driver, `run` first runs the `build` and `automation server` rows
480
627
  of `check`. When either fails it exits 1 before the estimate, the confirmation
481
628
  and the register, so no job exists and nothing is reserved, and the message
482
629
  names the failing row and its fix. `--skip-preflight` registers without the
@@ -496,23 +643,31 @@ splitting the job in two is what gets everything played.
496
643
  | Flag | Effect |
497
644
  |---|---|
498
645
  | `--game <gameId>` | The game, when this repo is not linked. |
499
- | `--personas <list>` | Comma separated persona slugs. Defaults to one, `curious-kid`; `ravensight-playtest personas` lists them. |
500
- | `--driver <name>` | `playwright_web`, `godot_driver`, `cli_stdio`, or a native driver: `desktop_driver`, `unity_driver`, `unreal_driver`, `android_driver`, `ios_driver`. |
646
+ | `--personas <list>` | Comma separated persona slugs. Defaults to one, `fresh-eyes`; `ravensight-playtest personas` lists them. |
647
+ | `--driver <name>` | `playwright_web`, `godot_driver` or `cli_stdio`. The native drivers `desktop_driver`, `unity_driver`, `unreal_driver`, `android_driver` and `ios_driver` are experimental: they need an automation server you run yourself and are untested against a real one. |
501
648
  | `--build-url <url>` | The web build to play. |
502
649
  | `--godot-project <dir>` | The Godot project directory. A relative path is read from the repository root. |
503
650
  | `--godot-path <path>` | Where Godot is, if it is not on the PATH. `RAVENSIGHT_GODOT` does the same. |
504
- | `--realtime` | `godot_driver` only: let the game run in real time between actions. By default the game is paused while the persona decides and runs only while an action executes. |
505
- | `--driver-config <file>` | The native driver config, or the JSON-RPC bridge config for `cli_stdio`. |
651
+ | `--realtime` | Let the game run in real time between actions. By default a Godot game, and a game drawn in a canvas in the browser, is paused while the persona decides and runs only while an action executes. |
652
+ | `--driver-config <file>` | The JSON-RPC bridge config for `cli_stdio`, or an experimental native driver's config. |
506
653
  | `--skip-preflight` | Register without the free checks first: the build health check (any driver) and the automation probe (native drivers). The job is registered and charged even if the build or the automation server turns out to be down. |
507
654
  | `--cli <command>` | The command that starts a text build. |
508
655
  | `--max-actions <n>` | Lower the actions one persona may take. It can only lower the persona's own patience (and the server's per run ceiling), never raise it. |
509
- | `--long` | A long persona run: twice the actions, model budget and wall time of a standard run, at twice the price. The price is read from the estimate and confirmed before any charge. |
656
+ | `--long` | A long persona run: twice the actions and wall time of a standard run and a larger model budget, at a higher price. The price is read from the estimate and confirmed before any charge. |
657
+ | `--tier <name>` | Play on a cloud tier's allowance from this machine: `jam`, `small`, `medium` or `large`. Each has its own play length, model budget and action count. The price is read from the estimate and confirmed before any charge. Not with `--long`. |
658
+ | `--minutes <n>` | With `--tier`, minutes of play per persona, from the tier's own length (jam 5, small 8, medium 15, large 30) up to 240. The price scales with it. |
659
+ | `--focus <goal>` | A goal every persona puts first, such as "beat the first boss". Up to five times. |
660
+ | `--avoid <thing>` | Something every persona stays out of, such as "the settings menu". Up to five times. |
661
+ | `--start <query>` | Open a web build with this query or hash, such as `?level=3` or `#boss`. |
510
662
  | `--concurrency <n>` | Personas at once. Default the number `init` wrote, which is what `check` recommends for this machine. |
511
- | `--controller <name>` | One playthrough with `geri` or `freki` (CLI 0.8.0 or later). The server must advertise and quote that exact choice. |
512
- | `--compare-with freki` | Separate Geri and Freki playthroughs for each chosen persona. Shows their combined quote before purchase. Comparisons run one playthrough at a time. |
513
- | `--record-video` | Capture the selected web or graphical Godot game locally. Does not upload the video. |
663
+ | `--no-record-video` | Do not keep a video. A `playwright_web` or `godot_driver` run records one on this machine by default (`session.webm`, or `session.mp4` where ffmpeg is installed); it is never uploaded without `--upload-video`. |
664
+ | `--record-video` | Record with the upload limits (15 minutes, 200 MB). Does not upload the video. |
665
+ | `--no-edge-pass` | Skip the edge behaviour checks a `playwright_web` or `godot_driver` run makes after play (focus loss, resize, rapid input, a short idle, and a reload or a second start on the game's save), and the tester probes (fast clicks, untried buttons, odd text, pause and resume, opposite keys, the edges). They ask no model and cost nothing. |
666
+ | `--phone` | `playwright_web` only. Play on a phone sized screen (390 by 844) with touch and no mouse: a click is a tap, `hold_ms` a long press, a drag a finger swipe, and `pinch` two fingers. For a game made for touch. A game that wanted touch and was played with the mouse says so in its report. |
514
667
  | `--upload-video` | Record and explicitly upload `session.webm` or `session.mp4` with the reports. |
515
- | `--upload-transcript` | Upload `transcript.jsonl` as well as the reports. |
668
+ | `--no-upload-step-log` | Keep the step log (`transcript.jsonl`) on this machine. By default it uploads with the reports, because the evidence report in the dashboard is built from it: the inputs sent, what each observation read, the persona's notes and the checks made on its findings, with the local brief's secrets already scrubbed. `"uploads": { "step_log": false }` in the project config does the same for every run. This default applies to projects set up before 0.10.0 too: the older `"uploads": { "transcript": false }` that `init` used to write is not read as an opt out. Every run prints one line saying whether the step log uploads and how to keep it local; without it the dashboard shows the written report, not the evidence report. |
669
+ | `--upload-step-log` | Upload the step log for this run even when the project config sets `"step_log": false`. `--upload-transcript` is its older name. |
670
+ | `--no-replay` | `godot_driver` and `playwright_web`. Do not play the findings' recorded inputs again after the report. A replay makes no model call and costs nothing; it opens the game again for a few seconds (a second browser for a web build). |
516
671
  | `--dry-upload` | List every file and byte that would be sent, and send nothing. |
517
672
  | `--key-modifier <meta\|control>` | The modifier the browser driver uses for editing shortcuts such as select all. Defaults to this machine's own (Command on macOS, Control elsewhere); set it when the browser's platform is not this machine's. `RAVENSIGHT_KEY_MODIFIER` does the same. |
518
673
  | `--build-dir <dir>` | Serve an exported web build folder from this machine and play it: `index.html`, or the folder's one `.html` page (a Godot export named after the project). The local server sends `application/wasm`, Content-Encoding for Unity's Brotli and gzip files (`.br`, `.gz`), and cross-origin isolation, so threaded Godot, love.js and Emscripten builds get SharedArrayBuffer. `resume` serves the same folder again. Not with `--build-url`. The server answers only `127.0.0.1` or `localhost` on its own port and never serves dotfiles. |
@@ -750,7 +905,7 @@ open the pull request once you have read the diff.
750
905
 
751
906
  A fix attempt is one unit, refunded in full in three cases: the finding turns
752
907
  out to be design intent, the attempt changes nothing, or the game did not boot
753
- for the verify run, in which case the $5.00 comes back because the fix could
908
+ for the verify run, in which case the $18.60 comes back because the fix could
754
909
  not be verified. The verify run is included in the price, and the CLI always
755
910
  completes the verify run before the fix run so the server can read it.
756
911
 
@@ -759,6 +914,43 @@ counting a cancel or any other failure. Past that the attempt is kept, and the C
759
914
  prints the server's note saying so instead of a refund. An attempt that used no model
760
915
  time always comes back. A persona run has the same rule with 20 refunds, and a game profile with 5.
761
916
 
917
+ ### A thin run is billed at what it cost
918
+
919
+ When a persona run ends with fewer than 15 actions and the game is not the
920
+ reason (the AI budget ran out, the playtester met a tool or driver limit, or it
921
+ stopped early with nothing blocking it), you are charged only what the run cost
922
+ us to run: its AI spend and its storage and transfer, rounded up to the cent.
923
+ The rest of the price is refunded when the job finishes. The CLI prints why the
924
+ run was short and what to try next as soon as the run completes, writes the
925
+ same words into the run's `report.md` under "Why this run was short", and
926
+ prints what was charged and refunded when the job finishes. The dashboard's
927
+ job page shows the same sentences on the run.
928
+
929
+ A run the game itself cut short is charged in full, because that run did its
930
+ job: a blocker the persona reported with evidence, or a persona that quit in
931
+ character. So is a run past 15 actions, and so is a finished tiny game: a
932
+ persona that reached the goal in a few actions, where the run's report confirms
933
+ the goal was met, gave you what you asked for. The CLI writes that check into
934
+ `report.json` as `data_points.goal_reached`, true only when the persona stopped
935
+ by itself and its report says the goal was reached.
936
+
937
+ A run that did not earn its price is billed the same way when it still used AI
938
+ time: a run of fewer than five actions, a run that ended early and found
939
+ nothing, or a run that failed on the game's side and still left a report. You
940
+ are charged what it cost us and the rest is refunded, with the reason on the
941
+ run. A run that stopped on an error is billed the same way: the CLI reporting an
942
+ error is not enough for a full refund. It comes back in full when our servers
943
+ recorded a failure of ours on that run (the AI provider or our proxy failed, or
944
+ AI was switched off) and no play came after it. It also comes back in full when
945
+ it was canceled, when no report was accepted, when it used no AI time, or when
946
+ one of our own limits stopped it before any play.
947
+
948
+ The server decides all of this from its own records, including its own count
949
+ of the inputs the playtester asked for; nothing the CLI sends can choose the
950
+ outcome. An account gets 20 runs billed at cost in any 30 days, counting both
951
+ kinds; past that the run is kept at its price and the CLI prints the server's
952
+ note saying so.
953
+
762
954
  **A verify can only mean something against a build this machine serves.** The
763
955
  change exists in your working tree and nowhere else, so a `--build-url`
764
956
  pointing at a hosted build would answer about the last upload instead. Any
@@ -882,7 +1074,8 @@ repeatedly: files already sent are skipped by checksum.
882
1074
  | `--game <gameId>` | The game, when the job journal is missing. |
883
1075
  | `--dry-upload` | List what would be sent and send nothing. |
884
1076
  | `--video` | Include the session video. |
885
- | `--transcript` | Include the transcript. |
1077
+ | `--transcript` | Include the step log (`transcript.jsonl`). Without a flag, a job sends what its run decided (the step log uploads unless the run had `--no-upload-step-log` or the config turned it off); a job with no journal sends it unless the config sets `"uploads": { "step_log": false }`. |
1078
+ | `--no-step-log` | Leave the step log on this machine. |
886
1079
 
887
1080
  ### review
888
1081
 
@@ -989,7 +1182,7 @@ In your repo:
989
1182
  runs/<runId>/
990
1183
  report.md report.json usage.json
991
1184
  screenshots/NN-slug.png
992
- transcript.jsonl only when you opt in
1185
+ transcript.jsonl a persona run's step log, by default; --no-upload-step-log keeps it local
993
1186
  session.webm only when you opt in
994
1187
  ```
995
1188
 
@@ -1020,8 +1213,17 @@ it cannot drift from what is actually accepted. `ravensight-playtest open` links
1020
1213
  to it. The short version:
1021
1214
 
1022
1215
  Uploaded by default: `report.md`, `report.json`, `usage.json`, `changeset.json`,
1023
- the aggregate and capability reports, and `screenshots/`. Uploaded only when you ask:
1024
- `transcript.jsonl` (`--upload-transcript`) and `session.webm` or `session.mp4`
1216
+ the aggregate and capability reports, `screenshots/` (which holds a frame cut from the
1217
+ session video for each finding, when the run was recorded), and a persona run's step log,
1218
+ `transcript.jsonl`. The step log is what the evidence report in the dashboard is built
1219
+ from: the inputs the run sent, what each observation read, the persona's notes and mood,
1220
+ and the checks made on its findings. It holds nothing from your environment, and the
1221
+ local brief's secrets are scrubbed from it before it is written. Pass
1222
+ `--no-upload-step-log`, or set `"uploads": { "step_log": false }` in
1223
+ `.ravensight/config.json`, to keep it on your machine; the run then shows its written
1224
+ report only, and says so when it starts. This applies to projects set up before 0.10.0:
1225
+ the older `"uploads": { "transcript": false }` that `init` used to write is not an opt out,
1226
+ so after the upgrade their step log uploads until `"step_log": false` is set. Uploaded only when you ask: `session.webm` or `session.mp4`
1025
1227
  (`--upload-video`). **Source code never, at any path.** The upload allowlist has
1026
1228
  no entry for it, the CLI refuses it locally, and the server refuses anything not
1027
1229
  on its own copy of the list. `src/upload/allowlist.js` is that copy, and a test
@@ -1100,7 +1302,7 @@ import { createClient, packs, uploadRunDir } from 'ravensight-playtest';
1100
1302
  | `docs/api-contract.md` | Every server route this CLI calls, with the headers it sends and the status codes it handles. The list to check a server change against. |
1101
1303
  | `docs/godot-driver.md` | The Godot driver protocol, its method set, its error codes and its safety rules. |
1102
1304
  | `docs/ADAPTERS.md` | Every driver, its target and how far it has been validated. |
1103
- | `docs/NATIVE_RUNNER.md` | A minimal iOS simulator runner through a local W3C automation server, step by step, with the `check` rows expected at each step. |
1305
+ | `docs/NATIVE_RUNNER.md` | Experimental and untested: a minimal iOS simulator runner through a local W3C automation server, with the `check` rows expected at each step. Native builds cannot be playtested today. |
1104
1306
  | `src/api/README.md` | The module other code may import, and what the runner half expects from it. |
1105
1307
 
1106
1308
  ## License
@@ -1115,8 +1317,10 @@ Two AI playtesters can play a persona run, at the same price per run:
1115
1317
  action itself. It is the default.
1116
1318
  - **Freki**, the selecting playtester, picks each action from a short list. A
1117
1319
  screenshot observer proposes up to three actions, Ravensight selects one on
1118
- the server, and the local driver executes only that choice. Ambiguous
1119
- controls stop the run for review.
1320
+ the server, and the local driver executes only that choice. Freki proposes
1321
+ and never decides: when it is unsure, cannot be reached, or names something
1322
+ that was not offered, the most likely candidate it named is played, or
1323
+ otherwise the first action proposed for that screen, and the run goes on.
1120
1324
 
1121
1325
  The optional `--controller freki` mode uses the existing persona run.
1122
1326
  Reports, screenshots and findings use the normal upload and review flow.
@@ -1151,7 +1355,7 @@ ravensight-playtest run --driver playwright_web --build-url https://your-game.ex
1151
1355
 
1152
1356
  The server quotes every persona/playtester run before the CLI asks for payment.
1153
1357
  Each keeps its own existing model budget and settlement rules. Two standard runs
1154
- at the current $1 unit price total $2; the displayed server quote is authoritative.
1358
+ at the current $6.40 unit price total $12.80; the displayed server quote is authoritative.
1155
1359
  No comparison model call or extra recording fee is added. Use `--upload-video`
1156
1360
  instead of `--record-video` only when you want the videos uploaded for private
1157
1361
  dashboard playback. Recording is silent and captures only the selected game,
@@ -1197,7 +1401,7 @@ feedback and timing-sensitive gameplay.
1197
1401
 
1198
1402
  ## Build adapters
1199
1403
 
1200
- Browser and Godot runners share the paid playtest lifecycle with desktop, Unity/Unreal export, Android/iOS and custom JSON-RPC adapters. Native adapters require a locally configured automation server and remain experimental until validated against your build. See [adapter setup and validation boundaries](docs/ADAPTERS.md) and the [native runner starter](docs/NATIVE_RUNNER.md); `check` probes the automation server for free before a paid native run.
1404
+ Web builds (`playwright_web`, locally or in the cloud) and Godot projects (`godot_driver`, locally) are what can be playtested today. The desktop, Unity, Unreal, Android and iOS drivers are experimental: each needs a separate automation server that you run yourself and that Ravensight does not provide, and none has been tested against a real automation server, so native builds cannot be playtested today. For a Unity game, export a web build. The custom JSON-RPC bridge (`cli_stdio`) is for text games and your own integrations. See [adapter setup and validation boundaries](docs/ADAPTERS.md); the [native runner starter](docs/NATIVE_RUNNER.md) is kept as an untested reference.
1201
1405
 
1202
1406
  ## Validate changes (Labs beta)
1203
1407
 
@@ -1208,7 +1412,16 @@ ravensight-playtest validate my-branch --base main --runs 5
1208
1412
  ravensight-playtest replay <runId> --ref my-branch --baseline
1209
1413
  ```
1210
1414
 
1211
- Each persona run is one standard Playtest purchase of 5 AI units, and the whole plan is charged once at the start. Below five runs a side the result says not significant and shows a direction only. A run that does not earn its unit is refunded and does not count in the comparison. If one side ends with no usable run there is nothing to compare, and the runs on the other side that played and reported keep their units, because those runs happened and their reports are real. `--extend-to <n>` buys more pairs only when the first answer was too small to call. `--fail-on-regression` exits 1 for CI. A replay makes no model call and is free. See [what a replay does and does not prove](docs/REPLAY.md).
1415
+ Each persona run is one standard Playtest purchase (32 AI units, $6.40 today), and the whole plan is charged once at the start. Below five runs a side the result says not significant and shows a direction only. A run that does not earn its unit does not count in the comparison, and the server bills it at no more than what it cost us, or refunds it in full when the cause was ours (see "A thin run is billed at what it cost"). If one side ends with no usable run there is nothing to compare, and the runs on the other side that played and reported keep their units, because those runs happened and their reports are real. `--extend-to <n>` buys more pairs only when the first answer was too small to call. `--fail-on-regression` exits 1 for CI. A replay makes no model call and is free. See [what a replay does and does not prove](docs/REPLAY.md).
1416
+
1417
+ | Flag | What it does |
1418
+ |---|---|
1419
+ | `--hosted` | Play exported builds of both commits on hosted machines on one seed and compare them state by state, with no personas. See [Hosted comparison](docs/REPLAY.md#hosted-comparison). |
1420
+ | `--seed <text>` | With `--hosted`, the seed both builds play. The default is made from the two commits. |
1421
+ | `--games <n>` | With `--hosted`, games a side, 1 to 10, default 3. |
1422
+ | `--steps <n>` | With `--hosted`, the most actions a game, 1 to 10000, default 300. |
1423
+ | `--no-wait` | With `--hosted`, start the comparison and exit; the job page shows the result. |
1424
+ | `replay --job <jobId>` | Read the run's uploaded trace from that job when this machine has none. |
1212
1425
 
1213
1426
  ## Create a game (Labs, Experimental)
1214
1427
 
@@ -1248,6 +1461,7 @@ When every declared milestone has validated, a persona plays the finished game.
1248
1461
  | `--allow-tool-scripts` | Let the checks import edits to `project.godot`, addons, `.godot` or `@tool` scripts. |
1249
1462
  | `--stop` | Close the plan now. |
1250
1463
  | `--assets-dir <dir>` | The folder inside the project that holds your art and audio, default `assets`. |
1464
+ | `--template <name>` | `godot-2d`, the only template `create` uses. `godot-3d` is refused: it does not make a 3D game. |
1251
1465
 
1252
1466
  ## Build a feature (Labs beta)
1253
1467