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
Follow-up to #1505 (region step logs) — now that per-iteration / per-region body steps are recorded (engine) and surfaced (objectui#2667), a durable-history edge case remains.
The gap
AutomationEngine.compactStepsForHistory() bounds the persisted step log to the lastMAX_PERSISTED_HISTORY_STEPS entries:
This keeps steps_json cheap under retention (#2585), but with the #1505 structured-region work a single loop can now emit many steps (iterations × body-steps). For a long loop the tail-slice can drop:
the loop/parallel/try_catch container step itself (it precedes all its body steps), and
the early iterations' body steps.
Impact
listRuns / getRun serve the durable row after a process restart or ring-buffer eviction (the in-memory log has full detail; durable history is the fallback). So post-restart, the Runs surface shows only the loop's last few iterations, and — because the container step was sliced off — the objectui FlowRunsPanel (#2667) can no longer attach those body steps to their container. Its buildStepTree degrades them safely to top-level rows (visible, so nothing vanishes), but the per-iteration grouping and early-iteration detail are lost exactly for the big loops where they matter most for debugging/audit.
Possible directions (to decide)
Retain region boundaries when compacting: always keep each container step + a per-iteration summary (e.g. first/last iteration, failed iterations), downsampling the middle.
Or keep the newest N per region rather than N globally, so early iterations of a still-relevant region survive.
Follow-up to #1505 (region step logs) — now that per-iteration / per-region body steps are recorded (engine) and surfaced (objectui#2667), a durable-history edge case remains.
The gap
AutomationEngine.compactStepsForHistory()bounds the persisted step log to the lastMAX_PERSISTED_HISTORY_STEPSentries:This keeps
steps_jsoncheap under retention (#2585), but with the #1505 structured-region work a singleloopcan now emit many steps (iterations × body-steps). For a long loop the tail-slice can drop:Impact
listRuns/getRunserve the durable row after a process restart or ring-buffer eviction (the in-memory log has full detail; durable history is the fallback). So post-restart, the Runs surface shows only the loop's last few iterations, and — because the container step was sliced off — the objectuiFlowRunsPanel(#2667) can no longer attach those body steps to their container. ItsbuildStepTreedegrades them safely to top-level rows (visible, so nothing vanishes), but the per-iteration grouping and early-iteration detail are lost exactly for the big loops where they matter most for debugging/audit.Possible directions (to decide)
steps_json(Automation run observability — follow-ups (retention, discoverable Runs surface, durable run detail) #2585).buildStepTree's orphan-degradation as the safety net.Files
packages/services/service-automation/src/engine.ts—compactStepsForHistory,MAX_PERSISTED_HISTORY_STEPS,recordTerminalpersistence path.objectuiFlowRunsPanel.tsx(buildStepTree).