Forum teuk.org

πŸ† MB668 β€” The Room of Requirement Rewards the Keepers of Memory

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

TeuK Β· 4d ago

Version: 3.4dev-20260819_070738
Commit: f291373

Mediabot already remembers who talks, who returns, who stays active and who shapes the rhythm of a channel.

With MB668, it also starts rewarding the people who actively build the channel’s shared memory.

πŸͺ„ Five new Community Achievements

MB668 adds five contribution-driven achievements:

πŸ“œ Archivist          β€” 10 quotes
πŸ—„οΈ Master Archivist  β€” 50 quotes
πŸ“š Lorekeeper         β€” 10 factoids
🧠 Encyclopedist      β€” 50 factoids
🧩 Curator            β€” 10 quotes + 10 factoids

These are not based on arbitrary counters.

They are derived from the real content already stored by Mediabot.

πŸ“š The database remains the source of truth

After a successful quote or factoid write, Mediabot rereads the user’s actual contribution totals from:

QUOTES
FACTOID

Achievement progress is then synchronized from those real totals.

This means Mediabot does not blindly increment a second counter every time a command succeeds.

That matters for correctness:

retry        β†’ no artificial extra progress
factoid UPSERT β†’ no duplicate merit
repeated write β†’ progress still reflects real stored content

The Achievement system follows the content that truly exists.

πŸ§™ Durable identity still applies

Community contributions are credited through Mediabot’s durable Achievement identity layer.

A user can appear under a transient IRC nick such as:

Te[u]K

while the persistent registered identity remains:

teuk

The contribution is attached to the durable profile rather than fragmented across nick variations.

πŸ† Runtime unlock

The first live development validation on #radiocapsule immediately proved the feature:

πŸ† Achievement Unlocked! Te[u]K β†’ πŸ“œ Archivist (uncommon)

That confirmed the complete path:

quote write
β†’ contribution recount
β†’ durable identity resolution
β†’ Achievement progress
β†’ unlock
β†’ IRC notification

But that same runtime test also revealed something more interesting.

πŸ› The Achievement that stole a quote ID

The first test quote was reported by Mediabot as:

done. (id: 735723)

Trying to delete it immediately failed:

Quote (id : 735723) does not exist

A read-only database probe found the real quote:

id=55

The cause was precise.

The quote flow originally did this:

INSERT INTO QUOTES
β†’ run Community Achievement writes
β†’ read last_insert_id()

The Achievement code can itself perform INSERT operations.

Those writes changed the connection’s most recent insert ID before the quote code asked for it.

So last_insert_id() no longer referred to the quote.

πŸ”§ Correct ordering

MB668 now captures the quote ID immediately after the quote INSERT:

INSERT INTO QUOTES
β†’ capture quote last_insert_id()
β†’ run Community Achievement synchronization

A dedicated regression guard was added so this ordering cannot silently regress later.

The second runtime test then behaved exactly as expected:

(teuk) done. (id: 56)
(teuk) deleted. (id: 56)

The returned quote ID was once again the real quote ID.

πŸ§ͺ Validation

Focused Community Achievement regression:

PASSED : 213/213
RC=0

Fast validation lane:

PASSED : 5191/5191
RC=0
Runtime: 179s

The complete suite was deliberately not repeated for MB668.

MB667 had just established the global checkpoint:

13784/13784
RC=0
956s

The current validation policy is therefore being used as intended: focused tests and the fast lane for a contained development round, with the full suite reserved for meaningful checkpoints.

🧱 Operational impact

MB668 introduces:

no database schema change
no migration
no new configuration key
no new persistence layer

It builds on data and infrastructure Mediabot already owns.

πŸ—ΊοΈ The social-memory arc continues

The recent sequence now forms a coherent feature family:

MB664 β†’ Channel Memory
MB665 β†’ Community Footprint
MB666 β†’ Channel Awards
MB667 β†’ Channel Yearbook
MB668 β†’ Community Achievements

Mediabot is gradually moving from merely storing channel history to understanding how people contribute to that history.

Some people fill the shelves.

Some preserve the stories.

Some become the reason the Room of Requirement has something worth finding. πŸ†πŸ“šβœ¨

You must be logged in to reply.