@@ -64,6 +64,7 @@ describe("resolveDirectiveStatusModelRef", () => {
6464 const parentSessionKey = "agent:main:telegram:group:parent" ;
6565 const sessionKey = "agent:main:telegram:group:child" ;
6666 const sessionEntry = {
67+ sessionId : "child-parent-pinned" ,
6768 updatedAt : Date . now ( ) ,
6869 parentSessionKey,
6970 } ;
@@ -75,6 +76,7 @@ describe("resolveDirectiveStatusModelRef", () => {
7576 sessionStore : {
7677 [ sessionKey ] : sessionEntry ,
7778 [ parentSessionKey ] : {
79+ sessionId : "parent-pinned" ,
7880 updatedAt : Date . now ( ) ,
7981 providerOverride : "anthropic" ,
8082 modelOverride : "claude-opus-4-6" ,
@@ -102,6 +104,7 @@ describe("resolveDirectiveStatusModelRef", () => {
102104 const parentSessionKey = "agent:main:telegram:group:model-parent" ;
103105 const sessionKey = "agent:main:telegram:group:child" ;
104106 const sessionEntry = {
107+ sessionId : "child-model-parent" ,
105108 updatedAt : Date . now ( ) ,
106109 } ;
107110
@@ -116,6 +119,7 @@ describe("resolveDirectiveStatusModelRef", () => {
116119 sessionStore : {
117120 [ sessionKey ] : sessionEntry ,
118121 [ parentSessionKey ] : {
122+ sessionId : "model-parent-pinned" ,
119123 updatedAt : Date . now ( ) ,
120124 providerOverride : "anthropic" ,
121125 modelOverride : "claude-opus-4-6" ,
@@ -142,10 +146,11 @@ describe("resolveDirectiveStatusModelRef", () => {
142146 it ( "resolves channel-scoped unpinned selection after /model default" , ( ) => {
143147 const sessionKey = "agent:main:telegram:group:room-1" ;
144148 const sessionEntry = {
149+ sessionId : "channel-scoped-selection" ,
145150 updatedAt : Date . now ( ) ,
146151 channel : "telegram" ,
147152 groupId : "room-1" ,
148- chatType : "group" ,
153+ chatType : "group" as const ,
149154 } ;
150155
151156 const resolved = resolveDirectiveStatusModelRef ( {
@@ -181,6 +186,7 @@ describe("resolveDirectiveStatusModelRef", () => {
181186 it ( "falls back to the configured default after /model default when no inherited override applies" , ( ) => {
182187 const sessionKey = "agent:main:telegram:direct:user-1" ;
183188 const sessionEntry = {
189+ sessionId : "default-fallback" ,
184190 updatedAt : Date . now ( ) ,
185191 } ;
186192
@@ -210,6 +216,7 @@ describe("resolveDirectiveStatusModelRef", () => {
210216 const parentSessionKey = "agent:main:telegram:group:model-parent" ;
211217 const sessionKey = "agent:main:telegram:group:child" ;
212218 const sessionEntry = {
219+ sessionId : "child-allowlist-blocked" ,
213220 updatedAt : Date . now ( ) ,
214221 } ;
215222
@@ -223,6 +230,7 @@ describe("resolveDirectiveStatusModelRef", () => {
223230 sessionStore : {
224231 [ sessionKey ] : sessionEntry ,
225232 [ parentSessionKey ] : {
233+ sessionId : "parent-allowlist-blocked" ,
226234 updatedAt : Date . now ( ) ,
227235 providerOverride : "anthropic" ,
228236 modelOverride : "claude-opus-4-6" ,
@@ -250,6 +258,7 @@ describe("resolveDirectiveStatusModelRef", () => {
250258 const parentSessionKey = "agent:main:telegram:group:model-parent" ;
251259 const sessionKey = "agent:main:telegram:group:child" ;
252260 const sessionEntry = {
261+ sessionId : "child-provider-wildcard" ,
253262 updatedAt : Date . now ( ) ,
254263 } ;
255264
@@ -263,6 +272,7 @@ describe("resolveDirectiveStatusModelRef", () => {
263272 sessionStore : {
264273 [ sessionKey ] : sessionEntry ,
265274 [ parentSessionKey ] : {
275+ sessionId : "parent-provider-wildcard" ,
266276 updatedAt : Date . now ( ) ,
267277 providerOverride : "openai" ,
268278 modelOverride : "gpt-added-after-startup" ,
0 commit comments