[PR #90] Fix elapsed time always showing "0s" in query output #111

Open
opened 2026-02-27 07:20:28 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/KeygraphHQ/shannon/pull/90
Author: @mattiasgeniar
Created: 2/8/2026
Status: 🔄 Open

Base: mainHead: fix/query-elapsed-time


📝 Commits (1)

  • 1768158 Fix elapsed time always showing 0s in workflow query output

📊 Changes

1 file changed (+5 additions, -1 deletions)

View changed files

📝 src/temporal/query.ts (+5 -1)

📄 Description

Summary

  • ./shannon query always displayed "Elapsed: 0s" regardless of how long the workflow had been running
  • Root cause: Temporal's deterministic sandbox overrides Date.now() inside workflows to return replay-safe timestamps, so elapsedMs computed workflow-side is always 0
  • Fix: compute elapsed time on the client side using Date.now() - progress.startTime for running workflows, falling back to the workflow-reported elapsedMs for completed
    ones

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/KeygraphHQ/shannon/pull/90 **Author:** [@mattiasgeniar](https://github.com/mattiasgeniar) **Created:** 2/8/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/query-elapsed-time` --- ### 📝 Commits (1) - [`1768158`](https://github.com/KeygraphHQ/shannon/commit/1768158cfb70b157878434f830444a7c36fc2eb8) Fix elapsed time always showing 0s in workflow query output ### 📊 Changes **1 file changed** (+5 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/temporal/query.ts` (+5 -1) </details> ### 📄 Description ## Summary - `./shannon query` always displayed "Elapsed: 0s" regardless of how long the workflow had been running - Root cause: Temporal's deterministic sandbox overrides `Date.now()` inside workflows to return replay-safe timestamps, so `elapsedMs` computed workflow-side is always 0 - Fix: compute elapsed time on the client side using `Date.now() - progress.startTime` for running workflows, falling back to the workflow-reported `elapsedMs` for completed ones --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shannon-KeygraphHQ#111
No description provided.