jig-harness/jig
M14 Testing strategy · in your tools

M14 mappings — per-ecosystem implementations

The module invariant is tool-independent: declared tiers with budgets, honest doubles, an injected clock, polling instead of sleeping, predicates proven where they execute, typed builders, type-checked tests, tests with every change, no real developer state, coverage as a trend, and a tripwire on suites that skipped themselves. This file maps each piece onto concrete languages, test runners and CI providers. Replace <placeholders> with your values. The reference scripts need the pinned Bun runtime; everything else here is a feature of the named tool.

Tiers in CI

A tier is a trigger plus a time budget. The trigger is CI configuration. The budget bounds the whole suite’s elapsed time: a timeout on the command that runs the suite, or a step that measures the run against the budget. The job timeout bounds it too, but M13 sizes it as a generous backstop, about two to three times the slowest healthy run and at most an hour, so it enforces a budget alone only when the budget is that loose; a tighter budget goes on the command or step. A per-test timeout in the runner is useful too, but it bounds one test, not the suite: hundreds of tests each under their limit can still run far past the tier’s budget.

CI providerEvery push / pull requestWhen paths changeNightly and on demandJob timeout (the backstop)
GitHub Actionson: push / on: pull_requesta resolver job that lists changed files and sets outputs the tier’s job reads in if: (a trigger-level paths: filter never starts the workflow, which leaves its required check pending and blocks the merge)on: schedule (cron) and on: workflow_dispatchtimeout-minutes on the job
GitLab CIdefault pipeline on push and merge requestrules: - changes: [<paths>]rules: - if: $CI_PIPELINE_SOURCE == "schedule" plus a pipeline schedule; when: manual for on demandtimeout: on the job
CircleCIdefault workflowthe path-filtering orbscheduled pipelines; an API-triggered pipeline with a parameterthe suite’s command wrapped in timeout <duration> (from coreutils); no_output_timeout on a step bounds only silence, not total time
Jenkinsthe multibranch jobwhen { changeset "<glob>" }triggers { cron('H 2 * * *') }; “Build with parameters”options { timeout(time: 10, unit: 'MINUTES') }

Within a suite, the test runner selects the tier and bounds each test:

RunnerSelect a tierPer-test time limit
Bunseparate directories or file name patterns passed to bun testbun test --timeout <ms>
Vitestprojects (one per tier) or --projecttestTimeout
Jestprojects, or --selectProjectstestTimeout
pytestmarkers (@pytest.mark.integration) selected with -mthe pytest-timeout plugin (--timeout)
Go//go:build integration build tags, or testing.Short() with go test -shortgo test -timeout <duration> (whole binary)
JUnit 5@Tag("integration") with Gradle’s useJUnitPlatform { includeTags(...) } or Maven Surefire groups; Maven Failsafe for *IT classes@Timeout, or junit.jupiter.execution.timeout.default
xUnit / NUnit (.NET)[Trait("Category", "Integration")] / [Category] with dotnet test --filterxUnit [Fact(Timeout = <ms>)] on async tests; NUnit [Timeout] / [CancelAfter]

A budget can also be measured: record the start time, run the suite, and fail the step when it took longer than the tier allows, naming the budget in the error. That catches a suite slowly growing towards the job timeout.

Keeping the full end-to-end sweep off the per-change path. Put a marker comment in each workflow that runs the full sweep (for example # test-tier: end-to-end), and add a grep gate over the CI configuration that fails when a marked file declares a per-change trigger (pull_request, pull_request_target or push in GitHub Actions; a rule without the schedule condition in GitLab CI). Make the gate also fail when a workflow runs the end-to-end command without the marker, so the ban cannot be dodged by leaving it off. M1’s grep-gate convention applies: a self-test with fixtures, run in CI.

Honest doubles

EcosystemTyped against the real contractRejects what the real dependency rejects
TypeScripttype the double as the real interface (const repo: Pick<OrderRepository, "find"> = …, or satisfies OrderRepository); never anyMock Service Worker with onUnhandledRequest: "error" fails a request no handler expects; a fake command checks its arguments (below)
Pythonunittest.mock.create_autospec(Real) or patch(..., autospec=True): a call with the wrong signature raisesresponses raises on a request it was not told about; respx can assert that every request was mocked
Gothe double implements the consumer’s interface, so the compiler checks itgo.uber.org/mock (gomock) fails the test on an unexpected call; httptest.NewServer with a handler that returns an error for unknown paths
JVMMockito mocks of the real type; WireMock stubs from the provider’s contractMockito’s strict stubs (the default with MockitoExtension) report an argument mismatch; WireMock answers an unmatched request with 404
Any HTTP APIa consumer-driven contract (Pact) verified against the providerthe provider verification fails when the consumer expects something the provider does not do

A fake command-line tool (a script put first on PATH to stand in for a vendor CLI) holds, per subcommand, the flags and operands the installed version accepts, written from that tool’s own help or reference rather than from the code under test. It exits non-zero with “unknown flag” for anything else, before it picks a canned response. Prove each new boundary with a mutation check: change a flag at the real call site to a misspelling, run the test, see it fail on the fake’s error, and restore the call site (or run the mutation on a temporary copy).

Injected clock

EcosystemThe clockLint rule that bans reading the wall clockTest side
TypeScript / JavaScriptan interface such as { now(): Date } passed in as a dependency, with one system implementationa Biome GritQL plugin matching Date.now() and a no-argument new Date(); or ESLint no-restricted-syntax with the selectors CallExpression[callee.object.name='Date'][callee.property.name='now'] and NewExpression[callee.name='Date'][arguments.length=0]a fixed or advancing fake; for code not yet migrated, setSystemTime (bun:test), vi.setSystemTime (Vitest), jest.setSystemTime (Jest)
Pythona callable (now: Callable[[], datetime]) or a small protocolRuff flake8-tidy-imports banned-api (rule TID251) on datetime.datetime.now, datetime.datetime.utcnow and time.time; Ruff’s flake8-datetimez (DTZ) rules additionally require time-zone-aware valuesa fake callable; freezegun or time-machine for code not yet migrated
Goa func() time.Time field or a clock interface (k8s.io/utils/clock, github.com/jonboulle/clockwork)golangci-lint forbidigo with the pattern ^time\.Now$the libraries’ fake clocks; testing/synctest runs a test in a bubble with its own fake time
JVMjava.time.Clock injected; Instant.now(clock), LocalDate.now(clock)an ArchUnit rule that no class outside the clock adapter calls Instant.now(), LocalDateTime.now() or System.currentTimeMillis()Clock.fixed(...), Clock.offset(...)
.NETTimeProvider (.NET 8 and later) injectedMicrosoft.CodeAnalysis.BannedApiAnalyzers (rule RS0030) with DateTime.Now, DateTime.UtcNow and DateTimeOffset.UtcNow in BannedSymbols.txtFakeTimeProvider (Microsoft.Extensions.TimeProvider.Testing)

Scope the rule to runtime code and exclude the one system-clock adapter. Arithmetic on a value the clock returned stays allowed: the rule matches the read, not new Date(<value>) or date arithmetic. If the codebase has many existing reads, put the rule at warning level under M1’s ratchet so the count can only fall.

Poll, don’t sleep

EcosystemPolling with a deadlineRule against fixed sleeps
TypeScript (Bun, any runtime)reference/poll-until/reference/fixed-delay/ over test and tooling code: its default texts are Bun.sleep(, setTimeout(, sleep( and time.sleep(, and it accepts a fixed-delay: <reason> comment on the same line or the line above
Vitest / Jestvi.waitFor(fn, { timeout, interval }), expect.poll (Vitest); Testing Library’s waitForthe same gate
Playwrightexpect.poll(fn, { timeout }), expect(fn).toPass(), and auto-waiting assertions such as toBeVisible()eslint-plugin-playwright’s no-wait-for-timeout
Pythontenacity (retry_if_result, stop_after_delay, wait_fixed)reference/fixed-delay/ on the test files with --pattern 'time.sleep(' --pattern 'asyncio.sleep(', which accepts the repository’s own # fixed-delay: <reason> comment (Ruff TID251 can ban it too, but its # noqa is a tool-native escape that M1’s registry leaves out and that needs no reason)
Gotestify’s require.Eventually(t, cond, waitFor, tick); Gomega’s Eventually; wait.PollUntilContextTimeout (k8s.io/apimachinery)golangci-lint forbidigo on ^time\.Sleep$ in _test.go files
JVMAwaitility: await().atMost(Duration.ofSeconds(30)).until(...)ArchUnit rule against Thread.sleep in test classes

Whatever the helper, the failure message names what was awaited, and the fixed-delay token is registered in M1’s suppression-token registry with its consuming gate, its placement and when it is stale (no delay on its line or the line below). The fixed-delay gate has no imports beyond Bun’s and Node’s built-ins, so a repository can copy check-fixed-delay.ts as it is, or run it from a pinned Jig checkout as the tests-with-changes recipe does.

Predicates where they execute

Run the real engine in the test job and seed data the predicate must hide.

NeedTools
A real database per test runTestcontainers (Java, Go, Node, Python, .NET); a database service container in the CI job (GitHub Actions services:, GitLab CI services:)
Tenant scope enforced by the databasePostgreSQL row-level security tested inside a transaction that sets the session’s role and tenant settings (SET LOCAL ROLE, set_config(..., true)) and is rolled back at the end; pgTAP for tests written in SQL
Authorization policiesthe policy engine’s own test runner, such as opa test for Open Policy Agent

Each test seeds at least two tenants (or a live and a soft-deleted record), asserts what the predicate lets through, and asserts what it hides. A test that seeds one tenant passes whether the predicate exists or not.

Typed builders

EcosystemBuildersDeterministic values
TypeScripta plain function with an explicit return type and Partial<T> overrides; fishery (Factory.define<Order>(...))fixed timestamps and identifiers, or faker.seed(<n>) with @faker-js/faker
Pythona function that calls the constructor with every field by name, def an_order(**overrides) -> Order: return dataclasses.replace(Order(id="order-1", status="open"), **overrides), checked by mypy or Pyright; factory_boy and polyfactory generate values at run timefixed values in the builder; factory.random.reseed_random(<seed>) for a generator
Goa function returning the struct, with functional options for overrides; exhaustruct (in golangci-lint) run over the builders, so a field left out of the literal fails the lintfixed values; no time.Now() in defaults
JVMthe test-data builder pattern; Instancio; Kotlin functions with default argumentsInstancio with a fixed seed; fixed values
.NETAutoFixture; Bogus (new Faker<Order>())Randomizer.Seed in Bogus; fixed values

The builder returns the contract type the consumer reads (the response type, the table’s row type), so adding a required field to that type breaks the builder at compile time. That holds only for a builder that builds the value itself, with a typed constructor call or literal: a plain function, the builder pattern, Kotlin default arguments, fishery’s typed define. Go is the exception among those: a keyed struct literal compiles with fields left out and gives them their zero value, so a Go builder gets the same guarantee only from a linter that requires every field in the literal (exhaustruct), run over the builders in the per-change gate. Generators that fill fields by reflection at run time (factory_boy, polyfactory, Instancio, AutoFixture, Bogus) still compile when the type gains a field and fail, or silently fill it, only when they run. Use them for values inside a typed builder, not as the builder.

Tests are code

EcosystemTest files type-checked by
TypeScriptthe type check covering test files: test paths in the tsconfig.json include, or a tsconfig.test.json checked with tsc --noEmit -p (or bun check -p) in CI. A runner that strips types without checking them (Bun, Vitest, babel-jest) does not type-check
Pythonmypy or Pyright with tests/ in its configured paths
Go, JVM, .NETthe compiler: go vet ./... and go test compile test files; mvn test-compile / gradle compileTestJava; dotnet build

To trust a new type check over tests, put a deliberate type error in one test file and see the check report it before relying on a clean run.

Spawned exit codes

An assertion on a spawned process’s exit status prints the child’s captured output when it fails, so a regression is told apart from a process killed under load. The spawn call pipes both streams; a result that captured neither says so rather than leaving the fields out.

EcosystemHelperLint for the bare shape
TypeScript (Bun, Node)lib/test-helpers/expect-spawn-exit.ts: expectSpawnExit(result, code), expectSpawnExitNot(result, code) and expectSpawnKilled(result) take the spawn result with its piped stdout and stderr (null where a run captured none) and throw with both on a mismatch; an in-process runner that returns { exitCode, stdout } passes stderr: nullBiome: a GritQL plugin on expect($result.exitCode).$matcher(...) and its .not form in test files, tools/quality/grit/no-bare-exit-code-assertion.grit, at warn under the ratchet; ESLint: no-restricted-syntax with a selector for a call to expect whose argument is a member named exitCode. Node’s status field is not matched, since HTTP responses share the name: read a Node result into the helper’s shape
Pythonsubprocess.run(..., capture_output=True, text=True) and assert result.returncode == code, result.stdout + result.stderr, or a fixture that wraps the run and the assertiona grep gate over test files for returncode == in an assert without a message
Goout, err := cmd.CombinedOutput(), then t.Fatalf("%v\n%s", err, out) on failure; the code is on exec.ExitErrorreview: go vet has no such rule
JVM, .NETthe assertion’s message argument carries the captured output (assertEquals(0, code, output); a helper that throws with the output around Assert.Equal)review

Tests come with changes

reference/tests-with-changes/ takes the layout as arguments. Typical templates:

Layout--source--test
TypeScript, tests beside the sourcesrc/**/*.ts{dir}/{name}.test.{ext}, {dir}/__tests__/{name}.test.{ext}
Python, mirrored tests/ treesrc/**/*.py{dir:src=tests}/test_{name}.py
Go**/*.go{dir}/{name}_test.go
Maven or Gradle (Java)src/main/java/**/*.java{dir:src/main/java=src/test/java}/{name}Test.java

Run it from a pinned Jig checkout (it imports lib/cli.ts from Jig’s root), with M14 set to the module’s path inside that checkout. Pin Jig to a release that contains M14 (0.27.0 or later) by its full commit hash; the other two actions are pinned as Jig’s own workflow pins them:

yaml
# GitHub Actions
jobs:
  tests-with-changes:
    runs-on: ubuntu-latest
    timeout-minutes: 5
    env:
      M14: .jig/modules/M14-testing-strategy
      BASE: ${{ github.event.pull_request.base.sha }}
    steps:
      - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10   # v6
        with: { fetch-depth: 0 }                   # the gate needs the merge base
      - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10   # v6
        with:
          repository: <jig-repository>             # where you take Jig from
          ref: <full-commit-sha-of-a-jig-release>  # 0.27.0 or later
          path: .jig
      - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6   # v2.2.0
        with:
          bun-version-file: .jig/package.json      # Jig's pinned Bun, not the latest
      - run: bun test "$M14"/reference/tests-with-changes/check-tests-with-changes.test.ts
      - run: >-
          bun "$M14"/reference/tests-with-changes/check-tests-with-changes.ts
          --base "$BASE" --source 'src/**/*.ts'
          --test '{dir}/{name}.test.{ext}' --exemptions .config/test-exemptions.txt

In a pre-push hook (lefthook, husky or pre-commit), pass the branch the change merges into as --base.

No real developer state

Every row runs the code under test in a child process that gets the redirected values, which is what the rule asks for. The in-process helpers some runners offer are named where they exist; they restore the value after the test but still change it for the whole process while it runs, so they do not satisfy the rule.

EcosystemSpawning the code under test with its own home, directory and environment
Bunspawn a child (Bun.spawn([...], { env: { ...env, HOME: fakeHome }, cwd })): Bun’s os.homedir() does not re-read HOME after start-up, so an in-process assignment leaves the code under test on the real home directory. Set the temp directory and the tool’s own configuration in the environment the test command launches bun test with (a wrapper script, or env TMPDIR=… bun test). Not the rule: a test preload ([test] preload in bunfig.toml), which changes them inside the test process
Node.js test runnerschild_process.spawn / execFile with env and cwd options. Not the rule: process.chdir, which moves every test in the worker
pytestsubprocess.run([...], env={**os.environ, "HOME": str(tmp_path)}, cwd=tmp_path), with tmp_path as the fake home. Not the rule: monkeypatch.setenv / monkeypatch.chdir, which are undone after the test but change the whole process meanwhile
Goexec.Command with cmd.Env and cmd.Dir; or re-run the test binary as the child (os.Args[0] with -test.run), the standard library’s own pattern. Not the rule: t.Setenv / t.Chdir (Go 1.24 and later), which are undone after the test but are process-wide while it runs, which is why they refuse parallel tests
JVMProcessBuilder with its environment() and directory(...), or a forked test JVM. Not the rule: System.setProperty, which is global to the JVM

Pair the isolation with a lint or grep gate that rejects the in-process forms in test files (process.env.HOME =, process.chdir(), with the subprocess as the alternative its message names. The audit asks for both: the isolation set before code under test starts, and the lint.

Coverage as a scheduled trend

EcosystemCoverage report
Bunbun test --coverage --coverage-reporter=lcov
Vitest / Jest@vitest/coverage-v8 or @vitest/coverage-istanbul; Jest --coverage (both write lcov and json-summary)
Pythoncoverage.py, or pytest-cov (--cov --cov-report=xml)
Gogo test -coverprofile=cover.out ./..., go tool cover
JVMJaCoCo (jacoco:report, Gradle jacocoTestReport)
.NETcoverlet (dotnet test --collect:"XPlat Code Coverage")

Run the coverage job on a schedule (weekly is usually enough) and on demand, not per change. Publish the numbers even when the run fails a target: a failing step must not skip the publish step. The publisher compares the packages it found reports for with the list it expected and refuses to publish when one is missing or unreadable. Where a package’s report also covers source from other packages, chart each package on its own: summing them counts shared files twice. Hosted services that chart the trend (Codecov, Coveralls) can report a status that never blocks (Codecov’s informational: true); runner settings that block per file (Jest coverageThreshold with path keys, Vitest coverage.thresholds.perFile, JaCoCo check rules per class) are what the module advises against.

Skipped is not passed

reference/tests-executed/ reads the JUnit report (the XML test report every runner below can write) and fails when the test cases that were not skipped number zero. Write the report with the runner’s own flag, then run the check on it in the same job, after the suite. Each row names the flag and how a suite’s self-skip shows in the report, which is what the check counts.

RunnerWrite the reportHow a self-skip appears in it
Bunbun test <paths> --reporter=junit --reporter-outfile=<file>describe.skipIf(...) and test.skipIf(...) cases carry <skipped />; one <testsuite> per file, with one nested per describe
Vitestvitest run --reporter=junit --outputFile=<file>describe.skipIf and test.skip cases carry <skipped/>; one <testsuite> per file
Jestthe jest-junit reporter (--reporters=default --reporters=jest-junit), with JEST_JUNIT_OUTPUT_DIR and JEST_JUNIT_OUTPUT_NAME naming the filedescribe.skip and test.skip cases carry <skipped/>; one <testsuite> per file
Playwrightplaywright test --reporter=junit with PLAYWRIGHT_JUNIT_OUTPUT_NAME=<file>test.skip(condition) cases carry <skipped/>; one <testsuite> per file
pytestpytest --junitxml=<file>pytest.mark.skipif, pytest.skip(allow_module_level=True) and pytest.importorskip cases carry <skipped>; one <testsuite> named pytest for the whole run, so a per-file count means one run per file
Gogotestsum --junitfile <file> ./... (go test alone writes no report)t.Skip and testing.Short() cases carry <skipped>; one <testsuite> per package, without a skipped attribute, which is why the check counts cases rather than attributes
JVM (JUnit 5)Maven Surefire and Failsafe write target/surefire-reports/TEST-*.xml and target/failsafe-reports/TEST-*.xml; Gradle writes build/test-results/test/TEST-*.xml; pass every filea failed assumption (Assumptions.assumeTrue), @EnabledIfEnvironmentVariable and Testcontainers’ disabledWithoutDocker cases carry <skipped>; one file per class, each a root <testsuite>
.NETdotnet test --logger "junit;LogFilePath=<file>" with the JunitXml.TestLogger packagexUnit Skip = and NUnit Assume.That cases carry <skipped/>
Ruby (RSpec)rspec --format RspecJunitFormatter --out <file> (the rspec_junit_formatter gem)skip and pending examples carry <skipped/>
PHPUnitphpunit --log-junit <file>markTestSkipped cases carry <skipped/>

A job that runs several suites which could each skip passes --each-suite, so one suite that ran does not vouch for the others. A job that exists for one file names it with --suite <name>, as the report names it, so a file the runner never discovered is a failure rather than a silence. A runner given a path or shard that matches nothing usually exits 0 and writes no report; the check then reports could not check (exit 2), and the job fails either way.

Run it from a pinned Jig checkout, as the tests-with-changes recipe does, in the job that provisions the dependency:

yaml
# GitHub Actions: the job that provisions the database, after the pinned Jig
# checkout and setup-bun steps of the recipe above
      - name: Run the integration suite with a report
        env:
          DATABASE_URL: postgres://postgres:postgres@localhost:5432/app
        run: bun test src/db --reporter=junit --reporter-outfile=reports/db.xml
      - name: Fail unless the suite executed a test
        if: always()
        run: >-
          bun "$M14"/reference/tests-executed/check-tests-executed.ts
          --each-suite reports/db.xml

The report path the second step names is the one the first wrote; a path the runner did not write fails the step. The same two commands go into a GitLab CI script: list, a Jenkins sh step or a CircleCI run.

Triage before attribution

The fresh-base probe is runner-independent: fix-ci’s probe-base.ts takes the base branch, the failing test’s name (--expect), the JUnit report the command writes (--junit, with the runner’s flag from Skipped is not passed above) and the command that runs the one failing file, fetches the base, runs the command in a throwaway worktree at the commit the fetch returned, removes the worktree, and exits 0 (that test case passed on the base: the failure is the change’s), 1 (it failed there: pre-existing) or 2 (could not decide: the fetch failed, no worktree, the command did not run, or the report has no case by that name, several with different results, or only skipped ones). The verdict reads the case, not the output: a passing test prints its name too, so a name in a failed run’s output says nothing about which test failed. A check with no per-case report (a type check, a lint) is probed without --junit, with the error message as --expect, and counts as pre-existing when it fails on the base showing that message. The worktree starts with nothing installed, so --setup names the repository’s install command, run there first: bun install --frozen-lockfile, npm ci, pnpm install --frozen-lockfile, yarn install --immutable, bundle install, composer install; for Python a fresh virtual environment in the worktree (uv sync, or python -m venv .venv && .venv/bin/pip install -e .), because an editable install into the working checkout’s environment points at that checkout’s sources and the probe would run the change’s code against the base’s test; Go, the JVM and .NET resolve through their build tool’s shared cache and need no step. The setup runs in a shell of its own, so the test command reaches the worktree’s environment directly (uv run pytest, .venv/bin/python -m pytest, bundle exec rspec): a bare pytest resolves from the caller’s PATH, which can be the working checkout’s environment. Without the plugin, five commands do the same: git fetch origin <base>, stopping if it fails; git worktree add --detach <new path> FETCH_HEAD; the install command, then the test command, both run from that path, reading the report for the failing case’s result; git worktree remove --force <path>. The command per runner is the one that runs a single file:

RunnerRun one failing file on the base
Bunbun test <file>
Vitestvitest run <file>
Jestjest <path>
Playwrightplaywright test <file>
pytestuv run pytest <file> or .venv/bin/python -m pytest <file> (<file>::<test> for one case)
Gogo test ./<package> -run '^<TestName>$'
JVMmvn -q test -Dtest=<Class> (Gradle: gradle test --tests <Class>)
.NETdotnet test --filter "FullyQualifiedName~<Class>"
Ruby (RSpec)rspec <file>
PHPUnitphpunit <file>
bash
# From the repository whose check failed, with the plugin's skill directory in SKILL
bun "$SKILL/scripts/probe-base.ts" --base main --setup "bun install --frozen-lockfile" --expect "total rounds to cents" --junit probe.xml -- bun test src/cart/total.test.ts --reporter=junit --reporter-outfile=probe.xml
bun "$SKILL/scripts/probe-base.ts" --base develop --remote upstream --setup "uv sync" --expect test_total_rounds --junit probe.xml -- uv run pytest tests/test_total.py --junitxml=probe.xml

The tracker item that records a deleted stale test is opened with the tracker’s own command-line tool (gh issue create --body-file <notes>, glab issue create, the tracker’s CLI); its body lists the file, the number of cases, the behaviours they asserted, the failing output and why the fix was not cheap, so the coverage is owed, not lost.

A per-change check scoped to the diff (Turborepo --filter=...[<base>], Nx affected, a job-level path condition, a change-area resolver) is what lets a stale test exist; its unscoped run on the integration branch, per CI host, is in M13’s mappings.

Behaviour pins

A pin asserts the dependency’s defective behaviour against the real dependency, so it belongs to the integration tier, skips itself without the dependency, and runs in the job that provisions it, which ends with the skip tripwire. Its title names the workaround, so a failure reads as the signal to retire or adapt that workaround; its header says which release fixes the defect, when that is known, and that the assertion is never updated on its own.

RunnerThe shape of a pin
Bun, Vitest, Jesta <workaround>.pins.integration.test.ts beside the workaround’s file, each describe named for the defect and the workaround file whose premise it pins
Playwrightthe same file beside the client-side workaround, run against the real browser
pytesta test_<workaround>_premise.py beside the workaround, each test’s docstring naming the workaround and the defect
GoTest<Workaround>Premise functions in the workaround’s package, against the real driver
JVM, .NETa test class named for the workaround’s premise in the workaround’s package or project

Canary on the next release

templates/runtime-canary.yml is the workflow. Each row says how the runtime’s next release is installed in a GitHub Actions step and which command prints the build it ran, which the workflow writes to the run summary; the pin the canary holds (canary, nightly, head, a release candidate) is registered as an exception in the repository’s toolchain-pins declaration (M2).

RuntimeThe next release, in a setup stepThe build it ran
Bunoven-sh/setup-bun with bun-version: canarybun --version and bun --revision
Node.jsactions/setup-node with a version-qualified nightly, node-version: <next>-nightly (a release candidate is named exactly, node-version: <next>.0.0-rc.1; there is no bare rc alias)node --version
Denodenoland/setup-deno with deno-version: canarydeno --version
Pythonactions/setup-python with python-version: <next>-dev and allow-prereleases: truepython --version
Gogo install golang.org/dl/gotip@latest && gotip download, then gotip in place of gogotip version
Rustdtolnay/rust-toolchain@beta (or @nightly)rustc --version --verbose, which includes the commit
Rubyruby/setup-ruby with ruby-version: headruby --version, which includes the revision
JVMactions/setup-java with java-version: <next>-eajava -version
.NETactions/setup-dotnet with dotnet-version: <next>.0.x and dotnet-quality: previewdotnet --version
A driver or libraryinstall it at its pre-release tag in the canary job only (npm install <package>@next, pip install --pre <package>), leaving the lockfile as it isthe resolved version in the package manager’s listing

The compiled-binary job uses the same build command and target as the release build (bun build --compile --target=<target>, go build, cargo build --release, dotnet publish), so the canary compiles what production runs, and executes the binary once in a way that must succeed and once in a way that must fail, so the exit-code contract is checked rather than only the start.

Source: modules/M14-testing-strategy/mappings.md