Skip to content

Reconcile module containers like server containers - #335

Merged
athNdev merged 1 commit into
mainfrom
feat/module-reconcile
Nov 4, 2026
Merged

athNdev merged 1 commit into
mainfrom
feat/module-reconcile

Conversation

@athNdev

@athNdev athNdev commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Part of OSS-243. The reconciler previously skipped every module event; a sidecar removed or recreated outside the panel drifted from its row while the game looked healthy.

  • A module event schedules a module pass, and the periodic sweep also covers every module that has a container.
  • The pass adopts a container id or a status the daemon disagrees with, records a container that disappeared as stopped, and recreates a missing container only when both the module and its parent server are meant to be running.
  • A sidecar is never resurrected under a stopped server, and an unreachable node leaves the record untouched — a daemon that did not answer is not evidence the container is gone.
  • The decision is a pure function (decideModule) so every branch is asserted without Docker. Templates, hooks and dependency ordering stay with the module manager.
  • UpdateModuleStatus is a targeted column write, matching the reconciler's existing rule of never writing a whole row.

Tests: decision table (10 cases), plus fake-daemon cases for adopt, record-as-stopped, unreachable node and deleted module; reconciler tests for event routing, sweep coverage, disabled module system and a failing pass that does not stop the worker.

A module event now schedules a module pass and the periodic sweep covers
every module that has a container. The pass adopts a container id or status
the daemon disagrees with, records a disappeared container as stopped, and
recreates a missing one only when the module and its parent server are both
meant to be running. An unreachable node leaves the record alone.

The decision is a pure function; templates, hooks and dependency ordering
stay with the module manager. UpdateModuleStatus is a targeted column write,
so a pass cannot clobber a concurrent container id.

Refs OSS-243
@athNdev
athNdev merged commit 8cabe2e into main Nov 4, 2026
11 checks passed
@athNdev
athNdev deleted the feat/module-reconcile branch November 4, 2026 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant