Skip to content

Allow Collecting Currently Running Workflows#34

Merged
kalverra merged 2 commits intomainfrom
docs
Mar 12, 2026
Merged

Allow Collecting Currently Running Workflows#34
kalverra merged 2 commits intomainfrom
docs

Conversation

@kalverra
Copy link
Owner

No longer error when finding a currently running workflow. Instead, display a warning. Also show it as running in observation data.

Also improve some docs.

@codecov
Copy link

codecov bot commented Mar 12, 2026

Codecov Report

❌ Patch coverage is 17.79141% with 134 lines in your changes missing coverage. Please review.
✅ Project coverage is 32.26%. Comparing base (4fcc159) to head (513eff1).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
observe/workflow_run.go 0.00% 30 Missing ⚠️
observe/job_runs.go 0.00% 25 Missing ⚠️
gather/commit.go 0.00% 20 Missing ⚠️
observe/commit.go 0.00% 20 Missing ⚠️
report/github.go 0.00% 19 Missing ⚠️
gather/workflow_run.go 74.35% 7 Missing and 3 partials ⚠️
observe/timeline.go 0.00% 7 Missing ⚠️
report/report.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #34      +/-   ##
==========================================
- Coverage   32.58%   32.26%   -0.32%     
==========================================
  Files          29       29              
  Lines        2833     2907      +74     
==========================================
+ Hits          923      938      +15     
- Misses       1802     1862      +60     
+ Partials      108      107       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Risk Rating: MEDIUM. Expands core “gather/observe” behavior to support in-progress workflow runs and adds new UI rendering paths.

Changes:

  • Allow gathering workflow runs that are not yet completed (skip billing/monitoring and avoid local caching).
  • Surface in_progress / queued states in observation data and timelines (including a runtime table + queued list in the UI).
  • Improve CLI/README/agent documentation examples and descriptions.

Reviewed changes

Copilot reviewed 16 out of 18 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
gather/workflow_run.go Allows in-progress runs; conditionally skips billing/monitoring/caching.
gather/commit.go Includes non-completed check runs when deriving workflow run IDs and conclusions.
observe/workflow_run.go Uses status as a fallback state when conclusion is empty.
observe/job_runs.go Uses status as a fallback state; renders queued/in-progress steps.
observe/commit.go Renders queued/in-progress workflow runs in timelines.
observe/timeline.go Adds QueuedItems and duration-sorted view helper.
observe/templates/timeline.html Adds “Runtimes” table and “Queued” section to timeline UI.
observe/templates/styles.css Styles for the new runtime table/badges.
observe/templates/observation.html Adds Mermaid theme colors for active tasks.
report/report.go Falls back to monitor-derived job name when missing from GHA env.
report/github.go Adds pagination and stricter “job not found” handling for job-step lookup.
cmd/gather.go Expands help text/examples; notes in-progress workflow support.
cmd/observe.go Expands help text.
cmd/monitor.go Expands help text/examples.
README.md Updates screenshot reference and adds install/usage examples.
AGENTS.md Formatting tweaks and adds pre-commit note.
Comments suppressed due to low confidence (1)

gather/commit.go:333

  • Now that non-completed/queued workflow runs can be included, workflowRun.GetRunStartedAt() may be zero (e.g., queued runs). The current update logic can set commitData.StartActionsTime to the zero time, which can break downstream duration calculations and timelines. Consider skipping the StartActionsTime update when GetRunStartedAt().IsZero() (and similarly guard other time aggregations if needed).
				commitData.Conclusion = establishPRChecksConclusion(commitData.Conclusion, conclusion)
				commitData.Cost += workflowRun.GetCost()
				if workflowRun.GetRunStartedAt().Before(commitData.StartActionsTime) ||
					commitData.StartActionsTime.IsZero() {
					commitData.StartActionsTime = workflowRun.GetRunStartedAt().Time

@kalverra kalverra merged commit 2b53c9b into main Mar 12, 2026
4 of 6 checks passed
@kalverra kalverra deleted the docs branch March 12, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants