Repository navigation
Studio: save Full access granted to a chat with that chat - #17801
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…of forks [skip ci]
…rant revoked elsewhere [skip ci]
…ved flag [skip ci]
…and mark only changed chats [skip ci]
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cb68662080
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!explicit && savedChatFullAccess.get(threadId) === on) return; | ||
| chatFullAccessDecidedSinceOpen.add(threadId); |
There was a problem hiding this comment.
Record fresh grants even when the cached flag is already true
If this tab previously read fullAccess: true, another tab revoked it, and a fresh “Allow for this chat” grant arrives while the chat's settings are loading, this early return skips both recording the new decision and saving it. The incoming fullAccess: false then passes restoreSavedChatFullAccess's decision guard and removes the freshly granted access. This is reproducible by opening a saved-full-access chat, switching away, changing its stored flag to false, and granting access during its next settings read. Distinguish a fresh user grant from the scan of existing grants so the fresh choice is recorded and persisted even when the cached value matches.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not changing this one: it needs another tab's revocation and a fresh grant to race the same chat's settings read, and the outcome fails safe (the chat ends without Full access and the user can grant it again). It never leaves the sandbox off against a choice, which is the case the previous fixes cover.
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
… stock baseline (#17808) ## Summary `tests/test_fp8_ragged_block_dequant.py::test_ragged_rows_match_block_reference[glm5_3]` and `[ling3]` fail in `Repo tests (CPU, rest)` on every PR whose CI installs unsloth-zoo at or after `898a6b0d` (unslothai/unsloth-zoo#2515). Seen on #17725 and #17801: ``` tests/test_fp8_ragged_block_dequant.py:74: in test_ragged_rows_match_block_reference with pytest.raises(ValueError): E Failed: DID NOT RAISE ValueError ``` unsloth-zoo#2515 now patches `Fp8Dequantize._dequantize_one` on import to dequantize partial edge blocks correctly. Its wrapper is marked `_unsloth_partial_block_patched` and keeps the stock function in `_unsloth_original`. This test's "unpatched" baseline only unwrapped unsloth's own ragged-block wrapper (`_unsloth_ragged_blocks` / `__wrapped__`). So the baseline was actually the zoo-fixed op, and the expected stock `ValueError` never came. The zoo patch is correct; the test's notion of "unpatched" was too narrow. ## Changes (test only) - `_op_cls(patched=False)` unwraps both markers, so the baseline is transformers' own op again. - `test_unpatched_op_carries_no_unsloth_wrapper` pins that the baseline has no unsloth or unsloth-zoo wrapper left. The `ValueError` assertion only means something against the stock op. - `test_ragged_padding_composes_over_the_zoo_partial_block_patch` covers the real-world case, where both patches are live in one process. It stacks unsloth's ragged padding on top of the zoo partial-block patch and checks the block reference for 576x384, 576x2560 and stacked 2x256x200 experts. It skips when the zoo module is absent. ## Verification | unsloth-zoo | before | after | |---|---|---| | `0c225609` (before #2515) | 6 passed | 7 passed, 1 skipped (no zoo patch module) | | `c8655b99` (main) | 2 failed, 4 passed | 8 passed | | `c8655b99`, zoo patch applied explicitly first | 2 failed, 4 passed | 8 passed | | main, with the new unwrap branch removed | | 3 failed (the two reference cases and the new baseline guard) |
Summary
A chat given Full access through "Allow for this chat" lost it on logout and on restart, so reopening that chat dropped back to its saved level and needed the warning again (#17297). Ask, Approve for me and Run automatically were already saved with each chat; Full access was the only level that was not.
This saves Full access with the chat it was granted to:
fullAccess: trueto that chat's stored settings, next to its permission level.fullAccess: false.Unchanged:
Changes
ChatThreadSettingsaccepts an optionalfullAccessboolean, andfork_chat_threaddrops it from the copied settings.sanitizeThreadScopedSettingskeeps a booleanfullAccess, so the chat open path hands it to the store.Testing
tests/chat-full-access-saved.test.ts(11 tests) opens chats the way the app does (stored row through the sanitizer): logout and login, reopening, switching chats, a restart, leaving Full access, other-accounts installs, leaving Full access while a chat loads, revocations from another tab, and settings edits queued around a grant. Each case was checked to fail before its fix.npm run typecheckis clean.test_chat_thread_settings.py,test_chat_history_storage.py,test_chat_settings_payload.pyandtest_chat_history_routes.pypass (296). The round trip and fork tests fail on main.Fixes #17297
Screenshot
A chat stored with permission level Approve for me plus
fullAccess: true(what Studio writes when Full access is granted to the chat), then opened in a new login. BEFORE is main at 0945ac0, where the server rejects the flag; AFTER is this PR.