Skip to main content

Wire contract reference

The wire between the Roboticks SDK and the Roboticks platform is JUnit XML extended with roboticks.* properties, converted server-side to a canonical JSON document. This page is the authoritative reference. For the tutorial introduction, see Testing → Wire contract.

Schema version

The wire contract is versioned as a single integer. Currently 2.

Version policy

v2 changes vs v1

  • Added (required when emitted): roboticks.nodeid on every <testcase> — the pytest nodeid, used by the platform to deterministically route per-test-case artifacts into the S3 prefix test-runs/{run_id}/test-cases/{sha256(nodeid)[:16]}/.
  • Added (optional, repeatable): roboticks.attach.{kind} — one property per file registered via roboticks.attach_artifact(). The property name carries the kind (mcap, logs, attachments, or any custom single-segment label) and the value is the local file path; the runner uploader walks these and posts each file to the per-test-case prefix.
  • Behavior: schema-1 uploads still parse — the platform falls back to a run-level prefix when roboticks.nodeid is absent. Schema-2 readers tolerate the absence of roboticks.attach.* (it just means the test did not call attach_artifact).

Suite-level properties

Test-case properties

roboticks.attach.{kind} — per-test artifact attachments

Schema 2 adds a property family for files a test registers via attach_artifact(). The property name carries the kind, the value carries the local path:
Reserved kinds and their conventional sub-folders (the runner uploader follows these when it lays out S3): The runner walks <testcase> for every property whose name starts with roboticks.attach. and posts the file to the platform’s /test-runs/{run_id}/mcap-upload-urls endpoint with {nodeid, kind} in the body. The backend lands it at:
so the workspace UI groups artifacts under the test that produced them.

JUnit XSD excerpt

The full XSD is shipped at schemas/junit_with_confirms.xsd in the SDK repo. Validate locally:

Canonical test-result JSON

The platform converts JUnit-with-confirms into this JSON shape:
nodeid_slug is sha256(nodeid).hexdigest()[:16] — derived deterministically on both the SDK and the platform so the per-test-case S3 prefix is stable across re-runs without round-tripping the slug through the wire. JSON Schema (excerpt):
Full schema: schemas/test_result.schema.json.

Forward / backward compatibility

The platform supports the current and one-back schema versions (v2 and v1 today).

Disagreement handshake

When the SDK and the platform disagree on schema version, the platform writes a roboticks.platform.warnings element into the run’s metadata:
This element is surfaced in the Check Run as a one-line warning and in the run-detail UI as a banner.

What the SDK guarantees

  • A given SDK release pins to exactly one schema version.
  • Within a major SDK series (e.g. all 0.x.y), the schema version doesn’t decrease.
  • The XSD and JSON Schema files in the SDK repo at a tag are the authoritative artefacts for that release.

What the platform guarantees

  • Backwards-compat for at least the current and one-back schema versions.
  • Forward-tolerance: unknown roboticks.* properties are dropped, not rejected.
  • The conversion from XML to canonical JSON is documented and stable per schema version.

Tools

Next

Wire contract tutorial

The version-handshake story in narrative form.

Pytest plugin

Reference for the writer.

C++ reference

Reference for the C++ writer.

Schemas in the SDK repo

Source of truth.