@@ -3,6 +3,7 @@
|
3 | 3 | // Executed directly via Node.js + tsx in the release workflow. |
4 | 4 | |
5 | 5 | import { spawn } from "node:child_process"; |
| 6 | +import { randomUUID } from "node:crypto"; |
6 | 7 | import { |
7 | 8 | appendFileSync, |
8 | 9 | chmodSync, |
@@ -2354,7 +2355,7 @@ async function runInstalledModelsSet(params) {
|
2354 | 2355 | async function runInstalledAgentTurn(params) { |
2355 | 2356 | let lastError; |
2356 | 2357 | for (let attempt = 1; attempt <= 2; attempt += 1) { |
2357 | | -const sessionId = `cross-os-release-check-${params.label}-${Date.now()}-${attempt}`; |
| 2358 | +const sessionId = buildCrossOsReleaseAgentSessionId(params.label, attempt); |
2358 | 2359 | try { |
2359 | 2360 | const logOffset = readLogFileSize(params.logPath); |
2360 | 2361 | const result = await runInstalledCli({ |
@@ -2756,8 +2757,7 @@ async function maybeRunDiscordRoundtrip(params) {
|
2756 | 2757 | return "skipped-missing-config"; |
2757 | 2758 | } |
2758 | 2759 | |
2759 | | -const outboundNonce = `native-cross-os-outbound-${Date.now()}-${Math.random().toString(16).slice(2, 8)}`; |
2760 | | -const inboundNonce = `native-cross-os-inbound-${Date.now()}-${Math.random().toString(16).slice(2, 8)}`; |
| 2760 | +const { outboundNonce, inboundNonce } = buildCrossOsDiscordRoundtripNonces(); |
2761 | 2761 | let sentMessageId = null; |
2762 | 2762 | let hostMessageId = null; |
2763 | 2763 | try { |
@@ -3282,7 +3282,7 @@ async function runModelsSet(params) {
|
3282 | 3282 | async function runAgentTurn(params) { |
3283 | 3283 | let lastError; |
3284 | 3284 | for (let attempt = 1; attempt <= 2; attempt += 1) { |
3285 | | -const sessionId = `cross-os-release-check-${params.label}-${Date.now()}-${attempt}`; |
| 3285 | +const sessionId = buildCrossOsReleaseAgentSessionId(params.label, attempt); |
3286 | 3286 | try { |
3287 | 3287 | const logOffset = readLogFileSize(params.logPath); |
3288 | 3288 | const result = await runOpenClaw({ |
@@ -3365,6 +3365,17 @@ export function shouldSkipOptionalCrossOsAgentTurnError(error, logPath) {
|
3365 | 3365 | return /"status"\s*:\s*"timeout"|Request timed out before a response was generated/u.test(log); |
3366 | 3366 | } |
3367 | 3367 | |
| 3368 | +export function buildCrossOsReleaseAgentSessionId(label, attempt) { |
| 3369 | +return `cross-os-release-check-${label}-${randomUUID()}-${attempt}`; |
| 3370 | +} |
| 3371 | + |
| 3372 | +export function buildCrossOsDiscordRoundtripNonces() { |
| 3373 | +return { |
| 3374 | +outboundNonce: `native-cross-os-outbound-${randomUUID()}`, |
| 3375 | +inboundNonce: `native-cross-os-inbound-${randomUUID()}`, |
| 3376 | +}; |
| 3377 | +} |
| 3378 | + |
3368 | 3379 | function buildReleaseAgentTurnArgs(sessionId) { |
3369 | 3380 | return [ |
3370 | 3381 | "agent", |
|