Skip to content

LAB-272: correct SDK feature matrix to code-verified protocol-adherence reality - #24

Merged
27Bslash6 merged 8 commits into
mainfrom
lab-272-protocol-adherence-audit
Jul 25, 2026
Merged

LAB-272: correct SDK feature matrix to code-verified protocol-adherence reality#24
27Bslash6 merged 8 commits into
mainfrom
lab-272-protocol-adherence-audit

Conversation

@27Bslash6

@27Bslash6 27Bslash6 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

LAB-272 — read-only cross-SDK protocol-adherence audit. This PR is the matrix correction; findings that need code changes are filed as LAB-423 / LAB-424 / LAB-425 (plus the already-tracked rs interop PR cachekit-rs#33).

What was verified (against main of each repo, 2026-07-21)

Key generation — py ✅ key_generator.py:114-140 (Blake2b-256 over msgpack.packb([normalized_args, sorted_kwargs]), 7-segment key). ts ✅ key-generator.ts:34-45 (@noble/hashes blake2b dkLen=32; language-specific {namespace}:{hash} prefix, per spec). rs: auto-mode keys are caller-supplied (N/A) — but the crate publicly exports an unused key::generate_cache_key that matches no protocol format → LAB-424.

Wire format — py ✅ ByteStorage via cachekit-core FFI inside its CK v3 frame (standard_serializer.py:28; python-frame.json generated from the real wheel, CI-verified here). rs ✅ plain rmp_serde::to_vec_named, no envelope (serializer/mod.rs:7) — exactly the ratified protocol#11 container. ts ✅ bare ByteStorage envelope via NAPI (round-trip tested in wire-format.protocol.test.ts).

Encryption / AAD v0x03 — byte-identical layout across py (encryption_wrapper.py:403-417), rs (encryption.rs:115-149), ts (encryption/manager.ts): [0x03][4B BE len][tenant][len][cache_key][len][format][len][compressed], frozen True/False tokens (protocol#12). py auto serializers append the optional original_type fifth component (spec'd); rs/ts/interop always emit exactly four. py's fail-closed plaintext-claim read path is on main (cachekit-py#215).

SaaS API — all three hit /v1/cache/{key} (+ /lock, /ttl, /health) and carry the lock capability token in X-CacheKit-Lock-Id (py cachekitio/backend.py:35, rs cachekitio_lock.rs:14, ts cachekitio-lockable.ts:12).

Test vectors in CI — py: full interop/v1 set (33 key / 4 value / 9 error / 1 AAD via the real _create_aad / 1 encryption through the production stack) in tests/unit/protocol/. ts: full interop/v1 set + inline Python-generated key/AAD vectors, all in default pnpm test. rs: none on main — the first-ever Rust execution of the interop vectors lives in cachekit-rs#33 (all pass, CI green on the PR). Org-wide gaps: wire-format.json is verified by no CI anywhere and cachekit-core's only compat test is #[ignore]d + stale (LAB-423); cache-keys.json was generated by cachekit-py v0.5.0 and has no consumer (LAB-425).

Rust trailing-bytes hazard (protocol#11) — rs main has no cross-SDK read path, so the lenient rmp_serde::from_slice in serializer/mod.rs:12 only ever reads its own writes (spec-acceptable). The spec-mandated strict end-of-input check + 0x43 0x4B CK-frame diagnostic exist in cachekit-rs#33's interop::deserialize with dedicated tests — verified in the PR diff; lands on merge.

Matrix changes

  • Interop-mode row: py/ts ✅ merged (unreleased), rs 🚧 LAB-427: flip ts Redis TTL/locking matrix cells to implemented #33 — was "❌ Not implemented" across the board.
  • "Test vectors" row renamed "Test vectors in CI" and now states observed reality per SDK; new footnote ³ records what protocol-repo CI covers and names the two unverified vector files.
  • Rust keygen cell + footnote ² warn off the orphaned non-conformant generate_cache_key.
  • AAD cells record component arity; the Encryption callout replaces the 2026-04-06 stamp with the code-verified 2026-07-21 result.
  • cachekit-py fleet version 0.11.1 → 0.12.0.

No spec files touched; docs-only.


Fold-in (LAB-445): presentation-clarity fixes from the expert-panel review — Python AAD cell reframed around the 5-component norm, footnote markers renumbered to reading order, TS test-vectors cell disambiguated to the vector sets CI actually runs, and the AAD byte-layout detail deduped into spec/encryption.md. No factual claims changed.

Summary by CodeRabbit

  • Documentation
    • Updated the SDK feature matrix with the latest protocol compliance and interoperability status.
    • Clarified encryption AAD v0x03 compliance, failure-closed behaviour, and cross-language serialization differences.
    • Refreshed CI test-vector coverage details and added context for the Cloudflare Workers WebAssembly entry point.

…reality (LAB-272)

Audit of py/rs/ts main branches against the four protocol requirements:

- Interop mode: merged in cachekit-py (#220) and cachekit-ts (#71), in
  review for cachekit-rs (#33) — the '❌ Not implemented' row was stale.
- Test vectors row now states what each SDK's CI actually executes;
  wire-format.json and cache-keys.json are verified by no CI anywhere
  (LAB-423, LAB-425).
- Rust keygen cell: caller-supplied keys remain N/A, but the crate
  exports an unused legacy generate_cache_key matching no protocol
  format (LAB-424); conformant keygen arrives with cachekit-rs#33.
- AAD v0x03 cells record component arity per SDK (py auto serializers
  emit the optional fifth original_type component; rs/ts/interop are
  four-component) — byte-identity code-verified per protocol#12.
- cachekit-py fleet version 0.11.1 -> 0.12.0.

Co-authored-by: multica-agent <github@multica.ai>
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 44 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 379a5d44-7f02-425b-b10e-ae51a3137752

📥 Commits

Reviewing files that changed from the base of the PR and between 0d49cb5 and 2b5c97c.

📒 Files selected for processing (1)
  • sdk-feature-matrix.md

Walkthrough

Updates sdk-feature-matrix.md with expanded Workers and AAD v0x03 compliance details, revised interoperability and key-generation statuses, and clarified CI test-vector verification coverage.

Changes

SDK feature matrix documentation

Layer / File(s) Summary
Feature-parity and AAD compliance narrative
sdk-feature-matrix.md
Adds Workers wasm32 and interop/v1 context, and expands AAD v0x03 construction, serializer, authentication, and failure-closed behaviour details.
Protocol status and CI evidence
sdk-feature-matrix.md
Updates key-generation and interop-mode entries to merged statuses, records TypeScript test-vector verification, and clarifies CI coverage for protocol artefacts.

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

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the documentation update to the SDK feature matrix and its focus on code-verified protocol adherence.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch lab-272-protocol-adherence-audit

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

…aram and generate_cache_key is not unused [LAB-424]

The footnote claimed cachekit-rs delegates key construction via a
'key' parameter on #[cachekit] (no such parameter exists) and called
key::generate_cache_key 'unused' (it is called at runtime by every
#[cachekit] expansion — proc-macro call sites are invisible to grep).
Rewritten to the verified posture: get/set caller-supplied; macro
derives an SDK-internal legacy RFC-shape key, made private in
cachekit-rs#35 (LAB-424); conformant keygen arrives with #33.

Co-authored-by: multica-agent <github@multica.ai>
@27Bslash6

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@27Bslash6

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.


You're currently rate limited under our Fair Usage Limits Policy. Your recent PR review activity is in the 95th percentile or higher among CodeRabbit users, so adaptive limits apply. Your next review will be available in 42 minutes.

@27Bslash6

Copy link
Copy Markdown
Contributor Author

Mandatory crypto/protocol expert panel (high stakes) is clean — no factual findings. bug-hunter + security independently cross-verified every AAD/keygen/wire claim against the actual SDK code: Python AAD = 5 components (all auto-mode serializers emit original_type), Rust/TS/interop = exactly 4; [0x03][4-byte BE len][component] layout + frozen True/False tokens byte-identical across py/rs/ts; the dangerous "5-for-interop" arity error is NOT present; Rust-keygen footnote matches PR #35; interop merge status gh-verified. The matrix is factually accurate. Only optional doc-clarity polish remains (line-136 AAD-cell phrasing, footnote ordering, a "key/AAD vectors" ambiguity) — non-blocking. CI green, CodeRabbit clean. @27Bslash6 ready for your signoff / merge. (Tracked: LAB-272.)

@27Bslash6

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@27Bslash6
27Bslash6 enabled auto-merge (squash) July 21, 2026 00:06
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

…order, TS vector wording [LAB-445]

Four clarity nits flagged by the LAB-272 expert-panel review of #24; no
factual claim changes (verdicts, marks, versions, byte constants preserved):

- Python AAD cell: 5-component is the Python norm (every auto serializer
  appends original_type); interop mode is the sole 4-component path —
  matches the line-65 callout framing instead of reading like an edge case.
- Footnotes renumbered so first appearance runs 1, 2, 3 in reading order
  (keygen note was 2 but appeared before 1); note blocks reordered to match.
- TS test-vectors cell: 'key/AAD' disambiguated to what CI actually runs —
  inline Python-generated AAD-construction + encryption (decrypt-Python-
  ciphertext) vectors. 'key' dropped: key-generation.protocol.test.ts holds
  property checks only, no Python-generated key values; key-vector coverage
  is the interop/v1 set (33 key vectors), now credited explicitly.
- AAD byte-layout detail deduped out of the matrix callout: layout, frozen
  True/False tokens, and the protocol#12 decision are already normative in
  spec/encryption.md, which stays linked — matrix keeps parity altitude.

Co-authored-by: multica-agent <github@multica.ai>
@27Bslash6

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

27Bslash6 and others added 3 commits July 22, 2026 12:28
…[LAB-424]

cachekit-rs#35 pivoted from hiding the legacy keygen to deleting it:
the macro now delegates to interop_key with required explicit
interop/namespace attributes (owner call — greenfield, no
byte-stability constraint). Interop row: rs #33 merged (unreleased),
matching py/ts. Footnote ¹ rewritten to the shipped posture and notes
the upgrade is a full cache invalidation for #[cachekit] users.

Co-authored-by: multica-agent <github@multica.ai>
…merged [LAB-424]

Co-authored-by: multica-agent <github@multica.ai>
…d line

Co-authored-by: multica-agent <github@multica.ai>
@27Bslash6

Copy link
Copy Markdown
Contributor Author

Conflict in sdk-feature-matrix.md (the "Last updated" summary line — both this branch and main wrote a different narrative summary onto the same line). Resolving requires picking whose summary wins, which drops the other's content; not a safe automatic resolution — needs a human call (same as the prior manual merge for this file).

@27Bslash6

Copy link
Copy Markdown
Contributor Author

Auto-rebase attempted: merging origin/main produced a conflict in sdk-feature-matrix.md — both branches rewrote the same "Last updated" summary line with different content (this PR's LAB-272 audit note vs. main's LAB-446/595/519 note). Not a clean union — needs a human to decide which/both belong. Left the branch untouched.

@kodus-27b

This comment has been minimized.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@sdk-feature-matrix.md`:
- Around line 198-205: Remove the unprefixed blank lines between the three >
[!NOTE] paragraphs in the documented blockquote, or prefix those blank lines
with > so all note content remains inside the callout and satisfies markdownlint
MD028.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 478f17a1-a076-4aa4-9a05-1ebacb99b341

📥 Commits

Reviewing files that changed from the base of the PR and between 6863495 and 0d49cb5.

📒 Files selected for processing (1)
  • sdk-feature-matrix.md

Comment thread sdk-feature-matrix.md Outdated
…h vector-CI footnote to post-LAB-423/425 reality

CodeRabbit r3650057657: blank lines between the three consecutive
'> [!NOTE]' blockquotes trip markdownlint MD028 and can render note
content outside the callout. Merged into a single callout with
'>'-separated paragraphs; footnote markers unchanged.

While in the block: footnote 3 still claimed wire-format.json and
cache-keys.json were verified by no CI — both stale since LAB-423
(tools/wire-format-reference.py in verify.yml) and LAB-425
(cache-keys vendored + CI-verified in cachekit-py#229, regenerated
at v0.12.0 byte-identical to the v0.5.0 originals) closed.

Co-authored-by: multica-agent <github@multica.ai>
@kodus-27b

kodus-27b Bot commented Jul 25, 2026

Copy link
Copy Markdown

Kody Review Complete

Great news! 🎉
No issues were found that match your current review configurations.

Keep up the excellent work! 🚀

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.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

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

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.

@27Bslash6
27Bslash6 merged commit f522e3c into main Jul 25, 2026
3 checks passed
@27Bslash6
27Bslash6 deleted the lab-272-protocol-adherence-audit branch July 25, 2026 11:06
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