fix(runtime): accept integer ai_access (Turso) in AI-seat synthesis#2336
Merged
Conversation
sys_user.ai_access reads back as integer 1 on Turso/libSQL (sqlite booleans), but the seat synthesis checked `=== true` (boolean) — so `1 !== true` and a SEATED user got no `ai_seat` -> /ai/agents=[] under enforce. The memory driver returns a JS boolean, which masked it in local testing. Caught on a real Turso-backed staging env (the env creator was seated yet denied). Accept `true | 1 | '1'` in both synthesis points: resolveExecutionContext (the gate) and plugin-hono-server data-route resolveCtx. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 2 package(s): 18 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
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.
Third issue caught by real staging:
sys_user.ai_accessreads back as integer1on Turso, but the synthesis checked=== true→1 !== true→ seated users denied. Memory driver returns boolean, masking it locally. Accepttrue | 1 | '1'in resolveExecutionContext (gate) + hono-plugin (data-route). 🤖 Generated with Claude Code