[v0.3.0] cache — add zstd codec layer to the retrieved-docs cache#60
Conversation
|
Warning Review limit reached
More reviews will be available in 38 minutes and 23 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Heimdall verification for PR #60 at Scope/territory checked:
Commands run locally from a fresh clone checked out to the PR head: Implementation checks:
GitHub checks observed green: CI matrix, Security Audit dependency audit, CodeQL, and CodeRabbit status context. CodeRabbit triage: no substantive review findings were posted. The only CodeRabbit PR comment is a rate-limit/usage notice saying review could not start. Under Risk not covered by tests: no production dictionary is provided for Label action: replacing |
Closes #46
Acceptance criteria
python -c 'from mcp_server_python_docs.cache.codec import list_supported; print(list_supported())'prints exactly['none', 'zstd', 'zstd-dict-v1']— verified withuv run python -c "from mcp_server_python_docs.cache.codec import list_supported; print(list_supported())".uv run pytest tests/cache/test_codec.py -qpasses with at least 4 new tests — 5 codec tests pass, coveringnone,zstd,zstd-dict-v1with an explicit test dictionary, and prior-versionnonedecode.retrieved_docs_cachegainscompression TEXT NOT NULL DEFAULT 'none'with checkedALTER TABLEmigration — covered bytest_legacy_uncompressed_cache_row_migrates_and_reads.uv run pytest tests/test_persistent_docs_cache.py -qstill passes, with a new restart/default-codec test — 11 passed.zstd) and reads dispatch from storedcompression— covered by persistent-cache tests and stdio cache smoke.Validation gate output
CodeRabbit review
Why this approach
The issue prescribed a versioned app-level cache codec and transparent old-row reads. This PR keeps the existing
result_jsoncolumn as the payload column, stores encoded bytes there for new rows, adds thecompressiondiscriminator, and migrates old tables by addingcompression DEFAULT 'none'.Why this triggered supervisor review
None.