QA: local full-stack checklist doc + start-all orchestrator (Anvil, indexer, frontend, bot swarm) #104
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:open_issues
agents
agent:security_audit
agent:verify
area
timecurve
arena
arena-v2
audit
block:feature_review
block:security
bug
contracts
design
devops
docs
documentation
enhancement
epic
feature
frontend
indexer
low priority
megaeth
operations
ops
performance
QA
qa checklist
referrals
removal
security
smart-contracts
tech-debt
testing
time-arena
timecurve
visual-qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
code/yieldomega#104
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Add procedural QA documentation for checklist-driven workflows that bring up Anvil + indexer + frontend + bot swarm, plus one orchestration entrypoint that starts all four and centralizes options (env / flags) so operators do not scatter knobs across shells.
Today the heavy lifting lives in
scripts/start-local-anvil-stack.sh, which already runs Postgres (Docker), Anvil,DeployDev, optionalanvil_rich_state, optional Kumbaya fixtures, registry JSON, indexer DB reset, and the Rust indexer in the background, and writesfrontend/.env.local. It optionally runs the Python bot swarm at the end.start-local-anvil-stack.shdeliberately does not start Vite — it tells the user to runcd frontend && npm run devseparately (scripts/start-local-anvil-stack.sh“Next:” block).scripts/e2e-anvil.shis a Playwright path (Anvil + deploy + frontend build + tests) and does not replace full-stack manual QA (no Docker Postgres indexer loop in that script).This issue tracks research conclusions, recommended file list, language choice, and a verification checklist for the future MR.
Current architecture (repo reality)
yieldomega-pgstart-local-anvil-stack.shPG_HOST_PORT(default 5433),DOCKER_PGanvilANVIL_PORT/RPC_URL;--code-size-limit 524288; with swarm:--accounts 30,--block-timefromYIELDOMEGA_ANVIL_BLOCK_TIME_SEC(default 12;0= omit)forge script … DeployDevYIELDOMEGA_DEPLOY_NO_COOLDOWN,YIELDOMEGA_ANVIL_BUY_COOLDOWN_SEC;SKIP_ANVIL_RICH_STATEskipscontracts/script/anvil_rich_state.sh;YIELDOMEGA_DEPLOY_KUMBAYA=1runsDeployKumbayaAnvilFixtures+ merges KumbayaVITE_*viascripts/lib/kumbaya_local_anvil_env.shcontracts/deployments/local-anvil-registry.jsoncargo runinindexer//tmp/yieldomega_indexer_stack.pidDATABASE_URL(fromPG_HOST_PORT),CHAIN_ID=31337,START_BLOCK=0,ADDRESS_REGISTRY_PATH,LISTEN_ADDR=127.0.0.1:${INDEXER_PORT},INGESTION_ENABLED=true; port:INDEXER_PORTwith auto-bump unlessQA_USE_FIXED_INDEXER_PORT=1frontend/.env.localVITE_*,VITE_INDEXER_URL; optionalLAUNCH_OFFSET_SEC→VITE_LAUNCH_TIMESTAMPnpm run dev(Vite)frontend/node_modules; restart dev server after.env.localchangespython+run_swarm()START_BOT_SWARM=1(default on whenSKIP_ANVIL_RICH_STATE=1, else default off)YIELDOMEGA_ALLOW_ANVIL_FUNDING=1(set by stack);YIELDOMEGA_SWARM_REFERRALS=0for non-referral path [#102]; venv atbots/timecurve/.venvpreferred; preflightimport web3[#50]; logs/tmp/yieldomega_swarm_*.log, PIDs/tmp/yieldomega_bot_swarm.pidsRelated docs / cross-links (do not duplicate blindly — link outward):
docs/testing/e2e-anvil.md— env contract, cooldown [#88], swarm + chain time [#99], standalone swarm [#102], E2E [#87]docs/testing/manual-qa-checklists.md— issue-tagged play checklistsbots/timecurve/README.md— PEP 668,run_swarmwithout stackindexer/.env.example— indexer env reference (production defaults differ from local stack)Gotchas to call out in the new doc:
--block-time; swarm + long cooldown ⇒ possible frozenblock.timestampYIELDOMEGA_DEPLOY_NO_COOLDOWN=1(and/or explicitYIELDOMEGA_ANVIL_BUY_COOLDOWN_SEC> 0)BuyViaKumbaya:YIELDOMEGA_DEPLOY_KUMBAYA=1; indexer must see router in registry — restart after verification merges if operator ranscripts/verify-timecurve-buy-router-anvil.shrun-latest.json— always use ERC-1967 proxy addresses (see guardrails / [#61])Recommended language for the new “start all four” script
Bash (same as
start-local-anvil-stack.sh,e2e-anvil.sh,scripts/lib/*.sh).Rationale: Orchestration is already shell-native (Docker,
anvil,forge,cargo, optionalnpm run devin background). A Python or TypeScript wrapper would still shell out for the same steps and duplicate PID/log conventions (/tmp/yieldomega_*). Bash keeps one maintenance surface with existing helpers (source scripts/lib/…).Acceptable alternative:
bashouter script that calls small Python utilities only if we later need structured CLI parsing beyondgetopts— not required for v1.Files to create (deliverables)
docs/testing/qa-local-full-stack.mdjq,curl, Node, Rust/toolchain for indexer,bots/timecurvevenv), decision tree (live sale vs rich state, Kumbaya on/off, swarm on/off), env matrix (table above expanded with examples), smoke commands, links tomanual-qa-checklists.mdsections, troubleshooting (PEP 668, indexer port collision, Anvil reuse warnings)scripts/start-qa-local-full-stack.shbash scripts/start-local-anvil-stack.sh(single source of truth — avoid reimplementing deploy/indexer); (3) optionally startsnpm run devinfrontend/as background job with log + PID file (e.g./tmp/yieldomega_frontend_qa.log,/tmp/yieldomega_frontend_qa.pid); (4) prints final URLs (RPC, indexer/v1/status, Vite defaulthttp://127.0.0.1:5173) and verification one-liners; (5) optional CLI flags mapping to presets e.g.--no-frontend,--no-swarm,--kumbaya,--rich-state/ or document that presets are only env vars forwarded verbatim — pick one approach in implementation MROptional follow-up (same MR or child issue):
docs/testing/manual-qa-checklists.mdpointing toqa-local-full-stack.mdscripts/lib/qa_local_stack_usage.sh(only if duplication appears)Explicit non-goals for v1:
start-local-anvil-stack.shinternals (too large; keep delegating)scripts/e2e-anvil.sh)Options the orchestrator should expose or forward (single place)
Document and/or map these in
start-qa-local-full-stack.shso QA sets them once:ANVIL_PORT,RPC_URL,SKIP_ANVIL_RICH_STATE,START_BOT_SWARM,YIELDOMEGA_ANVIL_BLOCK_TIME_SEC,YIELDOMEGA_DEPLOY_NO_COOLDOWN,YIELDOMEGA_ANVIL_BUY_COOLDOWN_SEC,YIELDOMEGA_DEPLOY_KUMBAYA,DEPLOYER_PK(Kumbaya deploy),FOUNDRY_OUTPG_HOST_PORT,INDEXER_PORT,QA_USE_FIXED_INDEXER_PORT,DOCKER_PGLAUNCH_OFFSET_SEC; optionalVITE_*overrides only if we add explicit support (default: rely on stack-generated.env.local)YIELDOMEGA_SWARM_REFERRALS,YIELDOMEGA_ANVIL_EXTRA_FUNDED_ADDRESSES(documented for manualtimecurve-bot; stack usessync-bot-env-from-frontend.shbefore swarm)FRONTEND_DEV_PORTor rely on Vite defaults — only if implementor addsnpm run dev -- --portpassthroughVerification checklist (for the MR that implements this issue)
After running the new orchestrator (or documented manual sequence):
cast block-number --rpc-url <RPC_URL>succeedscurl -sf http://127.0.0.1:<indexer>/v1/statusreturns OKcurl -s 'http://127.0.0.1:<indexer>/v1/timecurve/buys?limit=5' | jq .returns JSON (empty array acceptable immediately after deploy)http://127.0.0.1:5173loads; TimeCurve / indexer-driven panels match expected sale phase (live vs post–rich-state per setup)/tmp/yieldomega_swarm_*.logshows activity; buys endpoint shows new rows over time (withYIELDOMEGA_DEPLOY_NO_COOLDOWN=1for dense checks)SKIP_ANVIL_RICH_STATE=1+ swarm: logs mention interval mining when stack started Anvil (or document warning path when reusing RPC)make check-frontend-env(optional) passes when.env.localpresent/tmp/yieldomega_anvil_stack.pid, indexer/tmp/yieldomega_indexer_stack.pid, frontend PID from new script, Docker container)Recommendations
start-local-anvil-stack.sh— do not fork deploy/indexer logic.--with-frontend(or equivalent) so “full stack” matches the issue title; allow opt-out for headless / CI-like runs.e2e-anvil.mdfor Playwright andanvil-export-bot-env.shfor bot-only env regeneration.scripts/*.sh).References in-repo
scripts/start-local-anvil-stack.shscripts/e2e-anvil.shdocs/testing/e2e-anvil.mdbots/timecurve/README.mdscripts/sync-bot-env-from-frontend.shmentioned in commit
52015fe1e4mentioned in commit
243e2a0cdcImplemented and merged to main (
243e2a0). @brouie — please verify.What changed
docs/testing/qa-local-full-stack.md— procedural QA runbook: invariants, prerequisites, decision tree (live sale vs rich state, Kumbaya, swarm), env matrix, smoke commands, troubleshooting, stopping PIDs, verification checklist. Cross-linkse2e-anvil.md,manual-qa-checklists.md,anvil-export-bot-env.sh, and skills.scripts/start-qa-local-full-stack.sh— orchestrator that only callsscripts/start-local-anvil-stack.sh, then optionally backgroundsnpm run dev(/tmp/yieldomega_frontend_qa.log,/tmp/yieldomega_frontend_qa.pid). CLI:--no-frontend,--no-swarm,--kumbaya,--rich-state,--live-sale. Env vars pass through;FRONTEND_DEV_PORTfor Vite.docs/testing/invariants-and-business-logic.md— table row + § QA local full stack orchestrator (#104) with explicit invariants (no duplicated stack logic; Playwright stays ine2e-anvil.sh).docs/testing/manual-qa-checklists.md— TOC + § #104 checklist.docs/testing/e2e-anvil.md— pointer to full-stack manual QA vs Playwright.skills/README.md,skills/script-with-timecurve-local/SKILL.md— contributor / 3rd-party agent cross-links..cursor/skills/yieldomega-guardrails/SKILL.md— item 36 for #104.scripts/start-local-anvil-stack.sh— Next: line points at the new orchestrator + doc.Verification checklist for you
bash scripts/start-qa-local-full-stack.sh --helpprints expected usage.cast block-numberagainstVITE_RPC_URLfromfrontend/.env.localsucceeds.curl -sf "$(grep VITE_INDEXER_URL frontend/.env.local | cut -d= -f2-)/v1/status"OK.http://127.0.0.1:${FRONTEND_DEV_PORT:-5173}/loads after stack.--no-frontendskips Vite;--live-sale/--kumbayapresets match expectations;--no-swarmprevents swarm start.Leaving issue open per request. Thanks!
Verification on
243e2a0— partial PASS, leaving open per your request.Items verified this session
--helpprints expected usage — block lists all 5 CLI flags (--no-frontend,--no-swarm,--kumbaya,--rich-state,--live-sale),FRONTEND_DEV_PORTpassthrough, orchestrator-owned vs stack-owned PIDs/logs, links toqa-local-full-stack.md. Minor finding: trailingset -euo pipefailline leaks into help output — filed as #105 (cosmetic, P3-low).--no-frontendflips internalWITH_FRONTEND=0,--no-swarmexportsSTART_BOT_SWARM=0,--kumbayaexportsYIELDOMEGA_DEPLOY_KUMBAYA=1,--rich-stateunsetsSKIP_ANVIL_RICH_STATE,--live-saleexportsSKIP_ANVIL_RICH_STATE=1. Unknown flag → exit 2 (bash ... --bogus-flagconfirmed).--help→ exit 0 confirmed.manual-qa-checklists.mdline 27 (TOC) + line 448 (<a id="manual-qa-issue-104">) + line 450 (heading) + line 467 (qa-local-full-stack.md#stopping-the-stacklink).e2e-anvil.mdline 5 — full-stack manual QA pointer.invariants-and-business-logic.mdline 82 (table row), line 104 (<a id="qa-local-full-stack-orchestrator-gitlab-104">), line 106 (heading).qa-local-full-stack.md## Stopping the stackat line 111 (target of#stopping-the-stackcross-link).Items deferred to a heavy-run session
cast block-numbersucceeds againstVITE_RPC_URL.curl -sf "$indexer_url/v1/status"returns OK after stack.FRONTEND_DEV_PORT(default 5173) after default run.Will verify those next session when running a fresh stack bring-up. Logic in the script (lines 120-170) reads correctly: defaults
WITH_FRONTEND=1, callsstart_frontend_devwhich backgroundsnpm run devto/tmp/yieldomega_frontend_qa.log+/tmp/yieldomega_frontend_qa.pid, polls Vite port for readiness, prints all 3 verification one-liners (cast, curl status, curl buys+jq).Leaving open. cc @PlasticDigits
mentioned in issue #100
Items 2 + 3 verified now against the live stack (Anvil + indexer carried from 4/30 EOD).
Item 2:
cast block-number --rpc-url <RPC_URL>succeedsItem 3a: indexer
/v1/statusreturns OKmax_indexed_blockmatches Anvil head — indexer ingestion is in sync, no drift. Schema v1.9.0 carried.Item 3b:
/v1/timecurve/buys?limit=5returns populated JSONReturned rich rows including
amount, fullbp_*breakdown (base_buy, ambush_bonus, clutch_bonus, flag_penalty, streak_break_bonus, timer_reset_bonus),buyer, defense streak metrics, block + timestamp. Bot swarm is actively producing buys (block 3154 in payload, head was 3153 at status check — ingestion keeps up).cc @PlasticDigits
Final verification — all acceptance items PASS
Browser-load item from Saturday's deferred set verified now.
Item 6: Browser loads on FRONTEND_DEV_PORT — PASS
Vite dev server brought up against the carried full stack (Anvil 8545, indexer 3100, Postgres 5433 — all from 4/30 EOD carry):
Page loads cleanly via SSH tunnel to laptop browser at
http://localhost:5173/. Frontend reads against carried.env.local(TimeCurve0x59b6...857b, indexer URLhttp://127.0.0.1:3100, RPChttp://127.0.0.1:8545).Consolidated acceptance status (all 6 items)
[✓] Item 1:
--helpprints expected usage (cosmetic finding spawned #105)[✓] Item 2:
cast block-numberagainst VITE_RPC_URL succeeds (returned 3153)[✓] Item 3a: indexer
/v1/statusOK (max_indexed_block 3153, schema_version 1.9.0)[✓] Item 3b: indexer
/v1/timecurve/buys?limit=5returns populated JSON (rich rows with full bp_* breakdown, swarm-produced)[✓] Item 4: CLI presets verified (--no-frontend, --no-swarm, --kumbaya, --rich-state, --live-sale all map correctly at lines 49-79)
[✓] Item 5: docs cross-link mesh verified (3-way: manual-qa-checklists.md, e2e-anvil.md, invariants-and-business-logic.md, qa-local-full-stack.md)
[✓] Item 6: Browser loads on FRONTEND_DEV_PORT (this session)
#104 acceptance complete from QA side. cc @PlasticDigits
mentioned in issue #153
marked this issue as related to #153
mentioned in issue #162