Seed legacy WeaselBot achievements with auto-award config#10
Open
romanparkhomenko wants to merge 1 commit into
Open
Seed legacy WeaselBot achievements with auto-award config#10romanparkhomenko wants to merge 1 commit into
romanparkhomenko wants to merge 1 commit into
Conversation
The baseline seed (bc8d946e6cf2) only inserted three achievements by name (The Priest, The Monk, Leader of Men) and predates the auto-award columns, so no achievement auto-awards today. Seed the eleven remaining canonical WeaselBot achievements (see archive-weaselbot) and enable auto-award on the ten whose criteria map exactly to a supported engine metric (posts / qs): Leader of Men, The Boss, Be the Hammer Not the Nail, El Presidente, El Quatro, Golden Boy, Centurion, Karate Kid, Crazy Person, 6 Pack Four are seeded as manual-only because they can't be expressed with the engine's current metrics (documented in the migration docstring): The Priest & The Monk (QSource-scoped; type/tag filters are ignored by the engine), Cadre (no 'unique AOs Q'd' metric) and Holding Down the Fort (no 'max posts at any single AO' metric). The legacy code for each achievement is preserved in meta.legacy_code. Idempotent (guards on existing names) with a full downgrade. Verified by running the full alembic chain up and down against Postgres 16.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Hi F3 Nation — Greco from F3 Tornado Alley (org
35003) here. This seeds the canonical set of achievements that the deprecated WeaselBot service used to award (see archive-weaselbot), so the slack bot's auto-award engine can grant them out of the box.Today the baseline migration (
bc8d946e6cf2) seeds only three of these by name (The Priest, The Monk, Leader of Men), and it predates the auto-award columns — so every seeded achievement hasauto_award = falseand nothing auto-awards.What changed
A new Alembic data migration (
c4f7a1e92b30) that:Inserts the 11 remaining legacy WeaselBot achievements.
Enables auto-award on the 10 whose criteria map exactly to a metric the engine supports (
posts/qs):Leaves 4 as manual/named because they can't be expressed with the engine's current metrics (documented in the migration docstring):
unique_aoscounts distinct AOs posted at, not Q'd at.posts_at_aoneeds a specificao_org_idand has no "max over any one AO" mode.The legacy code for each is preserved in
meta.legacy_codefor traceability.Fidelity note
WeaselBot counted beatdown posts/Qs only (excluding QSource and ruck). Because the engine can't filter those by type, the auto-award rows here count all posts/Qs (
auto_filtersempty). Regions wanting stricter criteria can create custom achievements. Open to adding category-based filters if you'd prefer closer parity.Testing
Ran the full Alembic chain up and down against Postgres 16:
alembic upgrade head→ 14 achievements (10 auto, 4 manual), values as above.alembic downgrade -1→ restores the 3 baseline rows with auto-award cleared.upgrade→ idempotent (guards on existing names); all 14 carrymeta.legacy_code.ruff checkclean.Pairs with the slack-bot PR that lets regions self-enable achievements — together they make this usable end-to-end.