fix(web-probe): validate stdio session lineage
This commit is contained in:
@@ -69,3 +69,17 @@ test("realtime fanout retries a YAML-bounded transient health navigation", async
|
||||
assert.equal(calls, 2);
|
||||
assert.equal((result.attempts as unknown[]).length, 2);
|
||||
});
|
||||
|
||||
test("realtime fanout validates stdio against the scoped AgentRun session lineage", () => {
|
||||
const source = nodeWebObserveRunnerRealtimeSource();
|
||||
const build = new Function(`${source}\nreturn realtimeExpectedStreamSessionId;`) as () => (
|
||||
stream: string,
|
||||
hwlabSessionId: string,
|
||||
) => string;
|
||||
const expectedStreamSessionId = build();
|
||||
const hwlabSessionId = "ses_5ec4e141-6abc-466d-9afe-049f7c0ac105";
|
||||
|
||||
assert.equal(expectedStreamSessionId("stdio", hwlabSessionId), "ses_agentrun_5ec4e141_6abc_466d_9afe_049f7c0ac105");
|
||||
assert.equal(expectedStreamSessionId("agentrun", hwlabSessionId), hwlabSessionId);
|
||||
assert.equal(expectedStreamSessionId("hwlab", hwlabSessionId), hwlabSessionId);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user