Bash.tv → GitHub → itch.io

Quality gates

A bot that says “the game works” has to show it. These 20 gates are checked for every game, and each one ends as:

Status Means
PASS It was checked, and the evidence is in the report: a measurement, a test result or a screenshot that was actually taken.
FAIL It was checked and something is wrong. The report says what.
NOT TESTED Nobody has checked it yet, or it couldn’t be checked here. This is not a pass.
NOT APPLICABLE It doesn’t apply to this game (for example Audio in a silent game), and the report says why.

Never mark a gate PASS because the code looks correct. If it wasn’t run, it’s NOT TESTED.

The gates

Gate Requirement Checked automatically by
JavaScript No unexpected runtime errors page errors, console errors and the Error Handler’s list while loading, playing and resizing
Build Production build completes successfully running the build command (NOT APPLICABLE for plain files)
Assets No missing required resources every file referenced in HTML, CSS and JS exists, and no 404s while playing
Network No unexpected failed requests failed requests and 4xx / 5xx responses
Desktop Keyboard and mouse controls work the screen or __game.state() changes after a click and key presses, and not before
Mobile Touch controls work where supported the same with real touch taps at 390 x 844
Responsive Game remains playable at supported sizes no page scrolling and the whole canvas on screen at five sizes, phone to large desktop
Audio Respects browser autoplay restrictions sound only starts after the first tap; no failed play() calls
Pause Gameplay pauses correctly __game.pause(), or Escape / P freezing a moving screen and unfreezing it again
Restart Game restarts without reloading unnecessarily __game.restart() without the page reloading
Game Over Player can recover or restart __game.gameOver(), then Enter or a tap starts play again
Performance Meets the project’s performance budget frame rate, slow frames and load time against docs/PERFORMANCE_BUDGET.md
Memory No unbounded growth during testing JavaScript memory before and after a stretch of play (Chromium)
Persistence Save data works when applicable saved keys survive a reload; no crash with storage blocked
Accessibility Meets project accessibility requirements basics only (language, button names, reduced motion); the rest needs a person, so it stays NOT TESTED until evidence is recorded
Security No exposed credentials or secrets keys, tokens, private keys and .env files in tracked and published files
Licensing Third-party assets are documented every asset file and library is named in CREDITS.md or docs/LICENSE_INVENTORY.md
Documentation Matches actual game functionality keys used in the code appear in the docs; no template text left; versions match
Git Changes are reviewable and properly tracked in git, has commits, no huge or secret files tracked, no conflict markers; lists what’s uncommitted
Platform Meets verified publishing requirements the checks for each --platform (Bash.tv, itch.io, CrazyGames, Poki, web)

Run them

python3 scripts/run-gates.py .                                     # serves the game itself (public/ or the project folder)
python3 scripts/run-gates.py . --url http://localhost:5173         # a game on a dev server
python3 scripts/run-gates.py . --platform bash,itch --strict       # before a release: NOT TESTED also fails
python3 scripts/run-gates.py --list                                # the gate names

The script is copied into every game by toolkit/project-docs/new-project.py. It needs Python 3.9 or newer, plus playwright-cli for the browser gates (already in Bash.tv sandboxes). It writes the report to .project/VALIDATION_REPORT.md (lite projects: VALIDATION.md) and exits with 1 if any gate fails.

Games that use WebGL, WebGPU, Three.js, PixiJS or Phaser

A browser without a GPU can’t show these properly, so the browser gates are skipped and marked NOT TESTED. Check them in a browser with a GPU instead. In Bash.tv, use the viewer’s preview (look_at_preview) or check_gpu_render, then record what you saw in the evidence file. On a machine with a GPU, add --allow-gpu.

Help the checks: the test hook

Games that set this let the gates check pause, restart and game over directly:

window.__game = {
  state: () => scenes.name,            // "title" | "playing" | "paused" | "gameover"
  pause, resume, restart, gameOver,
};

Without it, those gates use the keyboard where they can and otherwise stay NOT TESTED.

Checks done by hand

Some things need a person or a GPU browser. Record them in .project/evidence.json (lite: evidence.json):

{
  "accessibility": { "status": "PASS", "evidence": "Played level 1 with keyboard only and touch only; shake off and text size 150% work", "date": "2026-11-28" },
  "mobile": { "status": "PASS", "evidence": "Played a full round on an iPhone 13 in Safari", "files": ["builds/evidence/phone.png"], "date": "2026-11-28" }
}

The rules for evidence recorded by hand:

Lite projects

Game jam projects run the same gates. The difference is what’s expected: anything that needs a person (pause, game over, accessibility) may stay NOT TESTED, as long as the report says so. Before publishing on a portal, use --strict.

Tests for the script

python3 toolkit/quality-gates/tests/test_gates.py          # with the browser, about a minute
python3 toolkit/quality-gates/tests/test_gates.py --no-browser

They run the gates on a game that should pass and a game with deliberate problems, and check the evidence rules.