feat: add shadow LangGraph orchestrator runtime
This commit is contained in:
@@ -97,3 +97,34 @@ test('orchestrator emergency kill switch always forces native selection', async
|
||||
assert.equal(selected.engine, 'native');
|
||||
assert.equal(selected.reason, 'kill_switch');
|
||||
});
|
||||
|
||||
test('orchestrator runtime probe reports sanitized service health', async () => {
|
||||
let requestedUrl = null;
|
||||
const service = createOrchestratorAdminConfigService(createPool(), {
|
||||
env: {},
|
||||
fetchImpl: async (url) => {
|
||||
requestedUrl = url;
|
||||
return new Response(JSON.stringify({
|
||||
status: 'ok',
|
||||
service: 'memind-langgraph-orchestrator',
|
||||
checkpoint: { kind: 'postgres', durable: true, password: 'must-not-pass-through' },
|
||||
execution: 'observe-only',
|
||||
ignoredSecret: 'must-not-pass-through',
|
||||
}), {
|
||||
status: 200,
|
||||
headers: { 'content-type': 'application/json' },
|
||||
});
|
||||
},
|
||||
});
|
||||
await service.updateAdminConfig({
|
||||
mode: 'shadow',
|
||||
serviceUrl: 'http://127.0.0.1:8093',
|
||||
});
|
||||
|
||||
const runtime = await service.getRuntimeState({ probe: true });
|
||||
assert.equal(requestedUrl, 'http://127.0.0.1:8093/ready');
|
||||
assert.equal(runtime.serviceHealth.ok, true);
|
||||
assert.equal(runtime.serviceHealth.details.checkpoint.durable, true);
|
||||
assert.equal('password' in runtime.serviceHealth.details.checkpoint, false);
|
||||
assert.equal('ignoredSecret' in runtime.serviceHealth.details, false);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user