Skip to content

Ci/enhance package.json - #438

Open
Nursca wants to merge 2 commits into
StellarState:devfrom
Nursca:ci/enhance-package.json
Open

Ci/enhance package.json#438
Nursca wants to merge 2 commits into
StellarState:devfrom
Nursca:ci/enhance-package.json

Conversation

@Nursca

@Nursca Nursca commented Sep 3, 2026

Copy link
Copy Markdown

Description

  1. src/config/data-source.ts — DevOps & CI/CD — added assertValidDataSource pre-flight validation, single-flight idempotent initializeDataSource(), symmetric closeDataSource(), isDataSourceReady() probe; failures wrapped as AppError with codes DATASOURCE_INVALID / DATASOURCE_INIT_FAILED / DATASOURCE_SHUTDOWN_FAILED. 10 new tests.
  2. src/services/stellar/invoice-escrow-contract.service.ts — API Endpoints & Services — consolidated validators, hardened parseStroopAmount (BigInt/number/string, ceiling 10^18), bounded RPC retry with exponential backoff + jitter, opt-in strict due-date validation, rpc_not_configured 503 errors, sanitized retry logs preserving legacy messages. 20 new tests.
  3. src/services/auth.service.ts — API Endpoints & Services — single-flight user upsert (eliminates concurrent first-login race on the unique stellarAddress index), runtime sanitization of non-string inputs across createChallenge/verifyChallenge/getCurrentUser, structured success-path logs (auth.challenge_created, auth.user_upserted, auth.user_found, auth.verify_failed), truncated wallets in logs (never raw signature/nonce/token), deterministic now injection, outer try/catch added to getCurrentUser. 12 new tests.

Verification: 42 new tests, all passing; lint clean; type-check clean (only pre-existing unrelated errors); full suite shows the same 32 pre-existing failures as baseline (verified via git stash) — no regressions.

Closes #267
Closes #273
Closes #274
Closes #287

…EscrowContractService hardening

- Implement comprehensive tests for AuthService focusing on input sanitization, structured logging, and user upsert behavior.
- Create a mock DataSource for testing configuration and initialization logic, ensuring proper error handling and logging.
- Enhance InvoiceEscrowContractService tests to validate input sanitization, strict due-date validation, RPC retry logic, and sensitive data handling.
@drips-wave

drips-wave Bot commented Sep 3, 2026

Copy link
Copy Markdown

@Nursca Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant