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

medplum / medplum / 31202261515
92%

Build:
DEFAULT BRANCH: main
Ran 07 Aug 2026 05:32PM UTC
Jobs 1
Files 865
Run time 2min
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

07 Aug 2026 05:12PM UTC coverage: 92.106% (+0.005%) from 92.101%
31202261515

push

github

web-flow
feat(agent): add "logical channels" for parallel processing within a channel (#9754)

* feat(agent): add logical channels

Partition a physical HL7 channel's durable queue into independent FIFO
sub-queues ("logical channels") so a bounded worker pool can process distinct
partitions concurrently while each partition stays strictly serial and in order.

- Schema v3: `logical_channel_key` column + `idx_inbound_vchannel_claim`.
- Partition-aware `CLAIM_NEXT`: only a partition's head is claimable, and only
  when no other row in that partition is claimed/inflight (serialization guard);
  a backing-off head blocks just its own partition. Default key `''` reduces
  exactly to the prior single-serial-worker behavior.
- Worker pool on `AgentHl7Channel` (`workers[]`/`maxWorkers`/`resizeWorkerPool`),
  sized by `maxWorkers` URL param / `channelMaxWorkers` agent setting (default 1).
- `logicalChannelKey` spec (URL param / `channelLogicalChannelKey` setting)
  computes each row's partition at intake; a spec change on reload recomputes
  only still-queued rows via `DurableQueue.recomputeLogicalChannelKeys`.
- `onServerResponse` split into `tryResolveInFlight`/`applyLateResponse` so the
  channel routes a response to the exact pool worker that owns the callback.

Rebased flat onto main (#9491 upstreamed the durable-queue/auto-retry base this
was built on); this commit is the net logical-channels overlay.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Derrick Farris <derrick@medplum.com>

* feat(agent): compute logical-channel partition key at claim time

Rework logical-channel partitioning so the partition key is derived at
CLAIM time from the channel's current spec instead of stored at intake.
This removes the recompute-on-change machinery whose stored keys went
stale across retries, requeues, restarts, and upgrade overlaps.

- CLAIM_NEXT is now partition-unaware (oldest queued, backoff-gated); a
  worker computes the claimed row's key and ... (continued)

23310 of 26428 branches covered (88.2%)

Branch coverage included in aggregate %.

365 of 387 new or added lines in 7 files covered. (94.32%)

41339 of 43762 relevant lines covered (94.46%)

12043.25 hits per line

Uncovered Changes

Lines Coverage ∆ File
11
91.06
-0.29% packages/agent/src/hl7.ts
3
94.83
packages/agent/src/queue/dispatcher.ts
3
85.22
0.17% packages/agent/src/queue/worker.ts
2
87.51
-0.13% packages/agent/src/app.ts
2
95.56
packages/agent/src/logical-channel.ts
1
88.04
1.0% packages/agent/src/queue/durable-queue.ts
Jobs
ID Job ID Ran Files Coverage
1 31202261515.1 07 Aug 2026 05:32PM UTC 865
92.11
GitHub Action Run
Source Files on build 31202261515
  • Tree
  • List 865
  • Changed 7
  • Source Changed 7
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #31202261515
  • ce28225f on github
  • Prev Build on gh-readonly-queue/main/pr-10113-42893575219541c0d7d09b3d7730f9740423e8e5 (#31201190414)
  • Next Build on main (#31202456821)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc