Repository navigation
EN Contribute Quality Baseline
Français · Type: how-to · Audience: contributor · Context: engine repository · Status: ready · Applies from: 4.4.0
tests/quality-baseline.json freezes what the engine does: on a set of games, the witness the solver finds and the
digest of the state after every input, the proof's verdict and state count, every golden save played to its end, the
public surface, the number of tests and the first visit's JavaScript. A refactoring keeps it identical; a behaviour
change rewrites it on purpose and says so.
Either ✔ same behaviour as tests/quality-baseline.json for a change meant to keep behaviour, or a rewritten baseline
whose every moved line you know and own in the CHANGELOG fragment.
The engine repository. The baseline dates from 4.1.0 "Clarity" (frozen before the engine was split into modules); the
"ratcheted" report from 4.1.3; the READMEs' figures from 4.1.8; the README's install section from 4.1.20; heroes in
the measured games from 4.4.0.
What it measures, as of 4.4.0 (tools/quality-baseline.ts):
| Part | What is frozen | Rule |
|---|---|---|
games (16) |
demo, reference, heroes, the five classics, three partial-order fixtures, and the world, cast, scale, picture, mini fixtures: the witness (status, finished, number of inputs, a hash of the digests after every input) and the proof (status, states, softlocks) |
identical |
saves (43 as of 4.4.0) |
each golden save of tests/fixtures/saves/demo-*.json, loaded and played to its end: ended, inputs, last digest |
identical |
surface.api |
a hash of tests/api-surface.json (the public API and the MCP tools) |
identical |
tests |
test files and test declarations (it(, test(, .each, .skipIf, .runIf) |
may only grow |
bundle.initialJsKB |
the first visit's JavaScript, gzipped, from verify:dist (with --dist) |
may only shrink |
It also keeps two places of the READMEs in step: the figures between <!-- metric:tests -->, metric:initialJsKB and
metric:referenceStates markers (3257 declarations, 136 KB and 288 states at 4.4.0), and the archive URL between
<!-- install:begin --> and <!-- install:end -->.
A prepared repository (Developer setup). For --dist, a production build of the sample game in
dist/ (npm run build:game).
In the engine repository, on your machine. CI's check job runs npm run quality:baseline -- --check --dist on every
change.
-
Compare.
# in the engine repository npm run quality:baseline -- --check npm run build:game && npm run quality:baseline -- --check --dist # with the first visit, as CI
It solves and replays every game (
quality baseline: solving and replaying…), then prints✔ same behaviour…, or one✖line per difference, for instancedemo witness.digests: … → …(a state after some input differs:npm run replayon the witness names the entry),golden save demo-3.4.0.json last: … → …,tests/api-surface.json: the public API or the MCP tools changed, orREADME.md: a figure is behind the baseline.
-
Decide what a difference is.
- Your change was meant to keep behaviour (a refactoring, a rename, a speed-up): a difference is a regression. Find
it;
npm run replayon the witness names the first entry whose state differs. - Your change alters behaviour on purpose (a rule, a command, a solver change, a new test, a smaller bundle): go to step 3.
- Your change was meant to keep behaviour (a refactoring, a rename, a speed-up): a difference is a regression. Find
it;
-
Rewrite it, with the first visit if your change can move it:
# in the engine repository npm run quality:baseline npm run build:game && npm run quality:baseline -- --dist
A rewrite says what it moves, before writing:
⚠ behaviour moved: …for a digest, a verdict, a save or the surface, and✔ ratcheted: …for more tests or a smaller first visit. It writestests/quality-baseline.json, then the figures and the install URL ofREADME.mdandREADME.fr.md(✔ README.md: the figures written). Without--dist, the previousbundleis kept.
-
Own it. Commit the JSON and the READMEs with the change; say in the CHANGELOG fragment what moved and why ("the
reference chapter's witness changes", "the first visit goes from 125 to 132 KB").
tests/quality-baseline.jsonis a file the maintainer reviews (CODEOWNERS).
Limit ·
what-baseline-coversThe baseline freezes these games, saves and figures only. A behaviour no measured game exercises can change without moving it; a new mechanic belongs in a fixture or a game of the list, or in its own test.
npm run quality:baseline -- --check --dist ends with ✔ same behaviour as tests/quality-baseline.json: 16 games, n golden saves, n test declarations, first visit n KB and exit code 0.
| Symptom | Cause | Fix |
|---|---|---|
README.md: a figure is behind the baseline (npm run quality:baseline writes it) |
You added a test (the test count moved) without rewriting |
npm run quality:baseline, commit the READMEs |
⚠ better than the baseline, ratchet it |
More tests, or a smaller first visit: not a failure by itself | Rewrite it so the gain is kept |
tests: n declarations → m (a test was removed) |
A test was deleted or merged | Restore it, or own the removal in the pull request and rewrite |
first visit's JavaScript: n KB → m KB gzipped |
The player's first chunk grew | Load the new code on demand (Import boundaries), or own the growth |
<game>: new game, not in the baseline |
A game was added to the list | Rewrite it |
README.md: the install section names another version |
package.json's version changed (a release) |
Rewrite it: the release branch does |
tests/quality-baseline.json, README.md, README.fr.md. --check writes nothing.
git restore tests/quality-baseline.json README.md README.fr.md undoes a rewrite you did not mean.
-
tools/quality-baseline.ts,tests/quality-baseline.json. - Before a pull request, The dev loop, Benchmarks.
Generated publication · publication générée — current documentation · documentation courante: quest'n'click 4.4.0 r1, documentation revision · révision de la documentation 8dc717c69acb62c4742b69c54a7e7dfb620f75d8.
Earlier versions and permalinks · versions précédentes et liens permanents: https://wanoo.github.io/quest-n-click/docs/
An edit made in this wiki is overwritten at the next publication · une modification faite dans ce wiki est écrasée à la publication suivante.
Edit the source · Modifier la source · Report an error · Signaler une erreur
Index (6)
Start (6)
Play (9)
Install (17)
- Requirements
- Install from the release archive
- Install from npm, once published
- Install from the repository to work on the engine
- doctor: checking your machine
- Image toolchain
- Audio toolchain: ffmpeg, fluidsynth, Furnace, uv
- Upgrade
- Upgrade notes: 4.4
- Upgrade notes: 4.3
- Upgrade notes: 4.2
- Upgrade notes: 4.1
- Upgrade notes: v3
- Upgrade notes: v2 to v3
- Coming from web-scumm
- Package reference
- Install troubleshooting
Create a game (55)
- Your first game
- Layout of a created project and of the engine repository
- The working loop
- Content principles and the identity contract
- Rooms
- Geometry: placement, walk zones, masks, layers, camera
- Something is visible but unreachable
- Reactions
- Game commands
- Conditions
- Flags, variables and events: which to use
- Custom code
- Characters
- Items and inventory
- World map
- Dialogues
- Scripts and events
- Moving characters: patrols and walks
- Exits
- Chapters and objectives
- State and saves: persistent or temporary, renaming an id, migrations
- Staging: wide rooms and animations
- The stage: lights, particles, floors
- Skin and fonts
- Title and credits
- Heroes: several characters and hero choice
- Built-in minigames
- A custom minigame
- Translations
- Music in stems
- Sound effects
- Voices: per language and per hero
- Images: prompts, cutting sheets, transparency, scale
- Asset provenance
- The storyboard, source of truth
- Puzzle design
- Classic mechanics
- Review pages
- DSL reference
- Checking your game
- What the solver proves
- Solver options
- Playtests
- Remix
- Speedrun for authors
- The sealed ending
- Production template
- Example games
- Working with an AI
- Build and release a game
- Publish on GitHub Pages
- The static game on Clever Cloud
- Other static hosts
- Sub-path, cache and service worker, incomplete deploys, going back
- Testing on a phone over the LAN
Local Studio (24)
- The local Studio: overview and launch
- Edit a room
- Placement and stage
- Preview, apply, undo
- Storyboard
- Assets and cutting
- Check: validator, solver, critical path, heat, health, coverage
- Before and after captures
- Semantic diff
- Play and replay a session
- Rule explainer
- Language and objectives
- Voices and the heroes × languages matrix
- Map
- Notes
- Remix in the Studio
- Music
- The Assistant: bring your own key
- Demo mode and studio-apply
- Local and LAN security
- Studio API
- Local MCP: setting up each client
- MCP tools
- Studio troubleshooting
Team Studio (21)
- What runs where
- Concepts: revision, transaction, span, lease, preview, build
- Starting as an invited dev
- Working together day to day
- Roles and actions: the full matrix
- Invitations
- Managing members
- Write refused on the hosted Studio: stale base revision (409)
- Write refused on the hosted Studio: span locked (423)
- Recovering after a lost lease, a disconnection or a stale preview
- Comments
- Map and semantic diff
- Publishing builds
- Remote MCP
- The game in Git
- Upgrading the engine of a hosted game
- Hosted assets
- The server's command line
- Health and metrics routes
- Trying it locally with compose.yml
- Known limits
Clever Cloud (23)
- Clever Cloud: overview, cost and prerequisites
- Apps and add-ons
- Domains and TLS
- Keycloak
- Generic OIDC and GitLab
- Configuration
- First deployment
- Backups
- RPO and RTO
- Restore the Studio on a fresh installation
- Redeploys
- Upgrading the server and checking state after a migration
- Limits of going back
- Monitoring
- Security
- Rotating keys
- Recovering admin access
- Changing domain or OIDC provider
- Worker, PostgreSQL or Cellar down
- Exporting the game and leaving the installation
- Retention
- Clever Cloud troubleshooting
- Costs and teardown
Reality Bridge and connectors (16)
- The Reality Bridge: what it is
- Quick start
- Guarantees
- Install and run the Bridge
- Backup and restore
- Several tenants
- Signals and the manifest
- The Bridge's command line
- Connectors overview
- Email connector
- Telnet connector
- SSH connector
- Open Badges connector
- The connector SDK
- Security: Biscuit and signatures
- Bridge and connector troubleshooting
Contribute (25)
- Welcome
- Developer setup
- The dev loop
- Before a pull request
- Conventions
- Writing documentation
- Architecture
- Code tour
- Import boundaries
- Which tests run when
- Mutation testing
- The coverage ratchet
- The quality baseline
- CI explained
- Field passes
- Benchmarks
- Releasing
- npm packages
- Decisions and ADRs
- Governance
- Bot pull requests
- Contributing with AI agents
- Security policy
- Code of conduct
- Licences and credits