You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 41307de
Browse filesBrowse the repository at this point in the historyBrowse files
Experiments: pick your own variant in the dev menu, vi on experiment rows, 0.7.1 (#19)
- Server > Experiments (new sub-tab) and palette commands "Experiment <name>: use <variant>" / "clear my variant":
an owner or dev picks a variant of an analytics experiment for themselves, sees which one they're in and why
(random, forced by the settings, their pick), and clears it. Same rule as Modules > State (devs where the dev-only
tools are open, owners everywhere), re-checked by the server ops (exp.list, exp.set: one change a second) and by the
analytics engine through a gate the dev menu registers (analytics/dev-control.ts); the gate also requires a dev.
- The pick is stored in the analytics DataStore (dexp/<UserId>, read at join only for players the gate allows), wins
over the signed settings, is stamped forced on a new experiment row (also when it equals the random variant), and
re-sends the player's hello so the client side agrees. A variant the game didn't pass is refused; a stored pick is
ignored while the gate refuses the player.
- Experiment rows carry vi (the variant's 1-based position in the game's list) so the backend can check the split.
- Lune: test-analytics-server (stored pick at join, set / clear, forced rows, vi, gate closed), test-dev-access
(exp.list / exp.set and the engine gate per server kind and role).
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+16-3Lines changed: 16 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -192,9 +192,20 @@ return the generation's stop function, which the kernel calls on a swap.
192
192
close it, dock all windows; Reload, Roll back, switch branch, load a build here, join a server on a branch or build
193
193
(the Branch tab's rules and words, `devtools/build-actions.ts`), New server and Join a listed server (owners); find a
194
194
player by name, display name or UserId and open them in Manage > Players or their Kick / Ban card (owners); copy the
195
-
job id, artifact id, commit, branch or place version (the copy popup); "Ask Claude: ..." puts the query in the Claude
196
-
draft. Anything that swaps what runs on the server takes a second Enter or tap to confirm. The kernel and the server
195
+
job id, artifact id, commit, branch or place version (the copy popup); "Experiment <name>: use <variant>" / "clear my
196
+
variant" (Server > Experiments, below); "Ask Claude: ..." puts the query in the Claude draft. Anything that swaps what runs on the server takes a second Enter or tap to confirm. The kernel and the server
197
197
re-check every request. Core: `devtools/commands.ts` (pure, Lune-tested by `scripts/test-commands.luau`).
198
+
-**Server > Experiments (framework 0.7.1): your own variant.** Every analytics experiment the game asked about for
199
+
you, the variant you're in and why (random, forced by the settings, or your pick), a button per variant to pick it
200
+
for yourself, and Clear; the palette has the same as "Experiment <name>: use <variant>". Devs where the dev-only
201
+
tools are open to them (dev rules, or owners on a server an owner switched), owners everywhere: the same rule as
202
+
Modules > State, re-checked by the server and by the analytics engine (`analytics/dev-control.ts`). It only ever
203
+
changes your own variant, at most one change a second. The pick is stored in the analytics DataStore
204
+
(`dexp/<UserId>`, read at join only for players the rule allows), so it follows you to every server; it wins over the
205
+
signed settings (stop, settle, weights, `players`), is stamped `forced` on the experiment row (the backend leaves
206
+
forced players out of the results), and the game sees it the next time it asks for your variant, usually your next
207
+
join. A pick the game's variants don't have is refused. While the rule doesn't allow you (a dev on a prod server,
208
+
a revoked role) a stored pick is ignored.
198
209
-**Server TPS (framework 0.4.2, kernel 0.4.2):** Server > Status has a *TPS* line next to Memory and Lua heap: the
199
210
last minute's average, its slowest second and the physics FPS (`59.9 avg, 52.0 min, physics 60`; the warning colour
200
211
under 50 on average). Older kernels show `needs kernel 0.4.2`. The same numbers ride on fleet heartbeats (the
@@ -574,7 +585,9 @@ const variant = analytics.experiment("onboarding", ["short", "long"]); // same a
574
585
The settings turn one off (`active: false`: everyone gets the first variant), sets `weights` or forces a
575
586
`variant`, live. `players` (framework 0.5.3+) forces a variant for single players, keyed by UserId or pid, over
576
587
everything else (QA, support); a client only ever gets its own entry. The CLI writes these with `typetorch
Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "@typetorch/framework",
3
-
"version": "0.7.0",
3
+
"version": "0.7.1",
4
4
"description": "TypeTorch framework for roblox-ts: hot-swappable modules (dependency injection, lifecycle, troves), guarded networking, hot assets and the in-game dev menu. Ships inside every TypeTorch artifact.",
check("dev: set answers the list", entry~=nilandentry.variant==otherandentry.how=="dev"andentry.override==otherandreply.saved==true, entryandentry.how)
713
+
check("dev: saved to the store", records["dexp/2"].onboarding==otherandrecords["dexp/2"].stored=="b"andrecords["dexp/2"]["bad name!"] ==nil)
Copy file name to clipboardExpand all lines: src/analytics/SCHEMA.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,7 @@ First-ever-session detail, one row per packed chunk.
76
76
| zone |`leave`|`zone`, `to?`, `secs`|
77
77
| state |`activity`|`to`, `from` (server or client src) |
78
78
| state |`screen`|`to`, `from` (`""` = none). Client: ScreenGuis in PlayerGui (Enabled), GuiObjects tagged `TTScreen` (Visible), `screen()`|
79
-
| experiment |`<experiment>`|`variant`, `variants` (count), `forced?`. Once per session when assigned or changed. At most 32 experiments per session: a 33rd `experiment()` returns the control (the first variant) and warns. A client's experiment calls count against its event budget (below) |
79
+
| experiment |`<experiment>`|`variant`, `variants` (count), `vi` (the variant's 1-based position in the game's list; 0.7.1+), `forced?` (the settings or the player's own dev pick chose it). Once per session when assigned or changed, and again when the same variant becomes or stops being forced. At most 32 experiments per session: a 33rd `experiment()` returns the control (the first variant) and warns. A client's experiment calls count against its event budget (below) |
80
80
| recording_meta |`start`|`share` (the recorded share then), `secs?` (the window then: `recordSeconds`; frameworks before it leave it out and used 60) |
81
81
| recording_meta |`end`|`chunks`, `bytes`, `why`: `window` (`recordSeconds`, default 60 s, after the first input), `cap` (10 min, or the recording's 256 KB / 80 chunks), `left`, `end`|
82
82
| fleet |`heartbeat`| The kernel's `fleetStatus()` (kernel 0.3.2+), every 60 ± 10 s and once at each generation start. pid `""`|
0 commit comments