Skip to content

Raw worker fixtures ​

Metewand includes executable version-1 workers under fixtures/worker-protocol/v1. They implement the protocol directly with the Python standard library and report sdk: null, so tests exercise the process and wire boundaries without depending on a language SDK. The development environment supplies Python 3 for reproducible local use.

Successful roles ​

The dataset-materializer, implementation, and problem-evaluator entrypoints provide a small deterministic computation that can be reused by runtime and end-to-end conformance tests.

The materializer accepts an integer values array in the dataset parameters. It writes data.json, computes its exact SHA-256 digest and size, and writes the complete dataset-manifest.json last. The implementation's prepare request reads that dataset and requires algorithm: "sum"; execute adds the integer problem parameter offset to the values' sum and writes the canonical answer to result.json. reset clears the prepared state. The independent evaluator reads the dataset and result, recomputes the expected answer, and writes absolute_error to its assigned metrics path.

The adjacent schemas validate the materialized dataset manifest, canonical result, and evaluator metrics. All artifacts and protocol responses are deterministic for the same requests.

For publication tests, METEWAND_TEST_RESULT_PAYLOAD=1 makes the implementation include a nested binary payload with a declared digest and size. METEWAND_TEST_LOGS=1 writes deterministic role-specific messages to both standard streams so bounded capture and truncation provenance can be checked after finalization.

Protocol abuse ​

Invoke protocol-failure with one mode to produce a specific adversarial response after it reads the orchestrator's hello request:

ModeBehavior or typed failure exercised
fragmented_readsSends valid hello and shutdown responses one byte at a time.
duplicate_keysRepeats the top-level id key.
invalid_utf8Places an invalid byte in the response.
byte_order_markPrefixes the response with a UTF-8 byte-order mark.
oversized_lineSends a line beyond the version-1 1 MiB limit.
malformed_jsonSends incomplete JSON syntax followed by a newline.
early_eofCloses the response descriptor after an unterminated partial line.
extra_responseSends two valid responses for the hello request.
mismatched_request_idAnswers hello with a different request ID.

The runtime integration tests launch the entrypoints through the dedicated POSIX protocol descriptors. The trusted-local launch test also starts the raw dataset materializer in an owner-only working directory with a cleared, allowlisted environment, then completes its typed handshake and shutdown. The suite validates the successful three-role artifact chain and asserts the exact framing or correlation error produced by every adversarial mode. Standard output and standard error remain available only for worker logs.

Released under the MIT or Apache-2.0 license.