Created
Jul 05, 19:51
Started
Jul 05, 19:52
Completed
Jul 05, 22:13
DevOps handoff
Type
Feature
Shape
backend
Worktree Slug
weight-three-stage-mascot-draws
Repositories
mcritchie-studio
Release Slug
—
Branch
feat/weight-three-stage-mascot-draws
Local URL
—
QA URL
—
Production URL
—
Acceptance Criteria
Expected Test Plan
Checks Run
Agent Context
Boost the 24 three-stage base forms (2 evolutions off base) to 2x draw weight in the mascot deck. Seam is Pokemon.draw (session_mascot.rb, task.rb, dev board all route through it). Impl: THREE_STAGE_DRAW_WEIGHT=2 constant; Pokemon.three_stage_base_slugs (2 set-based queries, no N+1: a base is three-stage when one of its evolutions is itself an evolver); Pokemon.draw_bag enters deep roots WEIGHT times then .sample. Deck report: 131 base = 50 single / 57 two-stage / 24 three-stage; weighted bag size = 131+24 = 155. Leave draw_from_slugs (curated parent-family path) unweighted.
Stage Timeline
Who handled each stage, the time it took (measured), and the model / tokens / cost reported (best-effort) — plus who's on it right now. — means the agent didn't report that metric.
Conversation
QA review feedback, agent handoffs, and follow-up notes for this task.
Avi review — CODE APPROVED by both reviewers (Carl primary + Shannon light): weighting correct, both mascot seams (session_mascot + task) route through the weighted bag, N+1 claim verified (2 set-based plucks, no per-record query in a loop), tests assert 2x/1x non-flakily, draw_from_slugs left unweighted. NOT advanced to reviewed and NOT a builder-rework — DEFERRED (conductor-review) on two release-lane items: (1) CI 'test' job RED from test/system/review_events_test.rb ReviewEventsTest (deployment-link-menu docs link → expected review_events_hub_path, got /stages) — pre-existing on release itself (branch 0 commits behind release; full non-system suite green, 2869 runs/0 failures incl. new Pokemon tests). Owner = release/QA lane (deployment-link-menu shipped but its system test regressed); get release green by fixing/quarantining that system test then re-run CI. (2) Merge-order coupling with #403 (reclassify-togepi-and-tyrogue, OPEN): whoever merges SECOND reconciles seeded counts 131→129 base / 155→153 bag; assert_equal 24 three-stage is stable. Against current origin/release (403 unmerged) 131/24/155 still pass. Re-review to reviewed once release CI is green.
Code is APPROVED by both reviewers (Carl primary + Shannon light): weighting logic correct, both mascot seams route through the weighted bag, N+1 claim verified, tests assert 2x/1x non-flakily, draw_from_slugs left unweighted. One required reconciliation before you can advance: sibling #403 reclassify-togepi-and-tyrogue (reviewed, merging FIRST via the qa-release sweep) drops the spawn deck base count 131->129. So your hardcoded assertions in test/models/pokemon_test.rb must become: assert_equal 131 -> assert_equal 129 (base) and assert_equal 155 -> assert_equal 153 (weighted bag = 129 + 24). Keep assert_equal 24 (three-stage) AS-IS — Togepi->Togetic and Tyrogue->Hitmons are both 2-stage lines (Togekiss is out-of-range), so the three-stage count is unchanged. Steps: after #403 lands on release, rebase this branch onto origin/release, apply that 2-line count fix, re-run CI, resubmit. NOTE: your earlier CI 'test' red was NOT your diff — it was the FLAKY system straggler test/system/review_events_test.rb (ReviewEventsTest deployment-link-menu), which passed green on #403's run of the byte-identical test; your branch is 0-behind release and touches only pokemon.rb + 2 model tests. A fresh CI run after rebase should clear it.
QA reconciliation resolved (sibling #403 deck 131→129). - Rebased feat/weight-three-stage-mascot-draws onto origin/release, which now carries #403 (Togepi/Tyrogue → bases). Clean rebase, no conflicts; branch is 0-behind release, single commit b57a2dee. - Per operator's call, DECOUPLED the seeded weighting test rather than hardcoding the reviewer's literal 129/153: it now asserts `Pokemon.deck.count + 24 == Pokemon.draw_bag.size`, correct whether the deck is 129 (→153) or 131 (→155), so it no longer couples to another PR's base-count change. Kept `assert_equal 24` (three-stage count unchanged — Togepi→Togetic and Tyrogue→Hitmons are 2-stage, as QA verified) and the membership checks (charmander/dratini in; diglett/snorlax/eevee out). Model doc comments updated to 129/153. - Re-certified after rebase: full suite + rubocop green at af52585b2725; GitHub CI green (4 checks) — the fresh run cleared the flaky review_events_test.rb system straggler exactly as noted. dor-check: DoR-to-Merge met. If you'd prefer the literal `assert_equal 129 / 153` now that #403 is on release, that's a one-line follow-up — but the derived form is merge-order-proof. Task: https://mcritchie.studio/tasks/weight-three-stage-mascot-draws
Avi re-review APPROVED (Carl primary + Shannon light): resubmit resolved the #403 count-coupling block — rebased onto post-#403 release (129-base), pokemon_test.rb asserts base 129 (L276/334), three-stage 24 unchanged (L191), weighted bag DERIVED as deck.count+24=153 (L195, decoupled from base count so no future re-coupling). No stale 131/155. CI green, ReviewEventsTest flake gone. Ready for Steffon's qa-release sweep.
Sealed-bid sizing
Edit →Alex (PM)
—
Avi (PO)
SMALL
Dev
SMALL
Actual
XL
We emailed a one-tap sign-in link to . It expires shortly and can only be used once.
No email? Check spam, or close this and try again.