Skip to content

refactor(logging)!: rename UltraOptimizedStructuredLogger to StructuredLogger, OptimizedPoolMonitor to PoolMonitor (LAB-4617) - #314

Merged
27Bslash6 merged 1 commit into
mainfrom
agent/milchick/92754ee098e5
Sep 22, 2026
Merged

27Bslash6 merged 1 commit into
mainfrom
agent/milchick/92754ee098e5

Conversation

@27Bslash6

@27Bslash6 27Bslash6 commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Renames two hype-named classes to plain descriptive names and removes an alias. Pure rename, no behaviour change.

Before After
cachekit.logging.UltraOptimizedStructuredLogger cachekit.logging.StructuredLogger
cachekit.logging.StructuredRedisLogger (alias) removed
cachekit.monitoring.pool_monitor.OptimizedPoolMonitor cachekit.monitoring.pool_monitor.PoolMonitor

Docstrings and comments in the touched modules drop the "Ultra" / "Optimized" adjectives; measurable figures (<5% overhead, ~50ns, 10-50μs) stay. SECURITY.md names 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/ and uv 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.md returns nothing.
  • grep -rni ultra src/ returns nothing.

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.

Summary by CodeRabbit

  • Changed
    • Standardised public naming for structured logging and pool monitoring components.
    • Updated cache-operation security documentation to reflect the current logging component.
    • Refreshed documentation and terminology to use consistent, non-optimised naming.
    • Updated logging and monitoring references throughout the application and tests.

…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.
@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

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 configuration

Configuration used: Repository: cachekit-io/cachekit-py/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: a55dd584-4a72-4811-8872-12d81166075e

📥 Commits

Reviewing files that changed from the base of the PR and between d20204c and 660dd24.

📒 Files selected for processing (9)
  • SECURITY.md
  • src/cachekit/decorators/orchestrator.py
  • src/cachekit/decorators/wrapper.py
  • src/cachekit/hash_utils.py
  • src/cachekit/logging.py
  • src/cachekit/monitoring/pool_monitor.py
  • src/cachekit/object_cache.py
  • tests/unit/test_error_path_key_redaction.py
  • tests/unit/test_structured_logging.py

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.


Walkthrough

The 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.

Changes

Public naming alignment

Layer / File(s) Summary
Structured logger rename
src/cachekit/logging.py, tests/unit/test_structured_logging.py, tests/unit/test_error_path_key_redaction.py, SECURITY.md
StructuredLogger replaces the previous logger class name and StructuredRedisLogger alias. Factory annotations, logger caches, tests, and security documentation now use the new name.
Pool monitor rename and wiring
src/cachekit/monitoring/pool_monitor.py, src/cachekit/decorators/orchestrator.py
PoolMonitor replaces OptimizedPoolMonitor in the class, documentation, property type, and pool-manager initialisation.
Terminology updates
src/cachekit/decorators/wrapper.py, src/cachekit/hash_utils.py, src/cachekit/object_cache.py
Documentation and comments remove ultra qualifiers. Runtime behaviour remains unchanged.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Merge Risk: ⚪ Minimal · up to 660dd

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)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning 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: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies both class renames and marks the change as breaking. It is specific and relevant to the main changes.
Description check ✅ Passed The description provides a clear summary, motivation, affected APIs, breaking-change details, migration impact, and verification results. It does not reproduce every template checklist section, but it…
Full details: Docstring Coverage

Explanation

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.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Sep 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/cachekit/decorators/orchestrator.py 66.66% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@27Bslash6
27Bslash6 merged commit 2f7c979 into main Sep 22, 2026
37 checks passed
@27Bslash6
27Bslash6 deleted the agent/milchick/92754ee098e5 branch September 22, 2026 08:58
27Bslash6 pushed a commit that referenced this pull request Sep 22, 2026
🤖 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>
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.

1 participant