Skip to content

docs(spec): mark the TypeScript default tenant conformant from @cachekit-io/cachekit 0.2.1 (LAB-11371) - #215

Merged
27Bslash6 merged 1 commit into
mainfrom
agent/miss-huang/lab-11371-ts-default-tenant
Oct 27, 2026
Merged

27Bslash6 merged 1 commit into
mainfrom
agent/miss-huang/lab-11371-ts-default-tenant

Conversation

@27Bslash6

Copy link
Copy Markdown
Contributor

Flips the TypeScript cell of the spec/intent-presets.md § SDK Conformance row "Default tenant_id is "default", identical for HKDF and AAD" from ❌ to ✅, with the floor @cachekit-io/cachekit 0.2.1+. Adds the TypeScript 0.2.1 floor sentence to the section preface and a changelog.d/ fragment. conformance/coverage.md is regenerated; only its line numbers moved. Docs only.

The old cell said key derivation used 'default' while the AAD used ''. That was true at the pinned cachekit-ts@379847c and is still true of npm 0.1.5. In 0.2.1 one effectiveTenantId = tenantId ?? 'default' feeds both, and an empty tenantId is rejected at construction.

Evidence

Executed 2026-10-27 against the published npm artifacts, not main. @cachekit-io/cachekit@0.2.1 installed from npm, integrity sha512-YEYpID8q…E2mTg== (matches npm view dist.integrity), Node 26.

  1. A custom backend holds only test-vectors/encryption.json (1.5.0) default_tenant.vectors[0] (default_tenant_interop) ciphertext at its cache_key, which equals interop-mode.json single_int.expected_key. set throws.
  2. createCache.secure({ masterKey: <master_key_hex>, backend, metrics: false }), no tenantId.
  3. cache.wrap(fn, { namespace: 'users', ttl: 60, interop: 'get_user', interopArity: 1 }), where fn throws, called with 42.
Package tenantId Result
0.2.1 none one backend read of the vector key; returns {age: 30, name: "alice"}; fn not called
0.2.1 "other" (control) decrypt misses; fn called and throws
0.1.5 none decrypt misses; fn called and throws

The two controls show the read fails when the tenant is wrong, so the 0.2.1 pass is not vacuous. The floor is 0.2.1, not 0.2.0: npm 0.2.0 is deprecated (it pins an unpublished core package), as the feature matrix's footnote 17 already notes.

sdk-feature-matrix.md has no default-tenant HKDF/AAD row; its "Tenancy on the encrypted preset" row already gives 0.2.1 for TypeScript, so it is unchanged.

Checks

  • python3 tools/test_conformance.py: 284 cases pass.
  • python3 tools/conformance.py check --base origin/main: OK, conformance/coverage.md is current.
  • check-spec-duplication.py, check-version-floors.py and test_changelog_collect.py pass.
  • CHANGELOG.md is untouched.

Closes LAB-11371

…kit-io/cachekit 0.2.1

Published 0.2.1 derives the key and builds the AAD under one 'default'
tenant; createCache.secure() with no tenantId decrypts default_tenant_interop
through an interop-mode wrap read. npm 0.1.5 still mismatches.
@kodus-27b

kodus-27b Bot commented Oct 27, 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 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 7740fb2 and 2f3d52d.

Files selected for processing: 3
  • changelog.d/20261027_lab-11371.md
  • conformance/coverage.md
  • spec/intent-presets.md

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

  • Documentation
    • Updated the SDK conformance records to show TypeScript SDK 0.2.1 and later correctly handle the default tenant for key derivation and authenticated data, and reject an empty tenant ID.
    • Recorded a successful interoperation-mode read of the default-tenant test vector without specifying a tenant ID.
    • Added the TypeScript minimum-version note and updated references in the generated coverage report.

Walkthrough

The SDK conformance notes now record TypeScript 0.2.1+ default-tenant behaviour. The changelog records the verification result, and the coverage report updates its specification line references.

Changes

TypeScript default-tenant conformance

Layer / File(s) Summary
Record TypeScript conformance evidence
spec/intent-presets.md, changelog.d/20261027_lab-11371.md, conformance/coverage.md
The specification and changelog record TypeScript 0.2.1+ conformance, including default tenant values for key derivation and AAD, rejection of an empty tenant ID, and a successful interop read. The coverage report updates its specification line references.

Priority: Low

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

Change: Other

Possibly related PRs

Suggested reviewers: kodus-27b

Merge Risk: Minimal · up to 2f3d5

The conformance documentation and coverage references are ready to merge.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title names the change: the TypeScript default tenant is marked conformant from @cachekit-io/cachekit 0.2.1, with the ticket reference LAB-11371. The raw summary and objectives confirm that the sp…
Description check Passed The description matches the changeset. It explains the flipped cell in spec/intent-presets.md, the 0.2.1 floor added to the section preface, the changelog.d fragment, and the regenerated conformance/c…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within survi…
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.
Full details: Title check

Explanation

The title names the change: the TypeScript default tenant is marked conformant from @cachekit-io/cachekit 0.2.1, with the ticket reference LAB-11371. The raw summary and objectives confirm that the spec table cell changes from failing to passing, a version floor is added, and a changelog fragment is included. The title is specific and matches the main change.

Full details: Description check

Explanation

The description matches the changeset. It explains the flipped cell in spec/intent-presets.md, the 0.2.1 floor added to the section preface, the changelog.d fragment, and the regenerated conformance/coverage.md. It also gives the evidence and checks that support the change.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (3 skipped: 3 unsupported.)

Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · 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 11d8a9f into main Oct 27, 2026
5 checks passed
@27Bslash6
27Bslash6 deleted the agent/miss-huang/lab-11371-ts-default-tenant branch October 27, 2026 07: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