supplier+deploy/mainnet: log job_failed reasons; bump openai timeout 180s→300s; chatmock reasoning_effort=low

- jobRunner.ts: console.warn at each jobs.fail site (chat + tts paths, 6 sites). Three mainnet GPT-supplier 502s on 2026-05-19 left no trace beyond Traefik — adding a one-line log restores grep-ability.
- docker-compose.supplier-gpt.yml: OPENAI_TIMEOUT_MS 180000→300000. The 3 observed 502s were all exactly 90 polls × 2s, i.e. the supplier's openai_timeout firing.
- docker-compose.chatmock.yml: serve --reasoning-effort low --reasoning-summary none. Default 'medium'/'auto' pushed GPT-5.4 think-time over the prior 180s budget.

Note: on-chain advert ADVERT_MAX_PROCESSING_MS still pins 180000 until a re-advert tx is posted — buyers compare against the on-chain value, not the runtime env.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
david
2026-05-20 10:42:13 +02:00
parent f39865ae13
commit 87e126b22c
3 changed files with 25 additions and 2 deletions

View File

@@ -112,6 +112,9 @@ export async function runChatJob(params: RunChatJobParams): Promise<void> {
rawReason === "ollama_timeout" ? "ollama_failure"
: rawReason === "openai_timeout" ? "openai_failure"
: rawReason;
console.warn(
`[job_failed] jobId=${jobId} reason=${rawReason} httpStatus=502 msg=${message}`,
);
deps.jobs.fail(jobId, {
httpStatus: 502,
reason: collapsedReason,
@@ -148,6 +151,9 @@ export async function runChatJob(params: RunChatJobParams): Promise<void> {
});
} catch (err) {
const message = err instanceof Error ? err.message : String(err);
console.warn(
`[job_failed] jobId=${jobId} reason=submit_failed httpStatus=502 msg=${message}`,
);
deps.jobs.fail(jobId, {
httpStatus: 502,
reason: "submit_failed",
@@ -161,6 +167,9 @@ export async function runChatJob(params: RunChatJobParams): Promise<void> {
await deps.chain.awaitTx(buildResult.expectedTxHash, 60_000);
} catch (err) {
const msg = err instanceof Error ? err.message : String(err);
console.warn(
`[job_failed] jobId=${jobId} reason=submit_timeout httpStatus=502 msg=${msg}`,
);
deps.jobs.fail(jobId, {
httpStatus: 502,
reason: "submit_timeout",
@@ -250,6 +259,9 @@ export async function runTtsJob(params: RunTtsJobParams): Promise<void> {
} catch (err) {
const reason = (err as piper.PiperError)?.reason ?? "piper_failure";
const message = err instanceof Error ? err.message : String(err);
console.warn(
`[job_failed] jobId=${jobId} reason=${reason} httpStatus=502 msg=${message}`,
);
deps.jobs.fail(jobId, {
httpStatus: 502,
reason: reason === "piper_timeout" ? "piper_failure" : reason,
@@ -288,6 +300,9 @@ export async function runTtsJob(params: RunTtsJobParams): Promise<void> {
});
} catch (err) {
const message = err instanceof Error ? err.message : String(err);
console.warn(
`[job_failed] jobId=${jobId} reason=submit_failed httpStatus=502 msg=${message}`,
);
deps.jobs.fail(jobId, {
httpStatus: 502,
reason: "submit_failed",
@@ -301,6 +316,9 @@ export async function runTtsJob(params: RunTtsJobParams): Promise<void> {
await deps.chain.awaitTx(buildResult.expectedTxHash, 60_000);
} catch (err) {
const msg = err instanceof Error ? err.message : String(err);
console.warn(
`[job_failed] jobId=${jobId} reason=submit_timeout httpStatus=502 msg=${msg}`,
);
deps.jobs.fail(jobId, {
httpStatus: 502,
reason: "submit_timeout",