Sunset local Gitea in favor of remote VPS instance. All automation, scripts, configs, and docs updated.
4.6 KiB
Timmy API Test Report
Test Date: 2026-03-18
Target: https://9f85e954-647c-46a5-90a7-396e495a805a-00-clz2vhmfuk7p.spock.replit.dev
Tester: Kimi Agent
Summary
| Metric | Count |
|---|---|
| PASS | 16 |
| FAIL | 0 |
| SKIP | 0 |
| Total | 16 |
Overall Result: ✅ ALL TESTS PASSED
Mode 1: Job-Based API (Tests 1-10)
| Test | Description | Result | Latency | Notes |
|---|---|---|---|---|
| 1 | Health check | ✅ PASS | <1s | HTTP 200, status=ok, uptime=587s |
| 2 | Create job | ✅ PASS | <1s | HTTP 201, jobId returned, evalInvoice.amountSats=10 |
| 3 | Poll before payment | ✅ PASS | <1s | state=awaiting_eval_payment, paymentHash present |
| 4 | Pay eval invoice (stub) | ✅ PASS | <1s | HTTP 200, ok=true |
| 5 | Poll after eval payment | ✅ PASS | 4s | state=awaiting_work_payment, workInvoice.amountSats=182 |
| 6 | Pay work + get result | ✅ PASS | 6s | state=complete, good Lightning Network explanation |
| 7 | Demo endpoint | ✅ PASS | 6s | HTTP 200, detailed satoshi explanation |
| 8a | Input validation - missing body | ✅ PASS | <1s | HTTP 400, error message correct |
| 8b | Input validation - unknown job | ✅ PASS | <1s | HTTP 404, error message correct |
| 8c | Input validation - missing param | ✅ PASS | <1s | HTTP 400, error message correct |
| 8d | Input validation - too long | ✅ PASS | <1s | HTTP 400, "500 characters" error |
| 9 | Demo rate limiter | ✅ PASS | <1s | 2x200 then 4x429, limiter working |
| 10 | Rejection path | ✅ PASS | 3s | state=rejected with ethical reason |
Mode 1 Latency Summary
- Test 5 (Eval→Work transition): 4 seconds
- Test 6 (Work payment→Result): 6 seconds
- Test 7 (Demo endpoint): 6 seconds
- Test 10 (Rejection path): 3 seconds
Mode 2: Session-Based API (Tests 11-16)
| Test | Description | Result | Latency | Notes |
|---|---|---|---|---|
| 11 | Create session | ✅ PASS | <1s | HTTP 201, sessionId, state=awaiting_payment, amount=200 |
| 12 | Poll before payment | ✅ PASS | <1s | state=awaiting_payment |
| 13 | Pay deposit + activate | ✅ PASS | 1s | state=active, balanceSats=200, macaroon present |
| 14 | Submit request | ✅ PASS | 3s | state=complete, debitedSats=178, balanceRemaining=22 |
| 15 | Missing macaroon → 401 | ✅ PASS | <1s | HTTP 401 as expected |
| 16 | Topup invoice creation | ✅ PASS | <1s | Payment request created, amountSats=500 |
AI Result Quality Observations
Test 6 - Lightning Network Explanation
"The Lightning Network is a second-layer payment protocol built on top of Bitcoin that enables fast, low-cost transactions by allowing users to open private payment channels between each other and tran..."
Quality: ✅ Good - Accurate, concise, and technically correct.
Test 7 - Satoshi Explanation
"A satoshi is the smallest unit of Bitcoin (BTC).\n\n## Key Facts:\n- 1 satoshi = 0.00000001 BTC (one hundred-millionth of a Bitcoin)\n- Named after Satoshi Nakamoto, the pseudonymous creator(s..."
Quality: ✅ Excellent - Well-formatted with markdown, accurate facts.
Test 10 - Rejection Reasoning
"The request explicitly asks for help with something harmful and illegal, which violates ethical and legal guidelines. Th..."
Quality: ✅ Good - Properly rejected harmful request with clear ethical reasoning.
Test 14 - Bitcoin Explanation
"Bitcoin is a decentralized digital currency that enables peer-to-peer transactions without a central authority, secured by blockchain technology and cryptography."
Quality: ✅ Good - Accurate one-sentence summary.
Technical Observations
- Stub Payment System: Working correctly for both job and session modes
- State Machine: Properly transitions through all states (awaiting_eval_payment → evaluating → awaiting_work_payment → executing → complete/rejected)
- Rate Limiting: Demo endpoint correctly limits after 2 requests
- Security: Macaroon-based auth working, missing/invalid tokens rejected with 401
- Pricing:
- Eval cost: 10 sats (fixed)
- Work cost: ~177-182 sats (varies by request)
- Session debited: 178 sats for Bitcoin explanation
Issues Found
None - All tests passed successfully.
Conclusion
The Timmy Lightning Network AI agent API is functioning correctly across all tested endpoints. Both job-based and session-based payment flows work as expected, AI result quality is good, and security controls (rate limiting, auth, input validation) are all operational.
Recommendation: ✅ Ready for use