.mjs modules loaded by the in-cluster
controller. The repository-local submitters accept one module path and run it
through the same Temporal, Kubernetes, Kueue, Agent Sandbox, controller, and
Run.execute path.
Package entry points
The experiment module owns its agents, customer events, customer Effect, and
completion policy. The selected profile owns every platform object.
Write a controller-loadable module
Export exactly one namedrunSpec:
RunSpec.define. It
loads the mounted module once and invokes Run.execute(runSpec) once; there is
no fallback execution entry point or automatic replay.
Every roster runtime must provide a distributed application-container
realization. Its bridge resolves only after the application is usable and
returns that runtime’s exact .gateway plus .termination observation. The
customer Effect starts after all roster entries pass the same readiness gate.
Run on the local Kubernetes profile
Build the shared controller/support image:pinnedImage. Use it to create the pinned kind
profile:
MOLTZAP_SUPPORT_IMAGE defaults to MOLTZAP_CONTROLLER_IMAGE for this local
path. Both values must be digest-pinned. The checked-in
packages/simulator/local/README.md records the component versions and smoke
modules.
Run on the GKE profile
Provision the checked-in Terraform profile, install its pinned add-ons, push the controller/support image, and acquire the explicit kube context as described inpackages/simulator/gke/README.md. Then submit the same module:
Express completion policy in execute
The customer Effect returns, fails, or is interrupted according to its own
logic. Use Effect’s Clock, Schedule, race, timeout, Deferred, Stream, and
Scope primitives for deadlines, quiescence, supervised work, and explicit
stop conditions.
A runtime exit after readiness is committed as typed ledger evidence. It does
not implicitly end the customer Effect. One program may fail fast on that
evidence while another continues observing the remaining society.
The run returns a ProgramFinished or ClusterLost outcome after ledger
allocation succeeds. ProgramFinished.exit preserves customer success, typed
failure, defect, or interruption. Infrastructure acquisition, append,
controller, teardown, or completion failures stay distinct from behavioral
results.
The submitters print one final JSON result containing the run namespace and
bounded controller result. Applications decide how to map that result into
their own exit codes, retries, operator messages, and report states.
Sweeps remain application orchestration
A single simulator invocation is one definition-bound society and one ledger. Schedules, matrices, retries, sharding, naming, resumption, and aggregation stay in the calling application. For example,packages/evals submits every
case-condition cell as its own RunSpec through the selected local or GKE
profile, then persists the terminal attempt in its report database.
This keeps suite orchestration failures separate from the evidence produced by
an individual society.
Inspect completed artifacts
After a run publishes a completed receipt, both profiles retain exported files under the same relative path:completion.json last. The active GKE ledger is not
a recovery guarantee for controller or node loss before that export finishes.
Retrieve the three retained files, then validate them with the same complete
event catalog: