Release Notes - TaipanStack v0.3.8 (2026-03-10)¶
Overview¶
TaipanStack v0.3.8 focuses on highly requested execution resilience primitives, security observability improvements, performance optimizations, and code quality refactoring. This release highlights the definitive introduction of the Bulkhead Pattern and the seamless integration between Pydantic v2 and Structlog for automated data redaction.
Key Changes¶
🚢 Resilience & Concurrency¶
- Bulkhead Pattern (
@limit_concurrency): New decorator protecting synchronous and asynchronous environments against overload cascades and resource exhaustion by strictly limiting concurrent tasks using optimalSemaphorelogic and precise timeouts. - Async Tokens (
@rate_limit): Complete first-class asynchronous (async def) integration into the rate limit token-bucket, rigorously preserving strictMypyresolution capabilities via preciseoverloadtyping.
🛡️ Security Observability¶
SecureBaseModelIntegration: An extension of Pydantic components built dynamically for Structlog pipelines. Model dumps now transparently replace sensitive patterns (passwords, tokens, API keys) traversing nested values with***REDACTED***, pre-compiled regex guaranteeing zero security leakages in output logs.
⚡ Performance Optimizations¶
- Regex Guard O(N) Optimization: Improved path traversal detection by using a single pre-compiled regex instead of multiple individual checks (#156).
- Masking Processor speedup: Sensitive data masking in structured logs now uses a high-performance regex pattern mapping, significantly reducing processing overhead per log line (#157).
- Native orjson + Result Types: Developed
default_encoderto natively bridge theResultMonad pattern with Python's fastest JSON serialization libraryorjson, dynamically expandingOk/Errvariants into highly-optimized response mapping ({"status": "success/error", ...}).
🧹 Code Quality & Refactoring¶
- Pre-commit Generator: Refactored the pre-commit configuration generator for better modularity and testability (#158).
- Tooling Consolidation: Removed redundant benchmark scripts and consolidated performance validation into the standard test suite.
🧪 Security & QA¶
- Extended Path Traversal Tests: Added explicit validation for
ensure_dirandget_file_hashto guarantee that path traversal blocks are active across all filesystem utilities (#153, #154). - Retry Logic Validation: Added comprehensive unit tests for the
retry_on_exceptionwrapper to ensure reliable behavior in flaky environments (#155).
Verification Details¶
- Test Suite: 100% pass rate across Linux, macOS, and Windows. (929 tests total)
- Coverage: Maintained 100% branch and line coverage for all critical modules in
v0.3.8. - Security: Validated by CodeQL, Bandit, and Semgrep.
[!TIP] This version is fully backward compatible with the
v0.3.xseries. Upgrading is highly recommended for backend environments susceptible to API overloads or those needing strict Pydantic logging observability.