fix: refresh live chat smoke defaults
This commit is contained in:
@@ -22,8 +22,9 @@ import {
|
||||
summarizeCodeAgentPayload
|
||||
} from "./src/code-agent-response-contract.mjs";
|
||||
|
||||
const defaultLiveUrl = "http://74.48.78.17:16666/";
|
||||
const defaultLiveUrl = "http://74.48.78.17:17667/";
|
||||
const defaultLiveMessage = "请用一句话回复 HWLAB Code Agent readiness。";
|
||||
const defaultLiveTimeoutMs = 45000;
|
||||
|
||||
const args = parseArgs(process.argv.slice(2));
|
||||
|
||||
@@ -337,6 +338,7 @@ async function runLiveReadinessSmoke(args) {
|
||||
headers: {
|
||||
"x-trace-id": traceId
|
||||
},
|
||||
timeoutMs: args.timeoutMs,
|
||||
body: {
|
||||
conversationId,
|
||||
traceId,
|
||||
@@ -421,7 +423,12 @@ function summarizePayload(payload, options = {}) {
|
||||
}
|
||||
|
||||
function parseArgs(argv) {
|
||||
const parsed = { mode: "local", url: defaultLiveUrl, message: defaultLiveMessage };
|
||||
const parsed = {
|
||||
mode: "local",
|
||||
url: defaultLiveUrl,
|
||||
message: defaultLiveMessage,
|
||||
timeoutMs: defaultLiveTimeoutMs
|
||||
};
|
||||
for (let index = 0; index < argv.length; index += 1) {
|
||||
const arg = argv[index];
|
||||
if (arg === "--live") {
|
||||
@@ -434,6 +441,14 @@ function parseArgs(argv) {
|
||||
index += 1;
|
||||
if (!argv[index]) throw new Error("--message requires a value");
|
||||
parsed.message = argv[index];
|
||||
} else if (arg === "--timeout-ms") {
|
||||
index += 1;
|
||||
if (!argv[index]) throw new Error("--timeout-ms requires a value");
|
||||
const timeoutMs = Number.parseInt(argv[index], 10);
|
||||
if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) {
|
||||
throw new Error("--timeout-ms must be a positive integer");
|
||||
}
|
||||
parsed.timeoutMs = timeoutMs;
|
||||
} else if (arg === "--help") {
|
||||
return { mode: "help" };
|
||||
} else {
|
||||
@@ -446,10 +461,11 @@ function parseArgs(argv) {
|
||||
function usage() {
|
||||
return {
|
||||
status: "usage",
|
||||
command: "node scripts/code-agent-chat-smoke.mjs [--live --url http://74.48.78.17:16666/]",
|
||||
command: "node scripts/code-agent-chat-smoke.mjs [--live --url http://74.48.78.17:17667/ --timeout-ms 45000]",
|
||||
notes: [
|
||||
"Default mode is local schema/readiness contract only and cannot pass #143 DEV-LIVE.",
|
||||
"--live posts a minimal chat prompt to real DEV and passes only on completed plus non-empty assistant reply.",
|
||||
"--live posts a minimal chat prompt to the current G14 DEV public endpoint and passes only on completed plus non-empty assistant reply.",
|
||||
"Live chat first token can exceed 10s on healthy Codex stdio cold turns; default timeout is 45000ms and can be overridden with --timeout-ms.",
|
||||
"provider_unavailable with missing OPENAI_API_KEY or missing/forbidden HWLAB_CODE_AGENT_OPENAI_BASE_URL is reported as BLOCKED/provider-config."
|
||||
]
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user