42 lines
2.5 KiB
Markdown
42 lines
2.5 KiB
Markdown
---
|
|
status: graduated
|
|
initiated: 2026-10-03
|
|
touches: [the tool runtime, the per-module containers, the SDK, the bus grants, 03-DESIGN/01-to-be/38-building-the-operators-machine.md]
|
|
became: [02-DECISIONS/0198-a-modules-long-running-code-is-launched-by-the-node-runtime-and-reaches-the-bus-through-it.md, 03-DESIGN/01-to-be/38-building-the-operators-machine.md]
|
|
---
|
|
|
|
# 022 — Where a module's long-running code runs
|
|
|
|
## What was investigated
|
|
|
|
Twenty-three modules still run their own code in a container built on the runtime's image. Their tools
|
|
can move as bundles ([ADR 0192](../../02-DECISIONS/0192-a-tools-bundle-declares-what-it-is-given-and-the-runtime-hands-it-to-that-bundle-alone.md),
|
|
[ADR 0193](../../02-DECISIONS/0193-every-bundle-the-runtime-serves-is-launched-and-the-runtime-knows-no-language.md));
|
|
the rest of what those containers run cannot yet. This asks where that code goes and how it reaches
|
|
what its container handed it.
|
|
|
|
## What that code is, measured 2026-10-03
|
|
|
|
| | modules |
|
|
|---|---|
|
|
| subscribes to events on the bus | audit-logger (everything), mesh-catalog (two seat events), mesh-vault, records (`gitea.pull.merged`), and postgres, mongodb, mssql, redis, mosquitto logging their own lifecycle |
|
|
| provisioners: read the grants the mesh delivered as files, act on the backend, emit | 12 |
|
|
| a run-once preparation step | mesh-catalog |
|
|
| a command-line client of the backend | psql, mosquitto_ctrl, git (packages on every machine's system); mongosh, sqlcmd (not in its repositories) |
|
|
| a service reached by a container name | icecast, mailu-admin, minio, mongodb-server, mssql |
|
|
| a main of its own | anthropic-consumer, openai-consumer, route-adapter |
|
|
|
|
A provisioner needs nothing a launched bundle lacks: files named by its words, its backend, and an emit
|
|
that already travels through the runtime. The one thing missing is **a subscription** — events
|
|
delivered to the module's code, acknowledged when it has handled them.
|
|
|
|
## Options
|
|
|
|
1. **The runtime launches it and is its bus**: the stdio channel gains a subscription; the runtime
|
|
binds the module's durable consumer and delivers each event to the child, acknowledging when the
|
|
child answers. One bus connection per machine; any language. Chosen.
|
|
2. **A process per module with its own bus client and credential.** Every language's SDK would carry
|
|
a transport and every module a credential on disk — what ADR 0188 rejected for tools, for the same
|
|
reasons.
|
|
3. **Keep the containers for this code.** Leaves ADR 0188's rule broken for 23 modules indefinitely.
|