Repository navigation
[Bug] A restored session that still carries the durable "auto" preset makes permission-presets throw in its constructor, leaving auto-review pending — "2 entries did not activate" #9882
Replies: 3 comments
|
Your trace is right on all three pieces. What is worth making explicit is that this is not an ordering race a lucky boot can win — it is a deadlock with exactly one outcome, and it is provable from the declarations alone. Where the three pieces are, on
So The blast radius is the whole entry, in one direction, with no way back up. The constructor throws, so The same line has a second blast radius, which you may not have hit yet. The listener at A partial remedy already exists, with a boundary worth knowing about. We published What the fix looks like from here. The write side already tolerates a missing integration, so the read side should not be fatal about the same absence. Two shapes, either of which breaks the cycle:
Either way the invariant worth writing down is narrow: the constructor may only act on facts knowable at construction time; a fact that depends on a later-registered integration must be deferred to first use. The One more data point that would help if you can still reproduce: does the boot warning's entry count include |
|
Corroboration with a third trigger shape — and one consequence for the fix proposals. The same throw is reachable at runtime, not only from a boot that restores a session carrying One very ordinary source of such a reconstruction is a third-party plugin applying a runtime config overlay to the official executor row: Observed on DSH 0.2.0-rc.2 / Windows with one session pinned to For the fix: your defer option covers this shape too — provided the deferred set is resolved when One extra hardening worth considering while you are in there: auto-review's |
|
EN summary: Same bug on my machine (0.2.1-rc.2, Windows). Session logs say it's worse than While patching it I found one throw site that I don't think has been mentioned here yet: if the I put the byte-level patch I run on my machine here: https://github.com/potato1314520666/sessionprojections-patch (covers both sites, with backup Big thanks to @tianguoyan, @argszero and @little3tar — the map in this thread was right, I 中文: 我这台 0.2.1-rc.2/Windows 也中了同一个 bug。翻了全部会话日志之后发现问题比"切模型卡死"更宽: 打补丁的过程中发现一个本帖还没提到的炸点:如果全局自动审查是开着的, 我自己机器上跑的字节级补丁放在这:**https://github.com/potato1314520666/sessionprojections-patch**。两处抛点都盖住了,带备份和回滚,装完重启生效。 各方案的分工大概是:
互相不冲突。局限也写在我仓库 README 里了:版本钉死 rc.2、auto 会话遇重建会被降级、 感谢 @tianguoyan 的启动形态定理、@argszero 的死锁确认、@little3tar 的重建形态分析, |
Uh oh!
There was an error while loading. Please reload this page.
Environment
desktop)@deepseek-ai/dsh-permission-presets0.2.0-rc.2@deepseek-ai/dsh-experimental-auto-review0.2.0-rc.2win-x64/nightlystill reports 0.2.0-rc.2 (releaseDate 2026-09-29), so there is no newer build to retest on.Summary
If any session that is already loaded when the permission service is constructed still has the durable preset identity
auto(i.e./permission autowas used in it at some earlier point),PermissionPresetServicethrows from its own constructor. Thepermissionentry therefore never activates, andauto-review— which needs thepermissionPresetsservice — stays pending forever.Observed boot warning (desktop):
Root cause
Three pieces that cannot be ordered to satisfy each other:
packages/interaction/permission-presets/src/index.ts—pinInitialPermission()treats a persistedautoidentity as fatal when the integration is not registered yet:packages/experimental/auto-review/src/index.tscan only register that integration after the service exists (static injectincludespermissionPresets, and it callspermissionPresets.registerAuto(...)).So at construction time
autoAdmitis alwaysundefined. Any boot whose restored session carriesautofails deterministically, and once the entry fails there is no later point at which the integration could arrive. The failure is not recoverable inside that instance either: becausepermissionPresetsnever mounted,/permissionis unavailable, so the user cannot switch that session back from inside the app.Steps to reproduce
/permission auto— this appends a durablepermission/preset { preset: "auto" }.autoback todanger-full-access, which masks the bug — see the related discussion below. A session that is not loaded at exit keepsauto.)autois unusable in that instance and/permissionis dead.Evidence from one machine (desktop profile, DSH 0.2.0-rc.2)
Session A's log (
session.v4.jsonl, timestamps UTC):permission/preset {"preset":"auto"}(from/permission auto)sandbox/mode {"mode":"danger-full-access"}session/end-seed— this session was the one restored by the failing bootpermission/preset {"preset":"danger-full-access"}(written by the disposal migration of a later clean exit, nocommand/runevent)The identity survived ~23 h across several app starts, because the disposal migration only rewrites sessions that happen to be loaded at that moment. A later boot that restored a session whose identity was
workspace-writewas clean, and/permission auto//permission workspace-write//permission autoworked normally in it — which confirms the trigger is the restored session's stored identity, not the profile configuration.Identity audit (folded from
permission/presetevents in every session log on that machine, 69 sessions):auto= 29,workspace-write= 16,danger-full-access= 9, none = 15. All 29autosessions are latent triggers for this bug.Impact
Suggested fix
Make the restore lazy instead of fatal. Options, in my order of preference:
autoidentity in place and letregisterAuto()run the restore/admission check for exactly those sessions once the integration arrives (it already has to passautoAdmit()before publication, so the check is not lost — it is only deferred).Related
autoidentity and poisons the next boot that restores it. Fixing 【BUG】开启Auto Review之后重启deepseek harness客户端,权限会自动变为完全访问,且无任何提示。 #8578 without deferring the restore will still leave this failure./permissionswitch failures. Related symptom family (preset records that do not match reality), but a different defect.Workaround (no code change)
Before quitting the app, switch the session you are leaving active back to a core preset (
/permission workspace-writeor/permission danger-full-access).autocan still be used temporarily; just don't leave a session on it.All reactions