row 206 (#1704): thread-shares trail test threads the reply into A's default session, not the thread id (first-run red, mos-1272)
This commit is contained in:
1 parent
1a228f395f
commit
9538e0fc86
1 file changed
+3
-1
@@ -291,7 +291,9 @@ test('the owner\'s trail and replies show a user\'s message only while that user
|
||||
'INSERT INTO messages(id,at,business,from_role,from_run,to_role,class,in_reply_to,decision,corrects,body) VALUES(?,?,?,?,?,?,?,?,?,?,?)',
|
||||
reply, new Date().toISOString(), 'demo', 'assistant', 'assistant-run', 'user', 'INFO', sent, null, null, 'hello alice',
|
||||
);
|
||||
store.run('INSERT INTO message_threads(message,thread,session) VALUES(?,?,?)', reply, A, A);
|
||||
// A new thread's default session has its own id (only a migrated thread's reuses the thread's).
|
||||
const { session } = store.get('SELECT session FROM session_defaults WHERE thread=? ORDER BY seq DESC LIMIT 1', A);
|
||||
store.run('INSERT INTO message_threads(message,thread,session) VALUES(?,?,?)', reply, A, session);
|
||||
for (const who of ['human', 'reader']) {
|
||||
assert.deepEqual(call(who, 'trail', { subject: sent }), [], who);
|
||||
assert.equal(code(who, 'replies', { id: sent }), 'message-not-found', who);
|
||||
|
||||
Reference in new issue
Block a user