ci: improve coverage config and add unit tests#1120
Draft
Conversation
- 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>
ce48326 to
7bb4f5f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ref: #855
--include-ignored) in coverage measurement, excludingtlsn-tls-clientandtlsn-tls-corewhich need external infratlsn-coreconfig builders, hash, webpki, TLS transcript, andtlsn-formatsJSON/HTTP commitCoverage improvements
tlsn-coretlsn-formatsTest plan
cargo test -p tlsn-core— 145 tests passcargo test -p tlsn-formats— 27 tests pass--include-ignored🤖 Generated with Claude Code