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

dcdpr / jp / 20372941205
58%

Build:
DEFAULT BRANCH: main
Ran 19 Dec 2025 02:30PM UTC
Jobs 1
Files 166
Run time 62min
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

19 Dec 2025 02:26PM UTC coverage: 52.025% (+4.3%) from 47.733%
20372941205

push

github

web-flow
test(llm, conversation): Improve test determinism and infrastructure (#322)

This commit enhances test reliability and reproducibility by introducing
fixed timestamps and consistent ordering throughout the test suite.
Tests now use deterministic timestamps (`2020-01-01 00:00:00.0`) instead
of dynamic ones, ensuring snapshot tests remain stable across runs.

The `ConversationStream` now tracks its creation timestamp explicitly,
which is used consistently in serialization and test fixtures. This
change required updating the `add_config_delta()` method to accept a
`ConfigDelta` with an explicit timestamp rather than inferring it at
call time.

JSON serialization now preserves key ordering across all crates by
enabling the `preserve_order` feature on `serde_json`. This ensures
deterministic output in fixtures and snapshots, particularly important
for provider responses and configuration serialization.

Model-related types (`ModelIdConfig`, `ProviderId`, `Name`) now
implement ordering traits, enabling the openrouter provider to sort and
deduplicate model lists. This prevents duplicate entries in model
listings and provides consistent ordering for better test reliability.

Test fixture handling has been improved with better JSON body formatting
and more careful whitespace handling, particularly for server-sent
events that require specific newline patterns. The mock infrastructure
now better preserves the structure of HTTP responses in YAML fixtures.

Additional improvements include updating the `saphyr` dependency to fix
multi-newline ending issues, refining array type inference in OpenAI's
parameter sanitization, and removing large blocks of commented-out test
code that are no longer needed.

---------

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

103 of 134 new or added lines in 10 files covered. (76.87%)

1237 existing lines in 38 files now uncovered.

8774 of 16865 relevant lines covered (52.02%)

135.01 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
86.63
9.35% crates/jp_llm/src/provider/anthropic.rs
3
26.99
-1.0% crates/jp_cli/src/cmd/query.rs
3
44.55
14.89% crates/jp_conversation/src/stream.rs
4
83.28
14.5% crates/jp_llm/src/provider/openai.rs
8
33.09
-8.24% crates/jp_test/src/mock.rs
12
76.76
crates/jp_llm/src/test.rs

Uncovered Existing Lines

Lines Coverage ∆ File
2
61.54
7.69% crates/jp_openrouter/src/types/request.rs
3
81.9
21.31% crates/jp_config/src/lib.rs
3
73.87
2.51% crates/jp_config/src/util.rs
3
97.73
33.17% crates/jp_llm/src/provider.rs
4
0.0
0.0% .config/jp/tools/src/fs.rs
5
87.86
5.74% crates/jp_config/src/assistant/instructions.rs
6
85.42
-2.3% .config/jp/tools/src/cargo/check.rs
6
0.0
0.0% crates/jp_conversation/src/error.rs
6
42.86
6.96% crates/jp_openrouter/src/types/tool.rs
7
87.5
-2.82% crates/jp_llm/src/structured/titles.rs
8
0.0
0.0% crates/jp_cli/src/cmd/config/set.rs
9
66.67
7.02% crates/jp_conversation/src/event/chat.rs
9
91.79
32.04% crates/jp_llm/src/provider/llamacpp.rs
9
0.0
-100.0% crates/jp_llm/src/structured.rs
11
62.66
0.65% crates/jp_cli/src/cmd/init.rs
11
40.0
-28.93% crates/jp_config/src/editor.rs
12
14.26
2.03% crates/jp_llm/src/tool.rs
14
72.8
33.28% crates/jp_config/src/model/parameters.rs
14
13.89
-1.26% crates/jp_llm/src/error.rs
15
0.0
0.0% crates/jp_cli/src/cmd/conversation/edit.rs
15
0.0
0.0% crates/jp_task/src/task/title_generator.rs
17
85.59
3.57% crates/jp_llm/src/query/structured.rs
17
10.53
0.0% crates/jp_openrouter/src/types/response.rs
20
69.49
8.6% crates/jp_config/src/model/id.rs
22
91.47
22.26% crates/jp_llm/src/provider/google.rs
24
90.57
1.75% .config/jp/tools/src/fs/modify_file.rs
24
54.13
0.0% crates/jp_storage/src/lib.rs
25
60.0
28.33% crates/jp_conversation/src/thread.rs
28
0.0
0.0% crates/jp_cli/src/cmd.rs
37
77.67
14.09% crates/jp_llm/src/provider/ollama.rs
40
86.38
31.54% crates/jp_llm/src/provider/openrouter.rs
71
83.28
14.5% crates/jp_llm/src/provider/openai.rs
71
33.09
-8.24% crates/jp_test/src/mock.rs
83
31.79
18.13% crates/jp_conversation/src/event.rs
85
86.63
9.35% crates/jp_llm/src/provider/anthropic.rs
93
42.57
7.32% crates/jp_config/src/conversation/tool.rs
160
44.55
14.89% crates/jp_conversation/src/stream.rs
248
26.99
-1.0% crates/jp_cli/src/cmd/query.rs
Jobs
ID Job ID Ran Files Coverage
1 20372941205.1 19 Dec 2025 02:30PM UTC 166
52.02
GitHub Action Run
Source Files on build 20372941205
  • Tree
  • List 166
  • Changed 83
  • Source Changed 77
  • Coverage Changed 77
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #20372941205
  • 4f90ef00 on github
  • Prev Build on main (#20124362332)
  • Next Build on main (#20406037953)
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