No test drives a real 402 payment loop
Los mantenedores suelen responder en 3 días
@Ugasutun ya está trabajando en esto.
Desde el 17/10/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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
- Lenguaje dominante
- TypeScript
- Estrellas
- 4
- Forks
- 71
- Merge medio
- 3 d 10 h
- PR fusionados (30 d)
- 154
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Divinity-Labs/Lens
-
Webhook retries have no jitter, so failures synchronisePosiblemente ocupada @Richard-tobi la tomó hace 10 días. Abiertoarea:reliability difficulty:easy help wanted points:100 Stellar Wave
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Divinity-Labs/Lens#341 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 3 días
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Divinity-Labs/Lens#626 ·
Los mantenedores suelen responder en 3 días
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Divinity-Labs/Lens#625 ·
Los mantenedores suelen responder en 3 días
-
Live Service Spec Drift ReportAbiertoarea:tests automated live-spec-report
Dificultad 4/5 3-5 días Aptitud para principiantes 28/100
Divinity-Labs/Lens#606 · 3 comentarios ·
Los mantenedores suelen responder en 3 días
-
The key is accepted only as a bearer token, and nothing says soPosiblemente ocupada @krsnak la tomó hace 9 días. Abiertoarea:docs difficulty:easy help wanted points:100 Stellar Wave
Divinity-Labs/Lens#512 · 4 comentarios · 1 asignado ·
Los mantenedores suelen responder en 3 días
Todos los issues de Divinity-Labs/Lens
Issues similares
-
backend refactor
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
NIAEFEUP/tts#927 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
callstackincubator/react-native-harness#296 ·
Los mantenedores suelen responder en 1 día
-
Editor bug with grouped nodesAbiertostatus:in-linear
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
n8n-io/n8n#42293 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
verified
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 5 días
-
Add inputmode attribute support (forwarded to the inner input)Quizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Neovici/cosmoz-input#467 ·
Los mantenedores suelen responder en 1 día