Files
computer-playbook/scripts/tests/workspace
kevinveenbirkenbachandClaude Opus 5 3781c30235 fix(env): write the cache-stack declaration from a handler, not the registry
48845db97 made three capability decisions declarable and named them INFINITO_*, which put them under setdefault: the live environment wins and the value is written back. Makefile exports BASH_ENV, so .env is re-exported into every make recipe, and scripts/tests/code/run.sh reaches dotenv through 'make setup' on every test run. A declaration made for one run therefore became a machine fact on first regeneration and stayed one - that is what made the workspace failure intermittent rather than reproducible, and why fedora died on 11 assertions where debian passed the same code.

A dedicated handler writing through eb.set recomputes the value every time and discards whatever the environment held, so the key stays registered in default.env and visible to the lints while remaining structurally unpinnable. running_on/github.py already worked this way; the distinction now has a name in utils/env/README.md. The exporting shell still steers its own run, because load.sh preserves non-empty caller values.

The other two declarations are deleted rather than moved. image_mirror_enabled and docker_root_ephemeral both derive from runs_on_github(), and the orchestrator does not unset INFINITO_RUNNING_ON_GITHUB, so inside the workspace they were already true and the declarations restated a value that held anyway. Measured across all four runtime contexts: only the workspace row changes, and only for the cache.

Verified by reversing the probe: 'INFINITO_CACHE_STACK=false make dotenv' writes .env=true, where the registry path wrote the exported value back.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-23 23:24:15 +02:00
..

Workspace Test Suite

This directory contains the modular workspace test suite for Infinito.Nexus. It validates the full local development flow from a clean state.

The entry point is 00_orchestrator.sh. It runs one or more tracks — subdirectories whose numbered scripts execute in order.

Tracks

base prepares the workspace and is a prerequisite for the other two. compose and swarm are independent of each other, which is what lets CI run them as separate jobs with a budget each.

Track File Purpose
base base/01_install.sh Installs package prerequisites and repository dependencies
base base/02_system.sh Shows disk usage and purges cached state
base base/03_build.sh Builds the local Docker image
base base/04_bootstrap.sh Bootstraps the development environment and starts the stack
base base/05_commit.sh Validates pre-commit hook enforcement and --no-verify bypass
base base/06_test.sh Runs the full validation suite
base base/07_console.sh Smoke-tests the interactive console REPL
compose compose/01_minimal.sh Compose deploy on minimal hardware with service exclusion
compose compose/02_performance.sh Compose deploy of the full application set on performance hardware
compose compose/03_reuse.sh Compose redeploy reusing existing inventory and packages
compose compose/04_teardown.sh Shuts down the stack and reverses environment changes
swarm swarm/01_teardown.sh Releases the development stack so the swarm cluster runs alone
swarm swarm/02_zombie.sh Swarm deploy of the MariaDB database role (svc-db-mariadb)
swarm swarm/03_roundtrip.sh Compose+swarm roundtrip of the PostgreSQL database role (svc-db-postgres)
swarm swarm/04_teardown.sh Shuts down the stack and reverses environment changes
Shared Purpose
utils/common.sh Shared bootstrap, constants, and generic helpers (HTTP assertion, inventory inspection)
utils/cache.sh Cache-stack assertions and probes (registry-cache, package-cache, DiD inner-build)
utils/teardown.sh Stack shutdown and environment reversal, shared by both closing steps

Usage

Run every track via the entry point:

bash scripts/tests/workspace/00_orchestrator.sh

Run selected tracks, in the order given, through INFINITO_WORKSPACE_TRACKS:

INFINITO_WORKSPACE_TRACKS="base swarm" bash scripts/tests/workspace/00_orchestrator.sh

An unknown track name aborts before anything else runs.

For documentation on the overall development workflow, see the Deploy Guide.