This guide shows how to create a new governed WASM microservice in Traverse without turning it into a host-coupled service deployment.
Traverse does not currently treat a microservice as a separate runtime category from the governed package model. Instead, a WASM microservice should be authored as a governed executable package that is explicit about its boundaries, dependencies, and validation path.
Use the checked-in examples and references as the source of truth:
examples/templates/executable-capability-package/manifest.template.jsondocs/adapter-boundaries.mddocs/compatibility-policy.mddocs/oss-pattern-extraction.mddocs/wasm-io-contract.md
Begin with the executable capability package template, then adapt it for the new microservice:
- choose one governed
package_id - bind exactly one approved capability contract
- keep the source entry point explicit
- keep the binary path and digest explicit
- keep host API, network, and filesystem access governed and narrow
- declare model dependencies as abstract interfaces, not direct implementation hooks
- document the app-facing or integration-facing boundary the microservice is meant to serve
A new WASM microservice package should make these fields obvious:
package_idversionsummarycapability_refworkflow_refssourcebinaryconstraintsmodel_dependencies
The package must remain portable and governed. It should not depend on a hidden host process or a separately managed deployment topology to make sense.
Its execution boundary is the governed stdin/stdout JSON contract documented in
docs/wasm-io-contract.md.
- Copy the template manifest into a new package directory.
- Replace the placeholder capability and workflow references with approved Traverse ids.
- Point
source.pathat the microservice implementation file. - Build the deterministic local fixture for the package.
- Update the expected digest after the fixture is built.
- Document how the microservice interacts with Traverse adapters or client surfaces.
- Validate the package with the same repository-level smoke and repo-check flow used for other governed package examples.
- Open the PR only after the docs and validation references are in sync.
Run the microservice authoring smoke path with:
bash scripts/ci/wasm_microservice_authoring_guide_smoke.shThat smoke path confirms the guide points at the governed template, the adapter boundary docs, and the deterministic Traverse validation flow.
- treating the microservice as a host-bound deployment instead of a governed package
- omitting the digest or the workflow/capability linkage
- broadening host or network access beyond what the package explicitly documents
- skipping adapter-boundary documentation
- changing the binary digest without rebuilding the fixture