zudo-stl-fix
GitHub repository

Type to search...

to open search from anywhere

Testing

The make targets, Swift tests, and the real-worker test.

Make targets

CommandWhat it runs
make test-engineThe original 17 engine regression tests (engine/test_stl_doctor.py).
make test-workerThe worker, protocol, packaging-tool and CLI file-safety tests under tests/.
make verify-fixturesscripts/verify_fixtures.py --repair: audits every reference file and repairs the two defective rails in both tolerance modes.
make verify-hashesscripts/verify_fixtures.py --hashes-only: checks the immutable fixture hashes.
make verifyAll four of the above.
make test-appswift test --package-path app.

Pass PYTHON=.venv/bin/python to use a virtual environment. The default is python3.

Run make test-engine and make verify-fixtures before and after any engine change. The original fixtures and golden files are immutable inputs: never change them to make a test pass.

Worker self-test

python engine/worker.py --self-test

This exercises the real geometry dependencies, including Shapely constrained triangulation.

Swift tests

swift test --package-path app

These cover the protocol, queue, cancellation, and safe-export logic. They run on macOS only.

The real-worker test

One Swift test, testRealWorkerRepairsDefectiveRailFromDefaultTemporaryStore, drives the actual Python worker instead of a fake.

  • In a plain swift test run it is skipped unless ZUDO_WORKER_PYTHON points to a Python that has engine/requirements.txt installed. A plain run reports it as skipped, and that is not a pass.

  • In the packaging build it is mandatory. scripts/build-macos.sh sets ZUDO_WORKER_PYTHON to its own hash-locked build venv, so the test runs there and must pass. A packaging run is only valid evidence when its log shows this test passed and was not skipped.

To run it during development:

ZUDO_WORKER_PYTHON=.venv/bin/python swift test --package-path app --filter testRealWorker

The Swift suite also contains full-scale collision tests that fill a folder with 10,000 names. They assert behavior, not timing.

Tip

Run this test whenever you touch path handling or the worker protocol. A real defect (symlinked job directories) slipped past fake-worker tests and was only caught by running the real app; see Verification status.

What the tests do not prove

Passing tests do not show that a repaired mesh is printable, fits, or is strong. Real fixtures and real intersection validation are required: mocks and topology-only checks are not evidence of geometry correctness.

Revision History

Takeshi TakatsudoCreated: 2026-10-16T13:22:33+09:00Updated: 2026-11-08T00:43:10+09:00