Merge pull request 'feat: add harb-specific triage formula (#16)' (#17) from fix/issue-16 into master
This commit is contained in:
commit
fb0f23f8e5
1 changed files with 87 additions and 0 deletions
87
formulas/triage-harb.toml
Normal file
87
formulas/triage-harb.toml
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
# formulas/triage-harb.toml — Harb-specific triage formula
|
||||
#
|
||||
# Extends the disinto triage template (formulas/triage.toml) with
|
||||
# harb stack lifecycle, data flow, and API endpoints.
|
||||
#
|
||||
# Triggered by: bug-report + in-triage on johba/harb Forgejo issues.
|
||||
|
||||
name = "triage-harb"
|
||||
description = "Deep root cause analysis for harb — Kraiken staking protocol"
|
||||
version = 1
|
||||
extends = "triage"
|
||||
|
||||
stack_script = "./scripts/dev.sh restart --full"
|
||||
tools = ["playwright"]
|
||||
|
||||
[project]
|
||||
data_flow = "chain (Anvil) → contracts (Kraiken/Stake/LM) → events → ponder indexer → PostgreSQL → GraphQL → Vue composables → UI"
|
||||
|
||||
api_endpoints = """
|
||||
Anvil RPC: http://localhost:8545
|
||||
Ponder GraphQL: http://localhost:42069/graphql
|
||||
Webapp: http://localhost:5173/app/
|
||||
TxnBot: http://localhost:43069/status
|
||||
Caddy proxy: http://localhost:8081/app/
|
||||
Otterscan: http://localhost:5100
|
||||
"""
|
||||
|
||||
stack_lock = "full"
|
||||
|
||||
[project.contracts]
|
||||
# Addresses are in tmp/containers/contracts.env after bootstrap.
|
||||
# Source them with: export $(cat tmp/containers/contracts.env | xargs)
|
||||
env_file = "tmp/containers/contracts.env"
|
||||
key_contracts = ["Kraiken", "Stake", "LiquidityManager"]
|
||||
|
||||
[project.stack]
|
||||
# Full lifecycle via scripts/dev.sh
|
||||
start = "./scripts/dev.sh start"
|
||||
stop = "./scripts/dev.sh stop"
|
||||
restart_full = "./scripts/dev.sh restart --full"
|
||||
restart_light = "./scripts/dev.sh restart --light"
|
||||
health = "./scripts/dev.sh health"
|
||||
|
||||
# Bootstrap creates contracts and seeds state.
|
||||
# After restart --full, wait for all services to be healthy before proceeding.
|
||||
# Expected healthy services: anvil, postgres, ponder, webapp, landing, txn-bot, caddy, umami, otterscan
|
||||
bootstrap_wait = 120
|
||||
|
||||
[project.investigation_hints]
|
||||
# Common patterns for harb bugs
|
||||
description = """
|
||||
When investigating harb bugs:
|
||||
|
||||
1. Contract state: use cast to read on-chain state
|
||||
export $(cat tmp/containers/contracts.env | xargs)
|
||||
cast call $KRAIKEN "totalSupply()(uint256)" --rpc-url http://localhost:8545
|
||||
cast call $STAKE "getEarnings(uint256)(uint256)" <positionId> --rpc-url http://localhost:8545
|
||||
cast call $LIQUIDITY_MANAGER "positions(uint8)(uint128,int24,int24)" 0 --rpc-url http://localhost:8545
|
||||
|
||||
2. Ponder indexed data: query GraphQL
|
||||
curl -sf http://localhost:42069/graphql -H 'Content-Type: application/json' \
|
||||
-d '{"query": "{ stats(id: \\"0x01\\") { holderCount mintedLastDay recentersLastDay lastEthReserve } }"}'
|
||||
|
||||
3. Ponder config: check if all addresses are correct
|
||||
cat services/ponder/.env.local | grep -E 'ADDRESS|POOL'
|
||||
|
||||
4. UI data: use Playwright MCP to navigate and observe
|
||||
Navigate to http://localhost:5173/app/ (password: test123)
|
||||
|
||||
5. Logs: check container logs for errors
|
||||
docker compose logs ponder --tail 50
|
||||
docker compose logs webapp --tail 50
|
||||
docker compose logs anvil --tail 20
|
||||
|
||||
6. Common root causes in harb:
|
||||
- Missing or wrong contract addresses in ponder .env.local
|
||||
- AppArmor blocking inside LXD (need security_opt: apparmor=unconfined)
|
||||
- viem v2 returns arrays not named objects for multi-output calls
|
||||
- Ring buffer threshold too high for freshly bootstrapped local chains
|
||||
- Submodules not initialized (onchain/lib/ empty)
|
||||
- kraiken-lib not built (landing/webapp fail to start)
|
||||
"""
|
||||
|
||||
[project.login]
|
||||
# Webapp has a password gate
|
||||
url = "http://localhost:5173/app/"
|
||||
password = "test123"
|
||||
Loading…
Add table
Add a link
Reference in a new issue