agentscope-ai / agentscope-ai/QwenPaw
[Feature]: Auto-Dream: single unit integration failure (LLM returned empty schema) marks the whole task as error — suggest retry + tolerance
- Lingua principale
- TypeScript
- Stelle
- 35k
- Fork
- 3.1k
- Merge medio
- 1g 13h
- PR unite (30g)
- 228
Descrizione
Description:
One of my agents hit a nightly Auto-Dream failure. The task summary said status=error, but looking at the logs, the actual outcome was mostly successful — one integration unit failed on schema validation after its file had already been written to disk.
Steps to reproduce (observed, nightly run):
Auto-Dream runs nightly, scans 2 days of daily notes, extracts 5 units.
Unit 2/5 (bucket=wiki, paths=2) — topic content is domain-specific and irrelevant here:
[WriteStep] wrote path=digest/wiki/.md bytes=2613 — file written successfully
[DreamIntegrateStep] unit 2/5 failed: ValidationError: 2 validation errors for IntegrateOutcome — action and target_path missing, input_value={} (empty dict)
Other units (3/5, 4/5, 5/5) all succeeded.
Result: integrate success=False integrated=4 failed=1 → finish success=False failed_units=1 → the whole dream task pushed to inbox as status=error, and cron logged ERROR Failed to execute dream task.
Root cause: The integrate step asks the LLM to return a structured IntegrateOutcome (action, target_path, ...) validated via Pydantic. In this run the LLM returned an empty object {} (likely output truncation or schema drift), which fails validation — even though the content itself had already been written to disk. One failed unit flips the entire nightly task to error.
Suggestions:
Retry on schema validation failure — one automatic retry with the previous LLM response as context would likely fix most transient empty/truncated outputs.
Don't fail the whole task for one unit — a unit whose file was already written could be recovered from the on-disk content (parse/regenerate the metadata), or at least be reported as partial instead of error. failed_units is already tracked; surfacing it as a warning (not error) would reduce noise.
Validate before write — ask the LLM to return the metadata first, or include a fallback that derives action/target_path from the written file when the structured response is empty.
Impact: Cosmetic-ish (files are fine, next run re-digests), but status=error on every ~1-in-N nights is misleading and hides real failures.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start by tracing Auto-Dream's DreamIntegrateStep and IntegrateOutcome validation path, then reproduce the empty-object case described in the nightly log. Done means a transient schema-validation failure is retried and a unit whose content is already on disk does not mark the whole task as error; verify partial-success reporting and add regression coverage.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- ai, backend
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100