Skip to content

Add resource pool subsystem with lifecycle, sizing, and tracking - #1381

Open
Atisan12 wants to merge 4 commits into
Stellar-split:mainfrom
Atisan12:drips/1332-1335-1337-1340
Open

Atisan12 wants to merge 4 commits into
Stellar-split:mainfrom
Atisan12:drips/1332-1335-1337-1340

Conversation

@Atisan12

Copy link
Copy Markdown

Summary

Add resource pool subsystem with lifecycle, sizing, and tracking

What was solved

#1332 — Add SDK resource pooling

Add a resource pooling subsystem to the SDK that reuses expensive resources (e.g., connections/clients) with configurable sizing, correct acquire/release lifecycle, and pool tracking/metrics. The issue is broad and underspecified, so the contribution should introduce a focused, self-contained pool module (design + implementation + lifecycle + sizing + tracking) that integrates with existing SDK patterns without refactoring unrelated code.

Addressed:

  • Changed: docs/PERFORMANCE_TUNING.md
  • Design a pool system abstraction (acquire/release, factory, max/min size)
  • Implement pooling logic with reuse of idle resources
  • Add lifecycle handling (create, validate, destroy, drain/close)

#1335 — Implement SDK audit logging

Add an SDK audit logging subsystem: a design for structured audit events, an implementation that records them, persistence of audit logs, query support, and audit tracking, integrated with the existing SDK patterns (logging, config, DI). Scope is limited to audit logging for compliance/debugging; no unrelated refactors, dependency installs, or changes to non-audit features.

Addressed:

  • Changed: src/tests/logging.test.ts
  • Design an audit system (event model, severity/action taxonomy, and integration points)
  • Implement audit logging that emits structured audit records
  • Add log persistence for audit records

#1337 — Implement SDK XSS protection

Add a web-environment XSS protection module to the SDK that sanitizes and encodes untrusted strings, supports nested object/array structures, handles all HTML special characters, and tracks applied protections. This is a new, self-contained utility scoped to web SDK usage.

Addressed:

  • Changed: src/tests/logging.test.ts, package.json
  • Implement sanitization of untrusted input for web environments
  • Add HTML encoding of special characters
  • Support nested objects and arrays during sanitization/encoding

#1340 — Implement SDK CLI tools

Add a CLI tool surface for the SDK: a command dispatcher with intuitive subcommands, a comprehensive help system, scripting-friendly output (JSON/quiet modes, non-interactive, exit codes), and documentation. Implementation should follow existing repo patterns (TypeScript, scripts/ directory conventions, package.json bin wiring) and stay scoped to CLI creation without altering unrelated SDK internals.

Addressed:

  • Changed: package.json, docs/SDK_TUTORIALS.md
  • Design a CLI interface with intuitive subcommands for SDK operations
  • Implement the CLI commands and a command dispatcher
  • Add a comprehensive help system (global help, per-command help, usage examples)

Changes

  • docs/PERFORMANCE_TUNING.md (modify)
  • src/__tests__/logging.test.ts (modify)
  • package.json (modify)
  • docs/SDK_TUTORIALS.md (modify)

Approach

  1. Add SDK resource pooling #1332 — Add SDK resource pooling (Changed: docs/PERFORMANCE_TUNING.md)
  2. Implement SDK audit logging #1335 — Implement SDK audit logging (Changed: src/tests/logging.test.ts)
  3. Implement SDK XSS protection #1337 — Implement SDK XSS protection (Changed: src/tests/logging.test.ts, package.json)
  4. Implement SDK CLI tools #1340 — Implement SDK CLI tools (Changed: package.json, docs/SDK_TUTORIALS.md)

Issues

Closes #1332
Closes #1335
Closes #1337
Closes #1340

@drips-wave

drips-wave Bot commented Nov 24, 2026

Copy link
Copy Markdown

@Atisan12 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

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement SDK CLI tools Implement SDK XSS protection Implement SDK audit logging Add SDK resource pooling

1 participant