Backend: backend/coverage.xml
Frontend: mobile/coverage/lcov.info
Combined value is weighted by total covered lines.
Performance profiling: POST /logmeal/segment
Call stack breakdown
100 %
app.routers.logmeal.segment
3,547 ms
95 %
httpx.AsyncClient.send [LogMeal API call]
3,375 ms
87 %
ssl.SSLSocket.read ← HOTSPOT
3,091 ms
Network I/O wait · LogMeal ML inference time · not Python CPU
8 %
StorageFileAPI.upload [Supabase]
291 ms
5 %
FastAPI + Python application logic
165 ms
Key finding
The 87% hotspot is network I/O, not Python code. The LogMeal API's food-recognition model processes the image server-side. Python execution (including Supabase upload) represents only 5% of total latency.
Profiling result
Why only LogMeal was profiled
87%
LogMeal API
ssl.SSLSocket.read ~3,091 ms
8%
Supabase Storage
non-blocking ~291 ms
5%
Python code
FastAPI + logic ~165 ms
Why profile LogMeal?
87% of wall time blocked in ML inference on external servers. Decision: external bottleneck cannot be optimised from application code. Mitigations in place: 30s timeout, 429 proxying.
Why not profile others?
Postgres: not a bottleneck at current data scale. Storage: non-blocking, async. Python code: 5% of total, yields ≤165 ms max, not worth optimising.
CI/CD evidence from GitHub Actions
All required checks are green
Push checks: Backend, Mobile, AI usage check, deployment
Pull request checks: Backend, Mobile, AI usage gate
Backend job: Ruff lint, format check, pytest, CodeCov upload
Mobile job: ESLint, Prettier check, Jest with coverage, CodeCov upload
Policy job: Verify AI_USAGE.md entry exists for each commit
Continuous integration and deployment
What runs on every pull request
CI: passingCoverage: ~20%AI usage: enforced
Standard pipeline
→ Ruff lint + format check
→ ESLint + Prettier check
→ pytest with CodeCov upload
→ Jest with CodeCov upload
→ EAS Build → Android APK
→ Railway deploy on merge to main
AI enforcement
→ Pre-commit hook reads message
→ Extracts [log:slug] token
→ Checks AI_USAGE.md for entry
→ Rejects commit if missing
→ GitHub Actions repeats on PR
→ PR blocked without valid entry
Non-standard contribution
AI accountability: enforced technically
Every commit carries a log token
feat(#13)[log:copilot]: photo log screen
fix(#11)[log:manual]: bbox scale formula
docs(#33)[log:claude]: CONTRIBUTING.md
Hook rejects any commit without [log:slug]
Three tools, three purposes
Perplexity
Research · API documentation · no code generation
Claude (Anthropic)
Planning · architecture · issue design
GitHub Copilot
Implementation · code generation · reviewed on every PR
State at end
What was delivered
34
issues closed
100%
CI checks passing
~20%
unit test coverage
v1.0.0-beta
GitHub release + APK
✓ Working Android APK (EAS Build)
✓ README + Architecture doc
✓ Deployed FastAPI backend (Railway)
✓ User manual + Profiling report
✓ Full CI/CD pipeline
✓ CHANGELOG + CONTRIBUTING.md
✓ GitHub Release with APK attached
✓ All five user flows functional
Mobile app demo
Core user flows
Auth
Diary
Profile
Manual log
Photo log
AI segmentation
Questions
Architecture · Codebase · Profiling · AI usage · CI/CD