No test drives a real 402 payment loop
Maintainer thường phản hồi trong vòng 4 ngày
@Ugasutun đang làm issue này rồi.
Từ ngày 17/10/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Background
The 402 test asserts that a rejected payment maps to ERR_PAYMENT_REJECTED.
Nothing tests the path where a 402 is answered successfully: the payment is
constructed, signed, submitted and the resource returned.
That path is the reason this tool exists, it is the one that moves money, and it
is the one that would break silently on an x402 or Stellar SDK upgrade — which
is not hypothetical, since this repo currently pins @stellar/stellar-sdk at a
major four behind current.
What to build
- An end-to-end test of the successful 402 loop against a stubbed resource that
demands payment and verifies it — a fake facilitator, not mainnet. - Assert on what was signed: amount, destination, network passphrase. A test that
only checks the response body would pass while paying the wrong account. - Cover the failure branches too: wrong network, expired signature, amount above
maxPrice. - Testnet keys only, generated by the test, never committed and never a real
account.
Acceptance criteria
- A successful 402 loop is tested end to end against a stub
- Assertions cover amount, destination and network, not just the response
- Payment above
maxPriceis refused, asserted - No real key or mainnet account is used
- The test is deterministic and needs no network access
Drips Wave · Complexity: Advanced · 200 points
Repo: Divinity-Labs/Lens. The MCP server is src/mcp/server.ts
(BazaarMcpServer) with error codes in src/mcp/codes.ts. It is started by
npm run mcp:server → examples/mcp-server/run.ts, and there is an agent
example at examples/mcp-server/agent.ts. Tests are tests/mcp.test.ts.
Run the tests: npm test. The tests are vitest, not jest. A single file
is npx vitest run tests/mcp.test.ts.
Load test (prices) is already failing on main. Not your PR.
This surface signs with a real mainnet key. examples/mcp-server/run.ts
requires MCP_AGENT_SECRET_KEY_MAINNET and builds a signer for
stellar:pubnet. Anything you change here can move real money, so prefer
failing closed, and never log, echo or test with a real secret key.
Never elide an address, a contract id or a key in code, comments or
fixtures. A previous batch shortened a contract id and five contributors
invented plausible-looking ids to fill the gap. Write it in full or not at all.
An agent is the least able caller to notice a wrong answer. It will reason
over whatever it is handed, confidently. Prefer a structured error over a
best-effort result.
Required: Before submitting, join the contributor Telegram so your work can be tracked and counted toward the Stellar Wave: https://t.me/+fxHXq8f1SwlkZDBk
- Ngôn ngữ chính
- TypeScript
- Star
- 4
- Fork
- 71
- Merge trung bình
- 3 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 142
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Divinity-Labs/Lens
-
Webhook retries have no jitter, so failures synchroniseCó thể đã có người làm @Richard-tobi đã nhận 19 ngày trước. Đang mởarea:reliability difficulty:easy help wanted points:100 Stellar Wave
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Divinity-Labs/Lens#341 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 4 ngày
-
[Wave 10 Attribution] Link merged PRs & resolved issues for @sparkysolutions10-pixel on Drips WaveĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 5/100
Divinity-Labs/Lens#627 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Divinity-Labs/Lens#626 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Divinity-Labs/Lens#625 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Live Service Spec Drift ReportĐang mởarea:tests automated live-spec-report
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 28/100
Divinity-Labs/Lens#606 · 12 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
Tất cả issue của Divinity-Labs/Lens
Issue tương tự
-
needs-area-label
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Website: the hero tip's video play() has no catch, so a refused play is an unhandled rejectionĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
liberation-data/drivine#615 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
backend bug ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
geolens-io/geolens#3639 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
radius-project/ai-extensions#1196 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100