Skip to content

ci: improve coverage config and add unit tests#1120

Draft
heeckhau wants to merge 6 commits intomainfrom
ci/improve-coverage-config
Draft

ci: improve coverage config and add unit tests#1120
heeckhau wants to merge 6 commits intomainfrom
ci/improve-coverage-config

Conversation

@heeckhau
Copy link
Copy Markdown
Member

@heeckhau heeckhau commented Mar 9, 2026

Summary

Ref: #855

  • Codecov config: Add ignore patterns for test infrastructure crates (harness, server-fixture, data-fixtures, examples) and coverage status targets (auto baseline, 80% patch target)
  • CI coverage: Include integration tests (--include-ignored) in coverage measurement, excluding tlsn-tls-client and tlsn-tls-core which need external infra
  • Unit tests: Add tests for tlsn-core config builders, hash, webpki, TLS transcript, and tlsn-formats JSON/HTTP commit

Coverage improvements

Crate Before After (unit only)
tlsn-core 48.9% 84.2%
tlsn-formats 47.7% 70.0%
Overall (with integration tests) 52.8% ~66%+

Test plan

  • cargo test -p tlsn-core — 145 tests pass
  • cargo test -p tlsn-formats — 27 tests pass
  • CI coverage job runs successfully with --include-ignored
  • Codecov reports updated coverage with ignore patterns applied

🤖 Generated with Claude Code

heeckhau and others added 5 commits March 9, 2026 11:15
- Extract platform-agnostic sdk-core crate (SdkProver, SdkVerifier, BoxedIo, Io trait)
- WASM crate becomes thin binding layer injecting JS-backed IO streams
- Simplify AsyncWrite/poll_close to fire-and-forget pattern
Move HTTP transcript parsing and handler-to-byte-range mapping from
TypeScript into Rust sdk-core, using spansy for HTTP/JSON parsing.
This enables mobile (iOS/Android) reuse of the range extraction logic.

- Add Handler types (HandlerType, HandlerPart, HandlerAction, etc.)
- Add compute_reveal() that maps handlers to byte ranges via spansy
- Support all handler parts: start line, method, headers, body, regex
- Add WASM binding in crates/wasm via serde_wasm_bindgen
- Include comprehensive tests (24 test cases)
…o sdk-core

- Move platform-agnostic logging types (LoggingLevel, LoggingConfig,
  CrateLogFilter, SpanEvent) and filter logic to sdk-core so mobile
  can reuse them
- Replace tracing-web with wasm-tracing to remove web-sys from the
  WASM dependency tree
- Remove unused time crate dependency
- Clean up dead .with_timer().without_time() chain
Ref: #855

- Add ignore patterns for test infrastructure crates (harness,
  server-fixture, data-fixtures, examples) to exclude from coverage
- Add coverage status targets: auto baseline for project, 80% for patches
- Include integration tests (--include-ignored) in coverage measurement,
  excluding tlsn-tls-client and tlsn-tls-core which need external infra
- This raises reported coverage from ~52.8% to ~66.2%

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Ref: #855

tlsn-core (48.9% -> 84.2%):
- Config builders: MpcTlsConfig, ProveConfig, TlsClientConfig,
  VerifierConfig, TlsCommitConfig (validation, defaults, errors)
- Hash: algorithm correctness, known vectors, serialization,
  HashProvider, HashAlgId, Blinder
- WebPKI: PEM parsing, RootCertStore, ServerCertVerifier
- TLS transcript: creation, extraction, getters, error paths

tlsn-formats (47.7% -> 70.0%):
- JSON commit: all value types, nested objects, error types
- HTTP: transcript parsing, commit_transcript

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@heeckhau heeckhau force-pushed the ci/improve-coverage-config branch from ce48326 to 7bb4f5f Compare March 9, 2026 10:33
@heeckhau heeckhau changed the base branch from main to injectio March 9, 2026 10:50
@heeckhau heeckhau marked this pull request as draft March 9, 2026 10:52
Base automatically changed from injectio to main March 10, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant