rollback-soak
БесплатноЗапускает вложенные скриптыНе проверенSoak-test the rollback engine against production replays - play prod games plainly and under randomized rollback-harness settings (forced depth, per-player…
от ShieldBattery★ 232 звезды на GitHubОб этом скилле
Rollback soak testing
Rollback bugs (desyncs, crashes) almost always reproduce from a replay: re-simulating frames from a
restored snapshot must give exactly the state plain playback gives. The soak plays many prod
replays both ways and compares, frame by frame, the fingerprint the harness and the probe already
log (RNG words, minerals/gas, trigger timer, player types, state_hash).
It exercises the snapshot/restore/re-simulate engine (game/src/rollback/) through the replay
harness (rollback_harness.rs). It does not exercise live-only paths: rollback_live pacing,
prediction, the relay, live leave timing. It does reproduce the shapes live ticks take when turns
run late (rollback_harness/live_shapes.rs), and the runner gives half its runs some of them:
SB_ROLLBACK_HARNESS_STALL=<every>:<ticks>[:<release>[:<ids>]] withholds players' turns until
that many ticks have stalled at the prediction limit (SB_ROLLBACK_PREDICT), each stalled tick
entering BW's step with the turn receive finding nothing; SB_ROLLBACK_HARNESS_CATCH_UP=<frames>
is how many extra frames a tick then steps to catch up; SB_ROLLBACK_HARNESS_MID_TICK=1 makes
a tick learn of commands between its steps rather than before it plans. The harness CSV's
stalled and frames_behind columns show them. A replay also has no local player, so code that depends on
the local player only runs when a run sets SB_ROLLBACK_HARNESS_VISION (the runner randomizes it).
Nor does it have a local selection unless a run sets SB_ROLLBACK_HARNESS_SELECT=<frames> or
SB_ROLLBACK_HARNESS_OWN_SELECTIONS (below; the runner adds one or the other to most vision runs). Every that many frames it selects one of the vision player's
eggs or a group of their other units, and the frames between often select a unit of theirs the
moment it appears, on its own or added to the selection, so restores go back to before a selected
unit existed. While the game steps, it also makes that player the local
player, so step code that only runs for the local player's selection runs too: a selected egg
hatching selects its second zergling, and the debug log notes each such addition, along with the
units a tick gives back to the selection once the re-simulation has created them again. Selections stick
to what the game's UI could make (an egg only on its own, no buildings in a group). Anything else
crashes SC:R's status panel renderer in PrismRenderer_draw, whatever rollback is doing.
SB_ROLLBACK_HARNESS_OWN_SELECTIONS=<turns> replaces those random selections with the vision
player's own ones from the replay (plain, shift-add, shift-remove and hotkey recalls), made through
the select hook as the person's while the frame <turns> before the command runs is shown. Their
selections then send commands as a live person's do, so the engine's after-rollback reconcile and
its estimate of when a selection's command has run get exercised; random selections never reach
them. It's the knob for reproducing a selection crash from the player's own replay. A command that
leaves the local selection exactly as it is gets skipped: it's the game catching the simulation up
with one of its own changes, like taking a drone that started a building out of a group.
It also makes the player's control group assigns and adds through the code a live game keeps
unrun group changes with (bw_scr/sent_group_changes.rs), so a recall mirrored before the replay
has run such a change selects what the change leaves the group holding. Sixteen frames after the
replay runs each change, the mirror compares the group the simulation holds with the units it
worked out. Grep the game log for group changes so far (a running tally, every 10 changes) and
for left it holding: an info line is a unit the person had selected that was gone from the
simulation's selection by the time the change ran, which is expected; a warn line is a group
the game's rules filled differently than group_after_change models, which is a bug in that
model.
Everything here lives in this skill's directory; data goes to .claude-scratch/rollback-soak/.
| File | Purpose |
|---|---|
soak.mjs |
The runner (queue → plain run → K harness runs → compare → keep failures) |
triage.py |
Outcome counts + each failure's config and nearest player_types change |
cmds.mjs |
node cmds.mjs <rep> <from> <to> — a replay's commands in a frame range |
clean-stop.sh |
After killing a runner: kill its Electron/games (only those), rerun unfinished games |
pin-dlls.sh |
Build both arches (bench-dll profile) and pin them for the soak |
diff-dumps.py |
Diff two processes' SB_ROLLBACK_DUMP_FRAME dumps, pointers normalized |
desync-diff.mjs |
Find where a live game's log leaves plain playback; diff two unit tables |
Setup
- A branch with the harness tooling. Needs
SB_ROLLBACK_SOAK(game/src/rollback_soak.rs: unpaced playback, writes a done-file and exits at the replay's end) and the app's dev-only `S
Установить rollback-soak в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл rollback-soak?
Soak-test the rollback engine against production replays - play prod games plainly and under randomized rollback-harness settings (forced depth, per-player late commands, snapshot spacing, vision, x64/x86) and check every confirmed frame's state hash against plain playback, then triage any divergence or crash down to the unsnapshotted state behind it. Use when asked to soak/stress-test rollback, hunt rollback desyncs, validate a snapshot-range change, or reproduce a rollback divergence from a replay.
Как установить скилл rollback-soak?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл rollback-soak запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic