Forum teuk.org

🧭 Mediabot v3 β€” `!profil` Becomes a Richer User Adventure Card

in Mediabot Β· started by TeuK Β· 5d ago

TeuK Β· 5d ago

Commit: 2e1a7a2
Version: 3.4dev-20260818_014329

MB659 turns the existing !profil / !profile command into a much richer summary of a user’s history on a channel β€” without turning it into another expensive reporting query.

The main design goal was simple: reuse information Mediabot already knows and already persists.


🧭 A more complete profile

The profile now exposes several useful signals in one compact view:

πŸ† visible achievements
πŸ”₯ best activity streak
πŸŒ™ Night Owl progress
πŸŒ… Early Bird progress
πŸͺƒ longest observed comeback
🎯 closest visible achievement goal

This complements the information !profil already had, such as activity, rank, karma, trivia and historical statistics.


πŸ† Achievement progress without spoilers

MB658 introduced secret achievements.

MB659 keeps that contract intact.

The profile does not hard-code or reveal:

πŸŒ‘ The Witching Hour
πŸ”₯ Eternal Flame
πŸͺΆ Phoenix Rising

The 🎯 Next: field goes through the existing spoiler-safe next_goals() logic.

That means a hidden achievement can be extremely close to completion and still remain invisible until it is actually earned.


πŸ”₯ Reuse persisted progression

The new profile fields do not recompute historical statistics from scratch.

They reuse Achievement progress already maintained by Mediabot:

activity_streak_days
night_messages
morning_messages
comeback_days

This is important because these values were deliberately added and hardened in MB655–MB657.

MB659 consumes that work instead of duplicating it.


βš™οΈ Query budget stays bounded

The existing !profil implementation already has a known query footprint.

MB659 keeps it that way.

The structural guard confirms:

exactly 3 CHANNEL_LOG gather sites
exactly 2 direct karma/trivia prepare sites

The new streak, night, morning and comeback information comes from persisted Achievement progress rather than new historical scans.

So the richer profile does not become a hidden database tax.


πŸ”Ž Source guard

MB659’s structural validation reported:

OK: !profil keeps exactly three CHANNEL_LOG gather sites
OK: !profil keeps exactly two direct karma/trivia prepare sites
OK: streak/night/early/comeback reuse persisted Achievement progress
OK: closest goal reuses spoiler-safe next_goals()
OK: no hidden achievement name is hard-coded into !profil
MB659_SOURCE_GUARD=OK

πŸ§ͺ Focused regression

The focused profile + Achievement regression passed:

PASSED : 711/711
RC=0

Coverage included:

dispatch integrity
Achievement channel identity
deferred Achievement checks
async Achievement worker
career/profile completeness
career async worker
Achievement progress persistence
threshold overrides
progress rendering
durable identity
identity diagnostics
activity streaks
comeback achievements
Night Owl progression
secret achievements
enriched profile
module structure sanity

πŸ§ͺ Full-suite validation

The complete Mediabot suite passed:

PASSED : 13588/13588
RC=0

Runtime:

872s

The result is fully green, but the runtime is now important enough to become an engineering concern of its own.

Repeated ~14.5-minute full-suite runs are too expensive for every small development round. A future validation pass should keep the full suite as the high-confidence reference while making day-to-day validation much more selective.


🧱 Operational scope

MB659 introduces:

no database schema change
no migration
no configuration change
no service change
no systemd change
no new CHANNEL_LOG gather
no new direct profile SQL query

Committed scope:

CHANGELOG.md
VERSION
Mediabot/UserCommands.pm
t/cases/841_mb659_enriched_profile.t

✨ Commit

2e1a7a2
🧭 Turn !profil Into a Richer User Adventure Card

Version:

3.4dev-20260818_014329

Mediabot already had plenty of memories.

MB659 simply learned how to turn more of them into a useful character sheet.

You must be logged in to reply.