Skip to content

Languages and monorepos

Aftershock proves a test by running it in a fresh environment: once on the commit before the fix (it must fail every time) and once on the fix (it must pass every time). Each framework below is detected from the repository and can be overridden in .aftershock/config.yaml (framework:).

FrameworkDetected fromWhere drafts goNotes
pytestrequirements.txt, pyproject.tomltests/aftershock/test_<name>.pyVirtualenv per run
vitest / jestpackage.jsontests/aftershock/<name>.test.ts
Go go test (Labs)go.mod<package>/aftershock_<name>_test.go, function TestAftershock<Name>Only TestAftershock* runs; JUnit via gotestsum
JUnit, Maven or Gradle (Labs)pom.xml, build.gradle(.kts)src/test/java/<package>/Aftershock<Name>Test.java (or Kotlin under src/test/kotlin)Gradle uses the repository's ./gradlew
RSpec (Labs)Gemfilespec/aftershock/<name>_spec.rbNo extra gems needed
Playwright (Labs)package.json with @playwright/test and no vitest or jest<playwright testDir>/aftershock/<name>.spec.tsFrontend incidents: a browser test against the app your playwright.config webServer starts. Chromium is installed while the network is open; the test runs offline

Frameworks marked Labs are turned on per workspace in Settings → Labs. Until then, time travel explains how to turn them on and pull request checks skip their tests with the reason.

How a run works

  1. Install (network allowed): the toolchain if the image lacks it, then your install command. Caches (Go modules, Maven repository, Gradle home, Bundler path) live inside the checkout so the next phase can run offline.
  2. Test (network denied): exactly one test file, written after the install, three times. The result is read from a JUnit report.
  3. If the test cannot even compile or load because the code it covers does not exist at that commit, the result is missing code, never a recurrence, and Epicenter uses it as a boundary.

Monorepos

List your packages in .aftershock/config.yaml. Each incident is matched to the package that contains most of its fix's changed files (the longest matching path wins); install and tests then run inside that folder with its own framework.

packages:
  - path: services/api
    framework: go
    install: go mod download
  - path: apps/web
    framework: vitest
    install: npm ci
    test_dir: tests/aftershock      # relative to the package

Changes outside every listed package use the repository-level settings. Each proven test remembers its package, so nightly re-checks, pull request checks, Epicenter and suggested fixes all run it in the right place.

Edit this page on GitHub