feat: add orchestrator shadow observability

This commit is contained in:
john
2026-07-24 21:44:21 +08:00
parent 24336d0178
commit 3e57f85d3a
18 changed files with 992 additions and 9 deletions
+9 -7
View File
@@ -420,13 +420,15 @@ test('code run shadow observation is fire-and-forget and records completion sepa
(event) => event.eventType === 'workflow_shadow_completed',
));
const event = pool.events.find((item) => item.eventType === 'workflow_shadow_completed');
assert.deepEqual(JSON.parse(event.dataJson), {
engine: 'langgraph',
mode: 'shadow',
configVersion: 3,
status: 'succeeded',
phase: 'completed',
});
const eventData = JSON.parse(event.dataJson);
assert.equal(eventData.engine, 'langgraph');
assert.equal(eventData.mode, 'shadow');
assert.equal(eventData.configVersion, 3);
assert.equal(eventData.status, 'succeeded');
assert.equal(eventData.phase, 'completed');
assert.equal(eventData.taskType, 'repo_refactor');
assert.equal(eventData.executorAdapter, null);
assert.equal(Number.isFinite(eventData.latencyMs), true);
});
test('shadow observer failure cannot fail a Native run and chat runs are not observed', async () => {