debug-provider-hang.md
2.84 KB
Debug Session: provider-hang [OPEN]
Symptom
-
pnpm ai:executecan finishai-direct-messagesandai-direct-preview-project - Execution then appears to hang before a new
provider-response,validation, orexecute-resultartifact is produced - A direct
ai-direct-validate-outputrun also appears to stall after initial startup logs
Scope
- Repo:
d:/work/venus - Target flow:
scripts/ai-direct-execute.mjsandscripts/ai-direct-validate-output.mjs - Preview project:
apps/web/ai-previews/allocationmanagement-qwen-autofix
Hypotheses
- Provider request is not returning and Node
fetchtimeout is not aborting as expected. - A child command spawned by
ai-direct-validate-outputblocks under the sandboxed shell. - The request payload size causes the provider to respond extremely slowly, making the flow look hung.
- The command completes but artifact writes are delayed or blocked by filesystem/sandbox behavior.
Evidence Log
-
executeinstrumentation loggedrun:before-providerandcallOpenAiCompatible:start, but never loggedprovider response receivedorafter-provider. - Logged provider request size is
219495bytes. - 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, orexecute-resultartifacts were written. - After compacting the prompt, request size dropped to
54767bytes and then to30278bytes. - With
requestBytes = 30278, instrumentation capturedprovider response receivedwith200 OK. - The end-to-end flow progressed through
applyandvalidate, then hit a realtype-checkfailure in generatedVTablecolumn typing and enteredauto-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.columnstyping issue can now auto-converge.