Skip to main content

Module readiness

Module readiness 

Source
Expand description

Whether the supervising agent’s harness can run a turn right now, exactly as this server runs one.

§What is checked is the harness this server’s turns use

The check runs inside the server, as the user the server runs as, so the sign-in it reads is the one under the state directory every supervision turn is pointed at — never whatever sign-in the operator’s own shell holds. Two things are asked, in order:

  1. The harness’s own status command, declared beside its sign-in in the adapter’s table and run with that table’s variable pointing at the sign-in directory. Only the one field saying whether it is signed in is read; nothing else it printed is kept, logged or echoed, and what it printed on its error stream is not read at all. A harness the table declares no status command for is unknown, and is decided by its turn.
  2. One minimal turn through the very port supervision uses: a fixed one-line prompt, in no session, bounded by supervisor.check_turn_timeout_s, answered only when the reply carries EXPECTED_WORDS. A token that has lapsed can still report signed in and fails here. A harness that says it is not signed in is not asked.

The check sends nothing to the printer, opens no print and writes no record: it is a read.

Structs§

HarnessCheck
What the check runs against: the configured harness, where its sign-in is kept, how long its turn may take, and the port that runs the turn.
HarnessReadiness
Whether the supervising agent’s harness can run a turn right now, why not when it cannot, and what to do about it.

Enums§

HarnessSignedIn
Whether the harness says it is signed in.
HarnessTurn
What became of the check’s one turn.

Constants§

EXPECTED_WORDS
The words a reply has to carry for the turn to count as answered, compared without regard to case.
SIGN_IN_COMMAND
The command that signs the harness in, which every answer a sign-in would fix names as its next step. The command-line program’s own tier holds it to that program’s sign-in.
STATUS_BOUND
The longest the harness’s status command may take before its answer is taken as no answer, and never longer than the check’s own turn may: it reads a file and prints, and a command still running after this is not going to say anything the turn after it will not.

Functions§

check_prompt
The one line every check’s turn is asked: to reply with EXPECTED_WORDS and nothing else.