This establishes a structured knowledge base for autonomous agents to avoid rediscovering solved problems and to coordinate architecture decisions. Files: - ai-memory/architecture.md – rings of stability, subsystem responsibilities - ai-memory/bug-patterns.md – catalog of recurring failures and fixes - ai-memory/debugging-playbook.md – diagnostic checklists - ai-memory/agent-notes.md – agent activity log and learnings - ai-memory/failure-archive/ – placeholder for losing PR summaries
2.3 KiB
2.3 KiB
Debugging Playbook
Structured checklists for diagnosing common subsystem failures.
CLI Command Fails with ImportError
- Confirm service module exists:
ls apps/coordinator-api/src/app/services/ - Check
services/__init__.pyexists. - Verify command module adds
apps/coordinator-api/srctosys.path. - Test import manually:
python3 -c "import sys; sys.path.insert(0, 'apps/coordinator-api/src'); from app.services.trading_surveillance import start_surveillance" - If missing dependencies, install coordinator-api requirements.
Blockchain Node Not Starting
- Check virtualenv:
source apps/blockchain-node/.venv/bin/activate - Verify database file exists:
apps/blockchain-node/data/chain.db- If missing, run genesis generation:
python scripts/make_genesis.py
- If missing, run genesis generation:
- Check
.envconfiguration (ports, keys). - Test RPC health:
curl http://localhost:8026/health - Review logs:
tail -f apps/blockchain-node/logs/*.log(if configured)
Package Installation Fails (pip)
- Ensure
README.mdexists in package root. - Check
pyproject.tomlfor required fields:name,version,description. - Install dependencies first:
pip install -r requirements.txtif present. - Try editable install:
pip install -e .with verbose:pip install -v -e .
Git Push Permission Denied
- Verify SSH key added to Gitea account.
- Confirm remote URL is SSH, not HTTPS.
- Test connection:
ssh -T git@gitea.bubuit.net. - Ensure token has
pushpermission if using HTTPS.
CI Pipeline Not Running
- Check
.github/workflows/exists and YAML syntax is valid. - Confirm branch protection allows CI.
- Check Gitea Actions enabled (repository settings).
- Ensure Python version matrix includes active versions (3.11, 3.12, 3.13).
Tests Fail with ImportError in aitbc-core
- Confirm package installed:
pip list | grep aitbc-core. - If not installed:
pip install -e ./packages/py/aitbc-core. - Ensure tests can import
aitbc.logging:python3 -c "from aitbc.logging import get_logger".
PR Cannot Be Merged (stuck)
- Check if all required approvals present.
- Verify CI status is
successon the PR head commit. - Ensure no merge conflicts (Gitea shows
mergeable: true). - If outdated, rebase onto latest main and push.