-
Notifications
You must be signed in to change notification settings - Fork 0
docs(spec): reframe 7-segment key format as SDK convention; add server-side requirements #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,8 +2,8 @@ | |
| "version": "1.0.0", | ||
| "generator": "cachekit-py v0.12.0", | ||
| "ci_verification": "Vendored (sha256-pinned) and byte-verified against CacheKeyGenerator in cachekit-py default CI: tests/unit/protocol/test_cache_key_vectors.py", | ||
| "note": "Keys include __main__ module because vectors were generated at top level. Cross-SDK implementations should substitute their own module path \u2014 only the args hash portion must match.", | ||
| "key_format": "ns:{namespace}:func:{module}.{qualname}:args:{blake2b_256_hex}:{ic_flag}{serializer_code}", | ||
| "note": "Keys include __main__ module because vectors were generated at top level. Cross-SDK implementations should substitute their own module path — only the args hash portion must match. The 7-segment shape is SDK-internal convention: the CachekitIO server accepts any key passing its security-only checks (length, charset, namespace prefix shape), including TS/Rust {ns}:{hash} and interop-mode keys.", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win Mark these vectors as Python-SDK-only. The note says that another SDK should replace 🤖 Prompt for AI Agents |
||
| "key_format": "ns:{namespace}:func:{module}.{qualname}:args:{blake2b_256_hex}:{ic_flag}{serializer_code} (Python SDK convention — server validates security-only, see spec/cache-key-format.md#server-side-requirements)", | ||
| "hash_algorithm": "blake2b-256 of msgpack([normalized_args, sorted_kwargs])", | ||
| "vectors": [ | ||
| { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift
🔎 Supported by static analysis
🏁 Script executed:
Repository: cachekit-io/protocol
Length of output: 39414
Define write authorisation for default-namespace keys.
Interop keys have no
ns:prefix and therefore usedefault, but line 101 defines write permissions only forns:andnsapi:keys. Theck_live_exemption also permits those credentials to write without SDK/direct separation. Define explicit default-namespace rules and a bounded legacy migration rule. Add request-level tests forck_sdk_,ck_api_, andck_live_.🤖 Prompt for AI Agents