fix(tui): a skipped DAG node read from a snapshot shows a 0s duration
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python, typescript
Research direction
Start with dagNodeElapsed in ui-tui/src/lib/dagStatus.ts and foldDagSnapshot in ui-tui/src/domain/dagRun.ts; inspect how skipped-node stamps affect the displayed duration and run window. Reproduce the reported case with a snapshot where a fails and b is skipped, then run the relevant Vitest coverage. Done when skipped nodes have no duration and do not extend the run's elapsed window.
Written by the indexing model from the issue text.
Description
Summary
A skipped DAG node never ran, but once its run is read from a snapshot (dag.get), the TUI's DAG panel shows the node with a duration of 0s. Read from live frames, the same node shows no duration. The runner stamps a skipped node's start and end at the moment it skips it, and those stamps are written to the manifest; the live skipped frame carries no stamps.
Steps to reproduce
- Run a graph
a -> bin whichafails, sobis skipped. - Fold the run's snapshot into the panel state (
foldDagSnapshotinui-tui/src/domain/dagRun.ts). - Read
b's duration withdagNodeElapsed(ui-tui/src/lib/dagStatus.ts).
Expected behavior
A node that never ran shows no duration, as dagNodeElapsed's own comment says ("a made-up zero would read as a node that did nothing"), and its stamps do not count toward the run's elapsed window.
Actual behavior
dagNodeElapsed returns 0s for the snapshot-read skipped node. dagRunElapsedMs also takes the skipped node's end into the run window. That end falls shortly after the failure that caused the skip, so the window usually grows only a little; the visible part is the 0s.
Root cause
The runner records invented stamps for a skipped node (node_started_at.setdefault(nid, now) and node_ended_at[nid] = now in raven/agent/subagent/dag_runner.py, with the comment "only a skipped one needs both stamps invented"), and _finalize writes them to the manifest. dagNodeElapsed formats a duration for any node with a start time.
Evidence
On an archive of origin/main at edb00f54f, a graph a -> b with a failing writes b to the manifest as skipped started_at=1792302143570 ended_at=1792302143570. A vitest probe folding a snapshot with a failed (1000 to 4000 ms) and b skipped (stamped at 9000 ms) reads { elapsed: '0s', windowMs: 8000 }.
Notes for the fix
Give a node that never ran no duration in dagNodeElapsed, and leave such nodes out of dagRunElapsedMs. Alternatively the runner could stop writing invented stamps for skipped nodes, which changes the manifest every reader sees.
Environment
OS: Linux. Node: 22. Raven: origin/main at edb00f54f.
- Dominant language
- Python
- Stars
- 4.1k
- Forks
- 94
- Avg merge
- 15h 38m
- Merged PRs (30d)
- 400
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from EverMind-AI/Raven
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
EverMind-AI/Raven#998 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
EverMind-AI/Raven#997 ·
Maintainers usually reply within 1 day
-
fix: two error hints tell users to install raven by name, which is Sentry's client on PyPIPossibly taken @TheIrvin claimed this 16 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
EverMind-AI/Raven#845 · 2 comments ·
Maintainers usually reply within 1 day
-
security: tool output scrubbing misses raven's own oauth token filesPossibly taken @akushonkamen claimed this 8 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
EverMind-AI/Raven#842 · 2 comments ·
Maintainers usually reply within 1 day
-
WeChat send silently succeeds when iLink returns non-zero ret with errcode=0Possibly taken @akushonkamen claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
EverMind-AI/Raven#210 · 2 comments ·
Maintainers usually reply within 1 day
All issues in EverMind-AI/Raven
Similar issues
-
Edit tool converts CRLF files to LFPossibly taken @RaphaelFakhri claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
huggingface/tau#774 ·
Maintainers usually reply within 1 day
-
show ignores the row limit when a column or table name contains "limit"Possibly taken @RaphaelFakhri claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 2 days
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
eclipse-score/inc_someip_gateway#356 ·
Maintainers usually reply within 2 days