refactor(logging)!: rename UltraOptimizedStructuredLogger to StructuredLogger, OptimizedPoolMonitor to PoolMonitor (LAB-4617) - #314
Conversation
…edLogger, OptimizedPoolMonitor to PoolMonitor (LAB-4617)
Re-applies the 2025-11-28 marketing-language cleanup that was lost at the
OSS import boundary: the private predecessor renamed these classes and
dropped the alias, but the tree cut for the first public commit predated
that change. Hype adjectives ("Ultra", "Optimized") are removed from the
touched docstrings and comments; measurable figures (<5% overhead, ~50ns)
stay. No behaviour change.
BREAKING CHANGE: `cachekit.logging.UltraOptimizedStructuredLogger` is now
`StructuredLogger`; the `cachekit.logging.StructuredRedisLogger` alias is
removed; `cachekit.monitoring.pool_monitor.OptimizedPoolMonitor` is now
`PoolMonitor`. No deprecation aliases are provided. `get_structured_logger()`
is unchanged and remains the supported entry point.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: cachekit-io/cachekit-py/.coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (9)
Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour. WalkthroughThe change renames public logger and pool monitor classes, updates related annotations and wiring, removes the logger alias, and aligns tests and documentation. It also revises descriptive wording without changing hashing, key construction, or cache behaviour. ChangesPublic naming alignment
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Refactor Merge Risk: ⚪ Minimal · up to The release renames public classes and removes legacy logger names, so consumers using the old imports must update. The intentional breaking change is documented and the current change is mergeable. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 76.47% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 17 functions across 8 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
🤖 I have created a release *beep* *boop* --- ## [0.19.0](v0.18.0...v0.19.0) (2026-09-22) ### ⚠ BREAKING CHANGES * **logging:** remove dead compat surface and Redis branding from StructuredLogger (LAB-4621) ([#316](#316)) * **logging:** `cachekit.logging.UltraOptimizedStructuredLogger` is now `StructuredLogger`; the `cachekit.logging.StructuredRedisLogger` alias is removed; `cachekit.monitoring.pool_monitor.OptimizedPoolMonitor` is now `PoolMonitor`. No deprecation aliases are provided. `get_structured_logger()` is unchanged and remains the supported entry point. * **logging:** UltraOptimizedStructuredLogger.__init__ no longer accepts mask_sensitive; get_structured_logger() no longer accepts mask_sensitive and now keys _logger_instances on name alone; mask_sensitive_patterns is removed; ProfileConfig.mask_sensitive_data and ProfileConfig.lazy_pii_masking are removed. All were read by nothing and toggled no behavior. Constructors/callers passing them now raise TypeError instead of silently no-op'ing. Same removal shape as L1CacheConfig.namespace_index in v0.18.0 and L1CacheConfig.invalidation_enabled in v0.16.0 (LAB-520). ### Features * **backend:** bound L1 backfill by the server's remaining freshness (LAB-557) ([#268](#268)) ([7bd5abf](7bd5abf)) * **concurrency:** free-threaded CPython support — memory-ordering fixes, gil_used=false, CI lane (LAB-511) ([#265](#265)) ([bda770b](bda770b)) ### Bug Fixes * **ci:** fail loudly on attestation lookup failure; decide the codecov pair (LAB-2528) ([#270](#270)) ([2a8b941](2a8b941)) * **ci:** make the Atheris fuzz job capable of failing + repair its dead targets (LAB-1140) ([#269](#269)) ([6ab0c28](6ab0c28)) * **decorators:** async get hits record serializer/size/hit like the sync path (LAB-3765) ([#297](#297)) ([9b96fd2](9b96fd2)) * **decorators:** async lock double-check L2 hits record get telemetry (LAB-3769) ([#303](#303)) ([683b1c7](683b1c7)) * **decorators:** honour set_default_backend() when called after decoration (LAB-4457) ([#313](#313)) ([d20204c](d20204c)) * **file:** guard eviction unlink against a concurrent rename (LAB-2685) ([#285](#285)) ([e917a57](e917a57)) * **file:** write every byte or fail; evict a payload that shrank under read (LAB-2682) ([#272](#272)) ([068adb2](068adb2)) * **logging:** redact raw cache keys on all log paths (LAB-304) ([#264](#264)) ([81f97fb](81f97fb)) * **logging:** sanitise error kwarg at the structured cache-operation sinks (LAB-3666) ([#301](#301)) ([d27ec29](d27ec29)) * **redis:** stop lock waiters pinning executor threads (LAB-3596) ([#290](#290)) ([ddbeb91](ddbeb91)) * **serializers:** bound forged-entry error echoes; retire columnar dead code (LAB-3131) ([#289](#289)) ([10a1049](10a1049)) * **serializers:** bound untrusted msgpack decode depth and header allocation (LAB-2503) ([#276](#276)) ([f7c087d](f7c087d)) * **serializers:** fail closed on unverified DataFrame/Series envelopes (LAB-2736) ([#304](#304)) ([60da54f](60da54f)) * **serializers:** take the format from the envelope, not the header; drop the header-gated fall-through (LAB-2736) ([#308](#308)) ([69db1c5](69db1c5)) * **serializers:** type ByteStorage.retrieve failures and collapse duplicated columnar decode (LAB-2736) ([#287](#287)) ([0aa78ca](0aa78ca)) ### Performance Improvements * **decorators:** backfill L1 on sync L2 hits; size stats by envelope length (LAB-348) ([#294](#294)) ([c019b26](c019b26)) ### Code Refactoring * **logging:** remove dead compat surface and Redis branding from StructuredLogger (LAB-4621) ([#316](#316)) ([98d616e](98d616e)) * **logging:** remove dead PII-masking knobs (LAB-3797) ([#300](#300)) ([705640b](705640b)) * **logging:** rename UltraOptimizedStructuredLogger to StructuredLogger, OptimizedPoolMonitor to PoolMonitor (LAB-4617) ([#314](#314)) ([2f7c979](2f7c979)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: cachekit-release-bot[bot] <247960786+cachekit-release-bot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Summary
Renames two hype-named classes to plain descriptive names and removes an alias. Pure rename, no behaviour change.
cachekit.logging.UltraOptimizedStructuredLoggercachekit.logging.StructuredLoggercachekit.logging.StructuredRedisLogger(alias)cachekit.monitoring.pool_monitor.OptimizedPoolMonitorcachekit.monitoring.pool_monitor.PoolMonitorDocstrings and comments in the touched modules drop the "Ultra" / "Optimized" adjectives; measurable figures (
<5% overhead,~50ns,10-50μs) stay.SECURITY.mdnames the renamed redaction sink.Why
This re-applies a naming cleanup decided on 2025-11-28 (decision record
549bb682c3b3fd3fd2dbb4aa6b5af2ab196a45ca9d139d367295e74704a91403) that never reached the tree the public repo was cut from. The old class name resurfaced in the 0.19.0 release notes, which is what prompted this.No deprecation alias is provided, consistent with the original decision and with the previous 0.x removals of importable names. None of the three names is in the package
__all__;get_structured_logger()is unchanged and remains the supported entry point.Ticket: LAB-4617
Verification
uv run ruff check src/ tests/anduv run ruff format --check src/ tests/pass.uv run pytest tests/unit/ tests/critical/ -m "not slow"plus doctests for the touched modules: 2609 passed, 13 skipped.grep -rnE "UltraOptimized|StructuredRedisLogger|OptimizedPoolMonitor" src/ tests/ docs/ README.md SECURITY.mdreturns nothing.grep -rni ultra src/returns nothing.BREAKING CHANGE:
cachekit.logging.UltraOptimizedStructuredLoggeris nowStructuredLogger; thecachekit.logging.StructuredRedisLoggeralias is removed;cachekit.monitoring.pool_monitor.OptimizedPoolMonitoris nowPoolMonitor. No deprecation aliases are provided.get_structured_logger()is unchanged and remains the supported entry point.Summary by CodeRabbit