mesh-tools run: a one-shot entrypoint invocation (ADR 0052 runtime side) #5

Merged
jschoubben merged 1 commits from feat/run-once-entry into main 2026-09-05 22:48:07 +00:00
Owner

Completes the run-once primitive's runtime side. A module's normal runtime entrypoint always connects to the broker, but a run-once offline step (e.g. seeding mosquitto's dynsec before the broker exists) must run without one and exit. mesh-tools run <entrypoint> imports a compiled module entrypoint, awaits its top-level work, and exits — no broker connection. This is the runtime counterpart to the host's applyRunOnce (ADR 0052).

Proven: smoke-tested outside the lab (seeded a dynsec store and exited 0), and in-mesh the mosquitto broker came up seeded (which requires this to have run under the run-once gate). ADR 0052's implementation reference will note it.

https://claude.ai/code/session_01LrgweAeERJYBg88c5cKDzF

Completes the run-once primitive's runtime side. A module's normal runtime entrypoint always connects to the broker, but a run-once *offline* step (e.g. seeding mosquitto's dynsec before the broker exists) must run without one and exit. `mesh-tools run <entrypoint>` imports a compiled module entrypoint, awaits its top-level work, and exits — no broker connection. This is the runtime counterpart to the host's `applyRunOnce` (ADR 0052). **Proven:** smoke-tested outside the lab (seeded a dynsec store and exited 0), and in-mesh the mosquitto broker came up seeded (which requires this to have run under the run-once gate). ADR 0052's implementation reference will note it. https://claude.ai/code/session_01LrgweAeERJYBg88c5cKDzF
jschoubben added 1 commit 2026-09-05 22:48:02 +00:00
The run-once step of ADR 0052 reuses a module's runtime image but must run
its bootstrap/seed entrypoint offline and exit, not the broker-bound serve
loop. Add 'mesh-tools run <entrypoint>': import the compiled entrypoint,
await its top-level work, exit — no broker, so a first-boot seed runs before
the module has anything to talk to. Exit code is the step's, which is how the
host gates the container that depends on it.

Claude-Session: https://claude.ai/code/session_01LrgweAeERJYBg88c5cKDzF
jschoubben merged commit 9af4d3fae9 into main 2026-09-05 22:48:07 +00:00
jschoubben deleted branch feat/run-once-entry 2026-09-05 22:48:07 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-tools#5