Generic observation supervisor

The generic Observation Supervisor provides the core coordination mechanism for supervising the consistency of observing states in the presence of asynchronous updates.

It is responsible for controlling when state evaluations occur, independently of how those evaluations are performed or which domain-specific rules are applied.

This component is intentionally domain-agnostic: it contains no CSP-specific knowledge and can be reused in different contexts by combining it with appropriate consistency policies and publication logic.

Purpose

The generic supervisor implements the timing, synchronization, and orchestration logic required to handle observing state updates arriving asynchronously from multiple sources.

Rather than reacting immediately to every update, it introduces a controlled evaluation cycle that balances stability and responsiveness.

Its responsibilities include: - buffering update notifications, - enforcing stability through debouncing, - guaranteeing progress through a maximum latency constraint, - triggering evaluations at well-defined points in time.

The actual evaluation logic and state publication are delegated to specialized implementations built on top of this base class.

Debounce and max-latency model

Two complementary timing constraints govern when an evaluation occurs:

  • Debounce interval Updates must remain stable for a minimum time window before evaluation is triggered. This prevents rapid oscillations caused by transient or intermediate subsystem states.

  • Maximum latency Even if updates keep arriving, evaluation is forced after a bounded amount of time since the first pending update. This guarantees timely progress and avoids indefinite postponement.

Together, these mechanisms ensure that evaluations are both meaningful and timely.

Threading and orchestration

The Supervisor runs a dedicated background thread responsible for managing timing and evaluation scheduling.

The thread remains idle while no updates are pending and wakes up only when: - new updates are received, or - a timing condition (debounce or maximum latency) is satisfied.

This design minimizes CPU usage while remaining responsive to critical state changes.

Extensibility

The generic supervisor defines a clear separation between coordination and decision logic.

Concrete implementations are expected to provide the domain-specific behavior, such as:

  • evaluating the current system snapshot,

  • applying consistency or validity rules,

  • publishing the resulting observing state.

This separation allows the same coordination mechanism to be reused across different components and domains without duplication of timing or concurrency logic.