oracle: $runy / $runa_dnia — wróżby z run Starszego Futharku #7

Merged
gitea merged 1 commits from oracle-runes into main 2026-07-31 20:30:44 +00:00
Owner

Feature wpisany w mitologiczny filar persony (Słowiańszczyzna/Wikingowie/Celtowie, staronorweskie powiedzonka). Nowy always-loaded cog oracle_commands.

Komendy

  • $runy [pytanie] — Conjurer rzuca trzy runy Starszego Futharku (przeszłość / teraźniejszość / przyszłość, z orientacją prosta/odwrócona — 8 symetrycznych run nigdy nie wypada odwróconych) i prosi aktywny backend AI o interpretację układu w swojej postaci. Gdy AI padnie, i tak pokazuje wylosowane runy z ich znaczeniami — komenda zawsze odpowiada.
  • $runa_dnia — jedna runa, deterministyczna per user per dzień (seed z sha256), więc stała przy powtórnym pytaniu tego samego dnia. Bez wywołania AI, bez state file.

Solidność

Pełny 24-runowy Futhark, logika losowania i reguły odwracania są czyste i przetestowane: dystynktne losowanie, runy nieodwracalne nigdy odwrócone, stabilność runy dnia, fallback znaczenia.

Przy okazji: naprawa czerwonego joba unit na main

test_bar_commands i test_lore_commands (oba już na main) stubowały discord z różną kompletnością i dzielą sys.modules — ten bez discord.ext.tasks przesłaniał ten, który go potrzebuje, i kolekcja padała zależnie od kolejności. Nowy tests/unit/conftest.py stubuje discord raz, kompletnie, przed importem modułów testowych; stuby per-plik wtedy po prostu skipują. Pełny job unit: 41 passed.

Weryfikacja

tests/unit/test_oracle_commands.py (5 testów) + cały job unit 41 passed; kompilacja całości czysta.

Feature wpisany w mitologiczny filar persony (Słowiańszczyzna/Wikingowie/Celtowie, staronorweskie powiedzonka). Nowy always-loaded cog `oracle_commands`. ## Komendy - **`$runy [pytanie]`** — Conjurer rzuca trzy runy Starszego Futharku (przeszłość / teraźniejszość / przyszłość, z orientacją prosta/odwrócona — 8 symetrycznych run **nigdy** nie wypada odwróconych) i prosi **aktywny backend AI** o interpretację układu w swojej postaci. Gdy AI padnie, i tak pokazuje wylosowane runy z ich znaczeniami — **komenda zawsze odpowiada**. - **`$runa_dnia`** — jedna runa, **deterministyczna per user per dzień** (seed z sha256), więc stała przy powtórnym pytaniu tego samego dnia. Bez wywołania AI, bez state file. ## Solidność Pełny 24-runowy Futhark, logika losowania i reguły odwracania są **czyste i przetestowane**: dystynktne losowanie, runy nieodwracalne nigdy odwrócone, stabilność runy dnia, fallback znaczenia. ## Przy okazji: naprawa czerwonego joba `unit` na main `test_bar_commands` i `test_lore_commands` (oba już na main) stubowały `discord` z różną kompletnością i dzielą `sys.modules` — ten bez `discord.ext.tasks` przesłaniał ten, który go potrzebuje, i kolekcja padała zależnie od kolejności. Nowy `tests/unit/conftest.py` stubuje `discord` **raz, kompletnie**, przed importem modułów testowych; stuby per-plik wtedy po prostu skipują. Pełny job `unit`: **41 passed**. ## Weryfikacja `tests/unit/test_oracle_commands.py` (5 testów) + cały job unit 41 passed; kompilacja całości czysta.
gitea self-assigned this 2026-07-31 18:39:11 +00:00
gitea added 1 commit 2026-07-31 18:39:11 +00:00
oracle: $runy / $runa_dnia - Elder Futhark rune readings in-character
CI / compile (pull_request) Successful in 10s
CI / unit (pull_request) Successful in 14s
CI / integration (pull_request) Successful in 10s
build / build (push) Successful in 38s
CI / compile (push) Successful in 10s
CI / unit (push) Successful in 17s
CI / integration (push) Successful in 11s
e1fca864d8
Fits the mythology pillar of the persona (Slavic/Norse/Celtic, Old Norse
phrases). New always-loaded cog oracle_commands:

* $runy [pytanie] draws three Elder Futhark runes (past/present/future, with
  upright/reversed orientation - the 8 symmetric runes are never reversed) and
  asks the ACTIVE AI backend to read the spread in Conjurer's voice. If the AI
  is down it still shows the drawn runes with their own meanings, so the command
  always answers.
* $runa_dnia gives one rune, deterministic per user per day (sha256 seed), so
  it's stable if asked repeatedly - no AI call, no state file.

The full 24-rune Futhark, the draw logic and the reversal rules are pure and
unit-tested (distinct draw, non-invertible never reversed, per-day stability,
meaning fallback).

Also fixes a pre-existing unit-job breakage: test_bar_commands and
test_lore_commands each stubbed `discord` with different completeness and
shared sys.modules, so once both landed on main the one lacking `discord.ext.tasks`
shadowed the one needing it and collection failed order-dependently. A new
tests/unit/conftest.py stubs discord once, completely, before any test module -
the per-file stubs then skip. Full unit job: 41 passed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
gitea merged commit e1fca864d8 into main 2026-07-31 20:30:44 +00:00
gitea deleted branch oracle-runes 2026-07-31 20:30:45 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gitea/conjurer#7