Forum teuk.org

🪄 Mediabot v3 — The Seer Speaks Every Common Room’s Tongue

in Mediabot · started by TeuK · 4w ago

TeuK · 4w ago

Development chronicle — mb572 to mb574 · 3.4dev

A new set of enchantments has reached the castle.

The horoscope now speaks according to the language of each channel, the partyline status board reveals what is happening behind the scenes, and the archive worker can no longer hide a failure behind a reassuring green result.

🔮 mb572 — One destiny, two languages

The horoscope already used a deterministic daily draw: the same nickname and date always produced the same reading.

That rule remains unchanged.

Each French pool now has an English twin with exactly the same number of entries. The same pseudo-random draw therefore selects the same card in both languages:

  • the mood stays equivalent;
  • the element keeps the same position;
  • the social and project guidance follow the same draw;
  • the lucky number, colour and chance remain aligned;
  • only the displayed language changes.

A channel using +LangFR receives the historical French version. Other channels receive the complete English reading.

The zodiac calculation itself remains canonical and independent from translation. The stars do not change when the message crosses the Channel — only the parchment does. ✨

🏰 mb573 — The Entrance Hall gains an operator board

The partyline .status command now exposes three useful runtime states without querying the database:

FloodQ:   7 deferred (#miaw:2 UNARMED, #quebec:5)
AchvQ:    3 pending check(s)
Archive:  worker running (pid 4242)

FloodQ

Shows deferred AntiFlood output by channel.

An UNARMED marker warns that a queue contains messages but has no active drain timer — exactly the kind of fault operators want to see before users report missing bot output.

AchvQ

Shows how many expensive achievement checks are waiting for the asynchronous worker.

Archive

Shows whether archiving is:

  • disabled;
  • enabled but not yet run;
  • currently running;
  • or completed, with exit status and elapsed time.

The command reads memory only. The diagnostic panel cannot become the blocking operation it is supposed to diagnose.

🛡️ mb574 — The status board tells the whole truth

The final inspection found two edge cases.

A running worker must remain visible

After one archive pass had completed, a later active worker could be hidden behind the previous result.

The status order is now explicit:

  1. disabled;
  2. worker currently running;
  3. previous completed result;
  4. enabled but never run.

Current activity always wins over old history.

SQL failures must not look successful

A zero-row archive pass is a valid success.

A configuration or SQL failure is not.

The archive worker now distinguishes the two cases. Invalid event policies, missing database handles, failed archive-table creation, SELECT preparation or execution errors, failed INSERTs, failed verification and failed DELETEs all produce a non-zero worker exit.

The Hall board can therefore be trusted:

exit=0

means the worker genuinely completed its work, even when nothing needed moving.

đź§Ş Validation

The Claude rounds reached:

mb572: 11232 / 11232 PASSED
mb573: 11245 / 11245 PASSED

The final mb574 tree was then subjected to the complete local suite before commit, followed by the repository’s GitHub CI after push.

📜 Final parchment

The Seer now speaks the language of each Common Room without changing anyone’s fate.

The Entrance Hall shows the crier’s waiting scrolls, the trophies awaiting ceremony, and the archivist currently crossing the courtyard.

Most importantly, the board no longer mistakes silence for success.

The castle does not merely work behind closed doors — it now tells its operators exactly what is happening there. ⚡

You must be logged in to reply.