mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-09-21 07:36:25 +00:00
🧾 feat: Persist Authoritative Subagent Control Receipts (#15168)
* feat: persist subagent control receipts * fix: require control receipt persistence * fix: preserve authoritative control history
This commit is contained in:
parent
e0d5e11cdf
commit
a997275902
13 changed files with 1608 additions and 28 deletions
|
|
@ -30,6 +30,7 @@ jest.mock('~/models', () => ({
|
|||
getConvo: jest.fn(),
|
||||
getMessages: jest.fn(),
|
||||
listActiveSubagentThreadLeases: jest.fn(),
|
||||
recordSubagentTaskControlReceipt: jest.fn(),
|
||||
releaseSubagentThreadLease: jest.fn(),
|
||||
reserveSubagentThread: jest.fn(),
|
||||
renewSubagentThreadLease: jest.fn(),
|
||||
|
|
@ -55,11 +56,19 @@ const {
|
|||
const subagentThreadTaskStore = require('./subagentThreadStore');
|
||||
const { configureSubagentTaskRouting } = subagentThreadTaskStore;
|
||||
const taskStoreOptions = createSubagentThreadTaskStore.mock.calls[0][1];
|
||||
const taskStoreMethods = createSubagentThreadTaskStore.mock.calls[0][0];
|
||||
const db = require('~/models');
|
||||
const activityPrepareRegistration = registerShutdownTask.mock.calls.find(
|
||||
([name]) => name === 'subagent activity streams prepare',
|
||||
);
|
||||
|
||||
describe('subagent thread Redis lifecycle', () => {
|
||||
it('wires durable control receipt persistence into the host store', () => {
|
||||
expect(taskStoreMethods.recordSubagentTaskControlReceipt).toBe(
|
||||
db.recordSubagentTaskControlReceipt,
|
||||
);
|
||||
});
|
||||
|
||||
it('reads completion wakeup rollout state at task preparation time', async () => {
|
||||
isEnabled.mockReturnValueOnce(false);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue