Skip to content

feat(core): add tRPC protocol assertion - #9

Open
I-am-Uchenna wants to merge 1 commit into
starvy:mainfrom
I-am-Uchenna:agent/trpc-ok-assertion
Open

feat(core): add tRPC protocol assertion#9
I-am-Uchenna wants to merge 1 commit into
starvy:mainfrom
I-am-Uchenna:agent/trpc-ok-assertion

Conversation

@I-am-Uchenna

Copy link
Copy Markdown

Summary

  • add a serialized trpc_ok assertion target for tRPC requests
  • detect protocol errors in unbatched, batched, and SuperJSON response envelopes
  • surface the tRPC error code and message in assertion results
  • expose the new target only in the tRPC assertion editor

Why

tRPC procedures can fail at the protocol level even when an HTTP status check is not the clearest expression of intent. The existing graphql_ok evaluator cannot detect tRPC's singular error object, so a dedicated target is needed.

Successful tRPC assertions continue to evaluate decoded procedure data. Error responses fall back to the raw envelope, where trpc_ok now reports the protocol code and message.

Closes #8.

Validation

  • cargo fmt --all --check
  • cargo test --workspace
  • cargo clippy --workspace --all-targets -- --deny warnings

@I-am-Uchenna
I-am-Uchenna marked this pull request as ready for review July 23, 2026 19:45
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.

tRPC: add a trpc_ok assertion target to match graphql_ok

1 participant