mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-25 14:43:05 +09:00
#3467 made loadPendingTrajectory() always do two DB reads (completed + pending) before returning, even when the trajectory is already tracked cleanly in-process — turning every trajectory-step/post-task call into a synchronous round-trip instead of a Map lookup. CI's graph-trajectory-hooks-smoke (ADR-130 P3, <200ms budget) failed once on a loaded runner at 1171ms; local runs stayed at 20-46ms, so this was likely a transient load spike, but the always-hit-disk path was real overhead regardless. Skip both reads when the id is already a clean (non-dirty) in-memory hit — the case #3467 didn't change (same-process, not-yet-restarted). The disk-recovery path #3467 added still runs exactly when it's needed: on a cache miss (e.g. after an MCP restart).