Skip to content

Commit 2dc84db

Browse files
authored
fix(openai-agents): correct misleading legacy-query comment in resolveQueryKey (#2109)
1 parent 69d25a3 commit 2dc84db

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

contrib/openai-agents/src/workflow/trace-interceptor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function tracingRandom(): number {
5858
// Workflow Task path, so distinct Queries collide on the spanId/PRNG seed.
5959
function resolveQueryKey(input: QueryInput): string {
6060
if (input.queryId !== 'legacy_query') return input.queryId;
61-
// Nanosecond wall-clock; Date.now() is constant within a Workflow Task, so two Queries answered in one Task would collide on the spanId.
61+
// Legacy queries arrive one at a time with a hardcoded id.
6262
return `${input.queryName}:${getActivator().getTimeOfDay()}`;
6363
}
6464

0 commit comments

Comments
 (0)