Repository navigation
feat: context binding, contextFallback, stats().unboundReads (0.6.0) - #11
Merged
Merged
Conversation
…0.6.0) Optional context bound into the GCM AAD (version || 0x00 || context), so a token moved to another column or row fails authentication. No wire-format change. Row-helper context function, SQLAlchemy column context, shared vectors. 73/73 TS, 82/82 Python. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements
docs/design/context-binding.mdand releases with the already-mergedplaintext: "reject"mode as 0.6.0.Summary
seal/unsealtake an optionalcontext(string or parts like["users", "email"]), bound into the GCM AAD asversion || 0x00 || context. Parts are NUL-joined; empty or NUL-containing parts are rejected;""and[]mean no context. No token-format change.seal/unseal/maybeSeal/maybeUnsealis a namespace string (unchanged) or{ namespace, context }. Python adds acontext=keyword.context(field, row).contextFallback/context_fallback: on an auth failure under a context, retry without it, warn once per namespace, count instats().unboundReads(Pythonstats()["unbound_reads"]). A bound token still can't move: fallback only drops the context.unboundReads == 0meaning every read was bound.SealedText/SealedString/SealedJSONtake a column-levelcontext, included in the cache key.package.json,package-lock.json,python/pyproject.toml.Verification
test/context.test.ts), 82/82 Python (including SQLAlchemy). Coverage: TS 96.4% lines / 94.1% branches, Python 94%.🤖 Generated with Claude Code