Skip to content

test(interop): pin read_every_path paths and scope bare-envelope README claim (LAB-8602) - #159

Merged
27Bslash6 merged 1 commit into
mainfrom
chore/LAB-8602-python-frame-followups
Oct 9, 2026
Merged

27Bslash6 merged 1 commit into
mainfrom
chore/LAB-8602-python-frame-followups

Conversation

@27Bslash6

Copy link
Copy Markdown
Contributor

Follow-ups to #158. Tests and README only: no library change.

  • README, interop section. The bare-envelope sentences ("fails only when its shape does not fit the requested type", "does read one") now say they hold for a client without encryption, and that an encrypting client fails at decrypt whatever the type.
  • CK-frame sweep. every_ck_frame_in_the_file_is_refused_on_every_path now assert_eq!s the path names read_every_path returns against the five expected ones (serializer::deserialize, interop::deserialize, CacheKit::get, CacheKit::interop_get, CacheKit::interop_get_swr). Before, dropping a push from read_every_path would shrink the sweep silently; checked by removing the CacheKit::get push locally, which makes the sweep fail.
  • Test docs. The EnvelopedValue comment cites default_saas_write_msgpack_bytestorage_bin's payload (the bytes the bare-envelope vector carries). The module doc mentions the positional-match assertion the bare-envelope test already makes. The read_every_path doc says "every read path of a client without encryption" and "this SDK writes".
  • plain_reads_reject_a_plaintext_entry also checks that interop_get_swr returns Encryption on a plaintext entry.

cargo fmt --check, cargo clippy --all-targets -D warnings and cargo test -p cachekit-rs pass locally.

Closes LAB-8602

…ME claim

The CK-frame sweep now asserts the exact path names read_every_path
returns, so dropping a read path fails the sweep instead of silently
shrinking it. The README's bare-envelope sentences now say they hold for
a client without encryption; an encrypting client fails at decrypt.
Test doc comments now describe what the tests do, and
plain_reads_reject_a_plaintext_entry also covers interop_get_swr.
@kodus-27b

kodus-27b Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Code Review Completed! 🔥

The code review was successfully completed based on your current configurations.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the `@kody start-review` command at the root of your PR.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Providing Context (Files & MCPs)

Add these hints in your PR description (or a comment) to unlock deeper checks:

  • Ticket / Acceptance Criteria: `Refs: ABC-123` (Linear/Jira/Asana/ClickUp/Trello) or a direct ticket link.
  • Bugfix Validation: a Sentry/Datadog/Bugsnag event link (or paste the stack trace/error message).
  • Endpoint Risk: mention the route (e.g., `POST /api/payments`) or controller/action name.
  • Attach a repo file as context: use an explicit marker like `@file:docs/guide.mdx#L10-L50` (replace with your real path).
  • API Contract Docs: include `@file:openapi.yaml` or `@file:swagger.json` when changing routes/schemas.
  • Definition of Done / Standards: include `@file:DOD.md` or `@file:CONTRIBUTING.md` if your repo has them.
  • Design System Source of Truth: include `@file:ui/index.ts` (replace with your DS entrypoint path).
  • Feature Flags: include the flag key/name and `@file:flags.ts` / `@file:config.json` (and optionally the PostHog flag name).
  • Edge/CDN Rules: link the Cloudflare rule/zone or describe the intended redirect/header behavior.
  • Attach an MCP tool output: use `@mcp<provider|tool>` (replace with an installed MCP provider + tool, e.g., `@mcp<sentry|events.search>`).
Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ✅

Access your configuration settings here.

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: cachekit-io/cachekit-rs/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 5a37e746-bcba-47ef-9597-dea4060447c5
📥 Commits

Reviewing files that changed from the base of the PR and between b5fb2a6 and eae0040.

📒 Files selected for processing (4)
  • README.md
  • crates/cachekit/tests/common/mod.rs
  • crates/cachekit/tests/encryption_tests.rs
  • crates/cachekit/tests/python_frame_tests.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


Summary by CodeRabbit

  • Bug Fixes
    • Encrypted clients now consistently reject plaintext entries during decryption, including when using stale-while-revalidate reads.
  • Documentation
    • Clarified how unencrypted clients read backend entries and how bare envelopes are decoded.
  • Tests
    • Expanded coverage of encrypted-client plaintext rejection and confirmed that the CK-frame test exercises all five read paths.

Walkthrough

Documentation now describes bare ByteStorage envelope decoding for encrypted and unencrypted clients. Tests add an interop_get_swr encryption-error assertion and check that the CK-frame test covers five read paths.

Changes

Bare envelope read paths

Layer / File(s) Summary
Document and check bare-envelope read paths
README.md, crates/cachekit/tests/common/mod.rs, crates/cachekit/tests/encryption_tests.rs, crates/cachekit/tests/python_frame_tests.rs
The documentation clarifies encrypted-client rejection and unencrypted-client decoding. Tests check the interop_get_swr encryption error and confirm that the CK-frame test covers five read paths.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to eae00

The PR clarifies documented read behavior and strengthens coverage of the affected paths; no material user-facing or operational risk is apparent.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check Passed The title clearly identifies the interop test changes and the README scope. It is concise and related to the main changes.
Description check Passed The description accurately covers the test updates, README clarification, documentation changes, and validation results.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 3 files. (1 skipped: 1 …
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.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

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

@27Bslash6
27Bslash6 merged commit fa3b88f into main Oct 9, 2026
11 checks passed
@27Bslash6
27Bslash6 deleted the chore/LAB-8602-python-frame-followups branch October 9, 2026 02:52
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