debug-provider-hang.md 2.84 KB

Debug Session: provider-hang [OPEN]

Symptom

  • pnpm ai:execute can finish ai-direct-messages and ai-direct-preview-project
  • Execution then appears to hang before a new provider-response, validation, or execute-result artifact is produced
  • A direct ai-direct-validate-output run also appears to stall after initial startup logs

Scope

  • Repo: d:/work/venus
  • Target flow: scripts/ai-direct-execute.mjs and scripts/ai-direct-validate-output.mjs
  • Preview project: apps/web/ai-previews/allocationmanagement-qwen-autofix

Hypotheses

  1. Provider request is not returning and Node fetch timeout is not aborting as expected.
  2. A child command spawned by ai-direct-validate-output blocks under the sandboxed shell.
  3. The request payload size causes the provider to respond extremely slowly, making the flow look hung.
  4. The command completes but artifact writes are delayed or blocked by filesystem/sandbox behavior.

Evidence Log

  • execute instrumentation logged run:before-provider and callOpenAiCompatible:start, but never logged provider response received or after-provider.
  • Logged provider request size is 219495 bytes.
  • A tiny direct request to the same DashScope endpoint and model returned successfully within the test command timeout.
  • During the hung run, no new provider-response, validation, or execute-result artifacts were written.
  • After compacting the prompt, request size dropped to 54767 bytes and then to 30278 bytes.
  • With requestBytes = 30278, instrumentation captured provider response received with 200 OK.
  • The end-to-end flow progressed through apply and validate, then hit a real type-check failure in generated VTable column typing and entered auto-repair.
  • Over-compressing the prompt removed too much VUI signature detail, so a slim component-signature section was added back into the prompt snapshot.

Hypothesis Status

ID Hypothesis Status Evidence
A Provider request is not returning and fetch timeout is not aborting as expected Confirmed (request stalls before response) Debug log contains request-start events but no response event
B A child command spawned by ai-direct-validate-output blocks under the sandboxed shell Rejected for this hang execute never reaches apply/validate stage in the captured run
C Request payload size causes provider to respond extremely slowly Confirmed Large request is ~219 KB; tiny request to same endpoint/model succeeds quickly
D Command completes but artifact writes are delayed or blocked by filesystem/sandbox behavior Rejected No after-provider log and no downstream artifact updates

Next Step

  • Keep the reduced prompt payload, retain the slim VUI component signatures, and rerun the repair loop to verify the VTable.columns typing issue can now auto-converge.