• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

run-llama / llama-agents / 27655583862
84%

Build:
DEFAULT BRANCH: main
Ran 16 Jun 2026 11:43PM UTC
Jobs 12
Files 233
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Jun 2026 11:43PM UTC coverage: 84.17% (+0.06%) from 84.108%
27655583862

push

github

web-flow
Split the control loop into runner/reduce/streams and decompose the reducer god-functions (#694)

`control_loop.py` was a single 2128-line module fusing two unrelated
concerns — the stateful async runtime and the pure reducer — with the
reducer dominated by two functions that read as walls:
`_process_step_result_tick` (~400 lines) and `_process_add_event_tick`
(~230 lines). You couldn't follow either in one pass.

This splits the module into a package along the reducer pattern's
natural seam and breaks the two god-functions into named phases. No
behavior change: the reducer is pure, so the existing transformation and
collection-stream suites pin command ordering and stream accounting.

## Package split

`control_loop.py` becomes `control_loop/`:

- `runner.py` — the async runtime: worker tasks, the scheduled-wakeup
heap, the adapter, turning reducer commands into side effects.
- `reduce.py` — the pure reducer: `_reduce_tick` and every per-tick
processor, plus retry/collect/replay helpers. `State + Tick -> (State,
Commands)`.
- `streams.py` — collection-stream accounting: fan-out stream lifecycle,
open-work-item counting, collect-batch release.

The dependency graph is a DAG: `runner -> reduce -> streams`. The one
back-edge (`streams`' release path needs `reduce`'s
`_add_or_enqueue_event`) is a single inline import at that chokepoint,
commented.

The package facade exports only the cross-package API — `control_loop`,
`rebuild_state_from_ticks`, `rebuild_state_from_ticks_stream`,
`replay_ticks_stream` — the symbols sibling packages (server, dbos,
`external_context`, `step_function`) actually import. White-box tests
import the internals they exercise straight from the owning submodule
(`.reduce` / `.runner` / `.streams`). `import time` stays in the facade
because tests patch `control_loop.time.time`, and the submodule loggers
keep the `workflows.runtime.control_loop` name so caplog filters still
match.

## Decomposing the reducer functions

Both now read... (continued)

800 of 849 new or added lines in 4 files covered. (94.23%)

3 existing lines in 1 file now uncovered.

17414 of 20689 relevant lines covered (84.17%)

1.12 hits per line

Uncovered Changes

Lines Coverage ∆ File
29
88.54
packages/llama-index-workflows/src/workflows/runtime/control_loop/runner.py
17
96.34
packages/llama-index-workflows/src/workflows/runtime/control_loop/reduce.py
3
97.64
packages/llama-index-workflows/src/workflows/runtime/control_loop/streams.py

Coverage Regressions

Lines Coverage ∆ File
3
79.82
-0.9% packages/llama-agents-server/src/llama_agents/server/_store/postgres_workflow_store.py
Jobs
ID Job ID Ran Files Coverage
1 llama-agents-control-plane - 27655583862.1 16 Jun 2026 11:44PM UTC 31
73.16
GitHub Action Run
2 llama-agents-dev - 27655583862.2 16 Jun 2026 11:43PM UTC 12
76.5
GitHub Action Run
3 llama-agents-agentcore - 27655583862.3 16 Jun 2026 11:43PM UTC 5
70.22
GitHub Action Run
4 llama-agents-client - 27655583862.4 16 Jun 2026 11:43PM UTC 4
87.99
GitHub Action Run
5 llamactl - 27655583862.5 16 Jun 2026 11:43PM UTC 48
79.79
GitHub Action Run
6 llama-agents-core - 27655583862.6 16 Jun 2026 11:43PM UTC 15
81.34
GitHub Action Run
7 llama-agents-server - 27655583862.7 16 Jun 2026 11:44PM UTC 30
84.95
GitHub Action Run
8 llama-agents-appserver - 27655583862.8 16 Jun 2026 11:43PM UTC 17
80.66
GitHub Action Run
9 llama-agents-integration-tests - 27655583862.9 16 Jun 2026 11:44PM UTC 100
66.81
GitHub Action Run
10 llama-index-utils-workflow - 27655583862.10 16 Jun 2026 11:43PM UTC 1
70.84
GitHub Action Run
11 llama-agents-dbos - 27655583862.11 16 Jun 2026 11:44PM UTC 11
72.04
GitHub Action Run
12 llama-index-workflows - 27655583862.12 16 Jun 2026 11:44PM UTC 52
94.08
GitHub Action Run
Source Files on build 27655583862
  • Tree
  • List 233
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27655583862
  • 8dc16b69 on github
  • Prev Build on main (#27652879318)
  • Next Build on main (#27721853211)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc