Versions and releases
Rehearse follows semantic versioning. A version is major.minor.patch:
- a patch release fixes something and changes no shape or meaning;
- a minor release adds something: a command, a flag, a manifest key, an optional field in an output;
- a major release may break what worked, and its changelog section says how.
What counts as breaking
Section titled “What counts as breaking”Agents, CI gates and other tools read Rehearse only through what it prints, how it exits and the files it reads. So these are Rehearse’s public API. Changing any of them in a way that could break a reader is a major release:
| Public | Breaking |
|---|---|
| The commands and their flags (CLI) | a command or flag removed or renamed, or doing something else |
| The exit codes: 0, 1 and 2 (CLI) | a code that means something else |
The JSON outputs, as schema/v1/*.schema.json describes them (JSON contract) |
a field removed, renamed, or of another type or meaning |
rehearse.yaml (rehearse.yaml) |
a key removed or renamed, or meaning something else; a file that read before refused |
The scenario files: *.flow.yaml, *.rehearse.yaml, announcements (Scenario files) |
the same |
Scenario ids (file#name) and the stage’s address (?s=<id>) |
an id or a link that named a scenario naming another, or none |
The package’s exports: @kurvball/rehearse, @kurvball/rehearse/worlds, @kurvball/rehearse/schema/v1/* |
a name removed, or of another type |
A new optional field in a JSON output is not breaking: readers ignore what they don’t know. Open string fields (a kind, a driver, a layout) may gain values in a minor release too: a reader treats a value it doesn’t know as unknown, as the JSON contract says.
What a scenario observes can change in any release, when a runner learns to see more: its runner version (such as
call/2) goes up, and cached baselines run again. That changes verdicts only where the product changed.
A JSON shape never changes inside its version
Section titled “A JSON shape never changes inside its version”Each output has a schema in schema/v1/ and prints "v": 1. A shape that has to change gets a new file in
schema/v2/, prints "v": 2, and ships in a major release. A schema/v1/ file is never edited to describe
another shape, so a tool that validates against v1 never sees v1 change under it. The only edit a v1 schema
takes is a new optional field.
The SDK
Section titled “The SDK”@kurvball/rehearse is the SDK: what a program can use without going through the CLI.
runCli(argv, { cwd, env, progress })runs one command line asrehearsewould and returns what to print:{ json, text, code }, withrefused: truewhen its words belong on stderr. It never exits the process: the caller does.bringUp(manifest, service, checkout, options)brings one service up in a checkout and waits until it is ready. The caller stops it withbringDown(manifest, running).- A
RehearseErroris a refusal: itscodeis stable, and itssaysis for people. @kurvball/rehearse/worldsexportsdefineWorldandworldMain, to write worlds in TypeScript.
Pin a release
Section titled “Pin a release”Each release is a tag, vX.Y.Z, and a GitHub Release on
kurvball/rehearse with the package’s tarball attached,
kurvball-rehearse-X.Y.Z.tgz. The package is @kurvball/rehearse, and it isn’t on npm yet, so pin a release by its
tarball. The following adds 1.1.0 from its release.
pnpm add -D https://github.com/kurvball/rehearse/releases/download/v1.1.0/kurvball-rehearse-1.1.0.tgzTo keep the tarball in your repository instead, download it from the release’s page, or build it from the tag, and
add it by its path, such as ./vendor/kurvball-rehearse-1.1.0.tgz. The following builds it from the tag.
git clone --branch v1.1.0 https://github.com/kurvball/rehearse.gitcd rehearsepnpm installpnpm packYour package.json then names that exact tarball, so every install gets that exact version until you change it.
Where to read what changed
Section titled “Where to read what changed”Every version’s section is in the changelog, and in the notes of its GitHub Release. A major version also gets an upgrade guide. This site documents the version its header shows, and each command, flag and schema in the reference says the version it was added in. RELEASING.md says how a release and a hotfix are made.