Repository navigation
Open
Description
Problem
A finished scheduled fire carries no end time, so nothing can say how long it ran. Studio's run history therefore cannot show or sort by duration, which #1852's acceptance criteria listed. #2194 merged without a Duration column for this reason.
Evidence
makeFireFuncininternal/app/scheduler_fire.gobuilds the terminalport.ScheduleFirewithFiredAt,StartedAt,Deadline,StopandErr, but notProgressAt. Review of feat(studio): complete schedule management workspace #2194 reports thatRecordFirein all three stores replaces the in-flight record with this terminal one, so any progress instant is dropped.- Confirmed on a real local
mecated(JSONL store, mock provider): a one-shot that fired and finished withstop: "end_turn"came back fromGET /v1/schedules/<name>/fireswithstartedAtset andprogressAt: null. ScheduleFire.progress_atis documented as "the last observed progress instant" (contracts/proto/mecatl/v1/schedule.proto), not an end time.
Options
- Reuse
progress_at. Set it to the finish time when the terminal fire is recorded. Small change, no wire change, and the Studio duration code works as written. It stretches the field's documented meaning. - Add an explicit end time (for example
ended_at) to the fire. This is the unambiguous contract. It touchesengine/port/schedule.go, the memory, jsonl and redis stores, the sharedscheduleconformancesuite,scheduler_fire.go,grpc_schedule.go, the proto and its generated code, then the SDK and the Studio BFF contract.
The proto change in option 2 is additive, but it needs the wire API compatibility assessment before implementation.
Acceptance
- A terminal fire reports an end time through the gRPC and REST fire APIs, for success, failure, cancel and timeout.
- The conformance suite covers it for every store.
- Studio can restore the Duration column and its sort (removed in feat(studio): complete schedule management workspace #2194) from that field.
Context
Fully or partially written by an AI agent.
Metadata
Metadata
Assignees
Labels
No labels
Activity
kantord commentedon Oct 15, 2026
Evidence from triaging #1852's leftovers, so the fix is not designed around the prototype's formula.
The prototype has a Duration column, so Studio wants it back. Its formula cannot be copied:
fireDurationMscomputesprogressAt || deadline || startedAt. On a real localmecatedthe terminal fire hasprogressAt: nulland adeadlinethat isstartedAtplus the 30-minute fire timeout, so the prototype's fallback reads about 30 minutes for a run that took seconds.So Duration needs a real end time from the backend; the client should not infer one. The terminal record is built at
scheduler_fire.go#L264-L273without one.Acceptance addition: once the backend reports an end time, restore the Duration column and its sort in the run history (Studio removed it in #2194), using that field. Tracked on the Studio side by #2299.
Fully or partially written by an AI agent.