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

dcdpr / jp / 27723188554
67%

Build:
DEFAULT BRANCH: main
Ran 17 Jun 2026 10:17PM UTC
Jobs 1
Files 418
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

17 Jun 2026 10:14PM UTC coverage: 66.601% (-0.04%) from 66.637%
27723188554

push

github

web-flow
perf(storage, workspace): Batch-load conversation metadata (#760)

`load_conversation_metadata` rescanned the conversations directory for
every id, making the full index load quadratic in the number of
conversations. This commit introduces a batch variant that enumerates
each storage root once and resolves all requested ids in a single pass.

`load_conversation_metadata_batch` is added to the `LoadBackend` trait
with a serial default so existing backends stay correct without changes.
`FsStorageBackend` overrides it to delegate to the underlying `Storage`,
which builds a `HashMap<ConversationId, (path, is_user)>` in one
directory scan and then fans out via `par_iter`.

Ids that are not found in the scan (e.g. in-flight persists that renamed
the directory after the scan) fall back to the single-id loader,
preserving the archive retry and the in-flight-persist retry logic.

`load_conversation_metadata_at` is extracted as a shared helper used by
both the batch and the existing single-id paths, removing the duplicate
path-resolution logic.

`load_count_and_timestamp_events` is also reworked: instead of
deserializing the full event array into a `Vec`, it now drives a
streaming `EventSummary` visitor that pulls one element at a time and
discards all but the last timestamp, keeping peak memory flat regardless
of how many events a conversation has.

`Workspace::initialize_conversations` is simplified accordingly; the
manual `par_iter` + `filter_map` + secondary loop is replaced with a
single `for` loop over the batch results.

---------

Signed-off-by: Jean Mertz <git@jeanmertz.com>

45 of 102 new or added lines in 4 files covered. (44.12%)

35658 of 53540 relevant lines covered (66.6%)

407.4 hits per line

Uncovered Changes

Lines Coverage ∆ File
36
64.49
-8.72% crates/jp_storage/src/load.rs
8
27.27
-72.73% crates/jp_storage/src/backend/load.rs
7
93.18
1.51% crates/jp_workspace/src/lib.rs
6
83.96
-2.78% crates/jp_storage/src/backend/fs.rs
Jobs
ID Job ID Ran Files Coverage
1 27723188554.1 17 Jun 2026 10:17PM UTC 418
66.6
GitHub Action Run
Source Files on build 27723188554
  • Tree
  • List 418
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27723188554
  • 4dba130d on github
  • Prev Build on main (#27722771184)
  • Next Build on main (#27739337175)
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