Skip to content

build: lay out tests and scripts by lane, stash the demo around e2e - #108

Merged
arthware-dev merged 8 commits into
mainfrom
feat/stacktests-stash
Sep 22, 2026
Merged

arthware-dev merged 8 commits into
mainfrom
feat/stacktests-stash

Conversation

@arthware-dev

@arthware-dev arthware-dev commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • stacktests e2e and smoke stash the Simpsons demo for the run and restore it afterwards, pass, fail or interrupted; any instance whose Matrix server is not simpson is refused.
  • GitHub's scripts-to-rule-them-all: script/setup, update, test, cibuild, server. The Makefile targets are one-line aliases, and CI runs only script/cibuild.
  • Tests are laid out by lane: tests/unit, tests/integration (Docker lifecycle, APFS backup, was test-lifecycle), tests/e2e (was tests/integration, including stacktests). The unit lane drops from ~70s to ~50s.

Several commits, meant to be merged with rebase.

The e2e rig refuses to run over a dev instance at the repo root, and
the only way round it was to destroy that instance. The two share only
the root config and the container names, not data, so a swap is enough.

`stacktests stash` stops the instance's running stacklets, moves
`stack.toml`, `users.toml` and `.stack/` to `~/famstack-stash/instance`
and brings the rig's config back from `~/famstack-stash/rig`, whose
secrets match the test data it left. `stacktests unstash` reverses it
and starts what was running. The preserved ai stacklet keeps running
throughout. Neither command copies or deletes data.
`stacktests e2e` and `smoke` now swap the demo instance out when it is
at the repo root and swap it back when the run ends, whether it passed,
failed or was interrupted. On the rig itself they run as before.

`stash` refuses any instance whose `stack.toml` does not name the
Matrix server `simpson`, so a family's instance is never stopped for a
test run. The name is fixed at install and is part of every user id.
The lane table told people to uninstall the instance before `make
test-e2e`. It now stashes the Simpsons demo for the run and restores it
afterwards, and refuses any other instance. The e2e time is unknown
again: the old 20-30 minutes included a Synapse invite limit that no
longer applies, and no full run has been timed since.
One entry point per job under `script/`, as GitHub's convention has it:

- `script/setup` sets a clone up; it is `tools/init-repo`, moved
- `script/update` re-runs setup and restarts stale stacklets
- `script/test [lane]` runs a lane; `script/test help` prints the table
- `script/cibuild` is everything CI checks, runnable on a laptop
- `script/server` starts every installed stacklet

The Makefile targets stay as one-line aliases. CI calls `script/cibuild`
and nothing else, so local and CI runs check the same things: before,
commit-lint, the lock check and the version check only ran in CI.
Each backup engine test creates and mounts a 100 MB APFS disk image
with `hdiutil`, about 1.2 seconds apiece: 20 of the unit lane's 67
seconds. They drive the host rather than Python, like the Docker
lifecycle tests, so they now run in that lane. The unit lane takes
about 47 seconds.
The lane now runs the backup engine against real APFS disk images as
well as the Docker lifecycle tests, so "lifecycle" no longer describes
it. `make test-integration` and `script/test integration` are the lane
for the heavier profiles that run real things on the host;
`make test-lifecycle` is gone.
Each lane is now a directory, so where a test lives says what it
costs:

- `tests/unit/{framework,stacklets}`: the unit lane, offline
- `tests/integration`: the Docker lifecycle and the APFS backup engine,
  which drive the host rather than Python
- `tests/e2e`: demo, smoke, e2e and eval, run through
  `tests/e2e/stacktests` (was `tests/integration/stacktests`)

The unit lane no longer needs an ignore list, and `pytest
tests/unit` can no longer start Docker by accident, which running
`pytest tests/framework` used to do. Unit tests sit one level deeper,
so the ones that locate the repo root count one more parent.
@arthware-dev arthware-dev changed the title test: stash the Simpsons demo around e2e and smoke runs build: lay out tests and scripts by lane, stash the demo around e2e Sep 22, 2026
Commits and PR descriptions here carry no credit for the tool that
helped write them. `tools/commit-lint` now refuses a Co-Authored-By
trailer, the tool's generated-with footer, its product link and an
Anthropic noreply address. It reads whole messages rather than only
subjects, so the `commit-msg` hook stops the commit, CI stops the PR,
and a new `--body` input checks the PR description. CI also runs again
when a description is edited.

The product name on its own is not a pattern: commits that describe
the tool, as two on main do, still pass.
@arthware-dev
arthware-dev merged commit d602497 into main Sep 22, 2026
1 check passed
@arthware-dev
arthware-dev deleted the feat/stacktests-stash branch September 22, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant