feat(temporal): run the trajectory workflow, so a turn's record closes #1057
No reviewers
Labels
No labels
move-to-repo
coilyco-bridge-deploy
move-to-repo
coilyco-flight-deck-agent-compose
move-to-repo
coilyco-gaming-eco-app
move-to-repo
coilysiren-inbox
move-to-repo
unknown
🔒⚠️📦⚠️🔒 SANDBOXED 🔒⚠️📦⚠️🔒
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
c#
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-gaming/sirens-echo!1057
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/trajectory-completes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #1041. The workflow was already written. Nothing ran it.
What I got wrong on #1041, corrected
I filed that issue saying there was no worker, then commented that adding one would reverse #887's "mirroring, not orchestration" decision, and withdrew the suggestion. That was wrong, and I only found out by reading the file rather than the issue.
ToolTrajectoryWorkflowhas been sitting ininternal/community/temporalmirror.gosince the mirror shipped:It accumulates signals and returns on an idle timer. It runs no activity, the turn never waits on it, and no retry policy touches a tool call - which are precisely #887's two named hazards, so registering it reinstates nothing that decision rejected. The author clearly intended a worker and it was never wired up.
The measurements
Signalled onto a queue nothing polls, open until
trajectoryLifetime, retiredTimedOut. Zero completions ever.The change
Two things.
Register the workflow.
startTrajectoryWorkerbuilds a worker on the client the mirror already holds, registersToolTrajectoryWorkflowunder theToolTrajectoryname the mirror starts by string, and stops it before the client closes. A failed start is logged and the mirror keeps recording: a record that does not close is worth more than no record.trajectoryIdle10 minutes to 2. This is the reason a completed turn would still linger. It bounds the gap between one turn's calls, not the turn, so it only needs to clear the slowest model round - and the median turn is 32.9s per #932. Two minutes has room and stays overridable bySIRENS_ECHO_TRAJECTORY_IDLE.I did not go lower. If it drops under a model round, a late tool call lands after the workflow closed and
SignalWithStartopens a second run under the same id, splitting one turn across two trajectories. That is worse for reading than a two-minute tail.Tests
Two, through Temporal's own
testsuiteso the workflow really executes:TestToolTrajectoryCompletesOnceTheCallsStop- two signals arrive, the workflow completes, and both records come back in order.TestToolTrajectoryClosesWithoutASecondCall- a turn with one call still closes rather than sitting open.Nothing asserted completion before, which is how a workflow with no runner shipped unnoticed.
What this does not do
The 60 existing
TimedOutexecutions stay as they are. This changes what new turns do.CI
go test ./...is clean apart fromTestRenderedPromptsStayInsideTheirBudget, which main is currently red on and which #1055 fixes. This branch touches no policy root and neither failing profile.