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

dcdpr / jp / 24500490563
67%

Build:
DEFAULT BRANCH: main
Ran 16 Apr 2026 08:40AM UTC
Jobs 1
Files 284
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 Apr 2026 08:35AM UTC coverage: 64.149% (+0.3%) from 63.811%
24500490563

push

github

web-flow
refactor(storage, workspace, cli): Implement layered storage backend (#543)

Replace `Workspace`'s `Option<Storage>` with four non-optional trait
objects — `PersistBackend`, `LoadBackend`, `LockBackend`, and
`SessionBackend` — eliminating pervasive `Option` branching throughout
the workspace layer.

The root problem was that at least 15 methods on `Workspace` branched on
`self.storage.as_ref()`, yielding three different failure modes for the
same underlying condition: some silently no-oped, others returned
errors, and others returned `None`. A `disable_persistence` boolean
added a third dimension of optionality, and `ConversationMut` carried an
`Option<writer>` that callers could not inspect.

The new `jp_storage::backend` module introduces:

- `FsStorageBackend` — wraps `Storage`, implements all four traits, and
retains filesystem-specific path accessors (`storage_path`,
`user_storage_path`) outside the trait surface.
- `InMemoryStorageBackend` — fully in-memory implementation for tests
and future non-filesystem environments.
- `NullPersistBackend` — silently discards all writes; used for
`--no-persist` and error-path persistence suppression.
- `NoopLockGuard` — a no-op `ConversationLockGuard` for contexts where
real locking is not needed.

`Workspace` now holds `persist`, `loader`, `locker`, and `sessions` as
always-present trait objects. `Workspace::new` initialises them with
`NullPersistBackend` + `InMemoryStorageBackend`; callers opt into
filesystem storage by calling `with_backend(fs)`. The old builder chain
`Workspace::new(root).persisted_at(&storage)?.with_local_storage()?` is
replaced by constructing `FsStorageBackend` first, then passing it in.
`disable_persistence()` retains its signature but now swaps the
`persist` field for `NullPersistBackend` instead of flipping a boolean.

`ConversationLock` and `ConversationMut` lose their internal
optionality: `writer` and `lock_guard` are always present. The `if let
Some(writer)` branches in `flush`... (continued)

470 of 631 new or added lines in 24 files covered. (74.48%)

13 existing lines in 6 files now uncovered.

22588 of 35212 relevant lines covered (64.15%)

197.49 hits per line

Uncovered Changes

Lines Coverage ∆ File
51
3.2
-0.21% crates/jp_cli/src/lib.rs
30
81.93
crates/jp_storage/src/backend/fs.rs
16
84.45
5.3% crates/jp_workspace/src/lib.rs
10
75.29
-3.19% crates/jp_workspace/src/session_mapping.rs
8
10.69
-0.17% crates/jp_cli/src/cmd.rs
7
10.08
-0.04% crates/jp_cli/src/cmd/plugin/dispatch.rs
7
68.87
13.01% crates/jp_storage/src/load.rs
6
29.08
0.04% crates/jp_cli/src/cmd/query.rs
5
3.87
-0.09% crates/jp_cli/src/cmd/conversation/edit.rs
5
58.14
0.03% crates/jp_cli/src/ctx.rs
5
96.0
crates/jp_storage/src/backend/memory.rs
3
91.74
-1.37% crates/jp_cli/src/config_pipeline.rs
3
87.5
crates/jp_storage/src/backend/null.rs
2
0.0
0.0% crates/jp_cli/src/cmd/init.rs
2
12.72
0.15% crates/jp_cli/src/cmd/plugin/registry.rs
1
21.28
-3.25% crates/jp_cli/src/cmd/config.rs

Coverage Regressions

Lines Coverage ∆ File
4
3.2
-0.21% crates/jp_cli/src/lib.rs
2
0.0
0.0% crates/jp_cli/src/cmd/init.rs
2
86.49
8.98% crates/jp_storage/src/lib.rs
2
84.45
5.3% crates/jp_workspace/src/lib.rs
2
75.29
-3.19% crates/jp_workspace/src/session_mapping.rs
1
29.08
0.04% crates/jp_cli/src/cmd/query.rs
Jobs
ID Job ID Ran Files Coverage
1 24500490563.1 16 Apr 2026 08:40AM UTC 284
64.15
GitHub Action Run
Source Files on build 24500490563
  • Tree
  • List 284
  • Changed 25
  • Source Changed 23
  • Coverage Changed 24
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24500490563
  • 3a470eb5 on github
  • Prev Build on main (#24466868242)
  • Next Build on main (#24500954909)
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