You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally drafted as PR #58 (closed). The PR was based on v0.7.1 and conflicts heavily with the current synthesizer architecture (ReadGraphEngine/WorkerGraphEngine split, model_id_override, normalize_ai_links, resolve_sessions/graph_id). Closing and re-opening as a narrower, additive change against current main.
Problem
When the synthesizer or super-synthesizer agent ends without producing text, the workflow currently stores a placeholder string ("Synthesis completed but no document was produced.") as the node's definition. That masks failure — users see a junk document instead of a clear "this failed, retry it" affordance.
Proposed behaviour
Backend — worker-synthesis
On empty agent output, do NOT set a definition. Instead store:
On success: clear synthesis_error, persist synthesis_input.
Super-synthesizer: stamp parent_supersynthesis_id onto each sub-synthesis so sub regeneration can cascade a recombine.
New workflows
regenerate_synthesis_wf(node_id) — re-runs the synthesizer agent on a failed synthesis node in-place (preserves node ID). If it has a parent super-synthesis, dispatches recombine_supersynthesis_wf on completion.
recombine_supersynthesis_wf(node_id) — re-runs only the combine step on an existing super-synthesis using its current sub-synthesis documents.
Register both in worker-all.
API — services/api
Add status: \"completed\" | \"error\" + error_message: str | null to SynthesisDocumentResponse and SynthesisListItem.
POST /api/v1/syntheses/{id}/regenerate — validates node is in error state, dispatches the right regeneration workflow via dispatch_with_graph.
Show red "Failed" badge on failed syntheses in the investigate list.
In the synthesis document view, replace the body with an error banner + "Regenerate" button when status === \"error\".
regenerateSynthesis(id) helper in lib/api.ts (uses graphRequest).
Optional: poll for regeneration progress.
Scope notes
Keep it additive. No rewrite of the existing synthesizer/super_synthesizer bodies beyond swapping the placeholder-text branch for the error-state storage.
The PR feat(worker-synthesis): store synthesis errors and add regeneration #58 draft (branch feat/synthesis-error-state-regenerate, commit 98d7a3e) has working reference code — but its _helpers.py was designed around the old GraphEngine. Port the error-state pieces onto the current ReadGraphEngine + WorkerGraphEngine pattern.
Context
Originally drafted as PR #58 (closed). The PR was based on v0.7.1 and conflicts heavily with the current synthesizer architecture (ReadGraphEngine/WorkerGraphEngine split, model_id_override, normalize_ai_links, resolve_sessions/graph_id). Closing and re-opening as a narrower, additive change against current main.
Problem
When the synthesizer or super-synthesizer agent ends without producing text, the workflow currently stores a placeholder string (
"Synthesis completed but no document was produced.") as the node's definition. That masks failure — users see a junk document instead of a clear "this failed, retry it" affordance.Proposed behaviour
Backend — worker-synthesis
metadata_.synthesis_error = {message, timestamp}metadata_.synthesis_input = <original SynthesizerInput dump>(for regeneration)synthesis_error, persistsynthesis_input.parent_supersynthesis_idonto each sub-synthesis so sub regeneration can cascade a recombine.New workflows
regenerate_synthesis_wf(node_id)— re-runs the synthesizer agent on a failed synthesis node in-place (preserves node ID). If it has a parent super-synthesis, dispatchesrecombine_supersynthesis_wfon completion.recombine_supersynthesis_wf(node_id)— re-runs only the combine step on an existing super-synthesis using its current sub-synthesis documents.Register both in
worker-all.API — services/api
status: \"completed\" | \"error\"+error_message: str | nulltoSynthesisDocumentResponseandSynthesisListItem.POST /api/v1/syntheses/{id}/regenerate— validates node is in error state, dispatches the right regeneration workflow viadispatch_with_graph.Hatchet I/O models — libs/kt-hatchet
RegenerateSynthesisInput(GraphAwareMixin) { node_id: str }RecombineSuperSynthesisInput(GraphAwareMixin) { node_id: str }Frontend
status === \"error\".regenerateSynthesis(id)helper inlib/api.ts(usesgraphRequest).Scope notes
feat/synthesis-error-state-regenerate, commit 98d7a3e) has working reference code — but its_helpers.pywas designed around the oldGraphEngine. Port the error-state pieces onto the currentReadGraphEngine+WorkerGraphEnginepattern.Links
feat/synthesis-error-state-regenerate