Repository navigation
[Bug] ISSUE-0021: rebuild live leaderboard and local E2E #33
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Context
The latest local walkthrough exposed that the MVP completion claim is not supported by the current implementation or evidence:
Battle.solcorrectly emitsChallengeCreatedwith onlychallengeId,challenger, andopponentindexed, but the backend ABI andparseAbiItemmark all five fields indexed.handleChallengeResolvedcompares an address to a token ID, so winner/loser addresses are not derived correctly and leaderboard rows remain empty./leaderboardis still hard-coded demo data and explicitly says the live indexer is future work.- Monster detail screenshots show broken images despite committed PNG art.
- The backend has no tests, CI only type-checks/builds it, and the current E2E evidence has no mobile, console, a11y, or resolved-live-leaderboard proof.
Goal
Deliver a reproducible fresh-Anvil flow from mint/hatch/train/battle through indexed API data and rendered live UI, with evidence strong enough to support the MVP acceptance claims.
Scope / allow-list
backend/**frontend/**.github/workflows/ci.ymlcontracts/test/**only if an event-contract regression assertion is requiredscripts/**for deterministic local E2E orchestrationdocs/evidence/0021/**PROJECT_STATUS.md,sessions/**,memory/**,docs/INDEX.md,ENGINEERING.md,TESTING.mdfor truthful status and durable lessons
Non-goals
- Monad testnet deployment ([Spike] ISSUE-0019: deploy to Monad testnet + agent-browser E2E #24)
- Contract storage/layout/supply changes
- New gameplay features or art generation
Acceptance criteria
- Backend event ABI exactly matches the Solidity event declarations;
ChallengeCreateddecodes both token IDs and both addresses from a real Anvil log without ad hoc topic assumptions. -
ChallengeResolvedmaps winner/loser token IDs to the correct trainer addresses, awaits post-battle monster synchronization, and records turns/draw/transaction metadata. - Starting from a fresh SQLite DB after the battle has resolved replays history into one correct battle row and a non-empty leaderboard; restarting from the checkpoint is idempotent.
- Backend has automated tests for event decoding, resolution mapping, leaderboard ranking, API validation, replay, and restart behavior; CI runs them.
- Frontend leaderboard consumes the live backend API and implements loading, populated, empty, and unavailable states with no demo entries or Phase 2 placeholder copy.
- Monster detail art uses committed assets and renders successfully for the E2E species/stage.
- A one-command or documented deterministic local E2E run starts fresh Anvil, deploys contracts, executes two-wallet mint/hatch/train/battle, runs indexer/API/frontend, and asserts contract/API/UI state.
- Desktop 1440x900 and mobile 390x844 screenshots prove the populated live leaderboard and monster details; browser console is clean and axe reports no serious/critical findings.
- Contract tests, backend tests/typecheck/build, frontend tests/typecheck/lint/build, and GitHub CI pass.
-
PROJECT_STATUS.mdand session/memory records match the verified state and distinguish local proof from pending testnet deployment.
Evidence requirements
Store change-summary.md, implementation-plan.md, raw test logs, API/contract traces, desktop/mobile screenshots, Playwright/axe results, reviewer reports, and verification.md under docs/evidence/0021/.
Reviewers
Required cold-start roles: bug-hunter, behavior-reviewer, architecture-reviewer, security-reviewer, and ui-reviewer. No Critical/High finding may remain open.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Activity
feat(#33): live leaderboard + creative redesign (#34)