Test execution #
test.sh is the pre-commit gate. With no arguments it selects
Python end-to-end scenarios affected by the change and runs Go end-to-end tests
for CLI changes. ./test.sh --full runs all end-to-end scenarios and the web
check. Manual tests under test/manual are opt-in.
Gate and resource limits #
test/quick.sh runs formatting, type, lint, generated-code,
and Go vet checks before the suites. The gate builds a daemon snapshot and
launches suites concurrently. Its end-to-end selection and web checks depend on
the changed paths or --full. See test.sh for that selection and
Gleam lint for lint profiles.
test/resources.py calculates concurrency limits from CPU
and available memory. It reserves one quarter of memory and rejects a plan with
less than 1 GiB available. ALBEDO_TEST_*_JOBS variables can override the
calculated limits. These limits control concurrency, not process memory
allocations.
Fixture teardown #
test/e2e/harness.py owns test daemons and fixtures.
peer_daemon(name, prepare=None) starts a separate daemon for a test.
finish_test cleans up peers and registered resources. Use the shared harness
for daemon scenarios. See storage migrations for upgrade
coverage.
A test daemon stops when the suite that started it exits, through
ALBEDO_PARENT_PID. A daemon that a scenario installs as a service drops that
variable, so the scenario's own cleanup must stop it. When the gate ends,
test/reap-daemons.sh waits for detached kernels to
finish their grace period, then stops any process still running from the gate's
snapshot and fails the gate, naming each process's ALBEDO_HOME. Fix the
scenario that owns that home. Run the script on the scratch root to clear
processes left by an interrupted run. That also stops the daemons of a gate
still running in another checkout.
Offline Antigravity scenarios #
antigravity_test.py drives the real adapter
through a private copy of the runner's sealed daemon. The
fixture replaces native transport modules
in that copy and reseals it before boot. Production endpoints and profile
settings remain unchanged.
The route guard accepts only the exact inference URL, the dummy bearer token, and the fixture's marked home. The compiled destination is a numeric route on the loopback fake provider. Other streaming destinations and non-streaming provider HTTP calls are refused. The safety probe checks refusals before socket acquisition, including malformed headers.
Run nix develop -c python3 test/e2e/run.py antigravity_test.py for adapter
scenarios. They cover tool execution, title-request separation, usage, restart
replay, cancellation, and conditional signature fallback. Fixture signatures
check preservation, not Google's cryptographic validation. OAuth, Google TLS,
live quotas and acceptance of genuine signatures require separate live checks.
Manual web review #
Use the UI review kit for seeded browser reviews, scenario helpers, evidence capture, and private-resource cleanup. These manual checks are separate from the automated gate.