Skip to content

Fix malformed JSON-RPC envelope handling#2

Open
rayzhudev wants to merge 1 commit intomainfrom
codex-api-tests
Open

Fix malformed JSON-RPC envelope handling#2
rayzhudev wants to merge 1 commit intomainfrom
codex-api-tests

Conversation

@rayzhudev
Copy link
Copy Markdown
Owner

Summary

  • reject unknown fields on JSON-RPC lite envelope structs so hybrid request/response payloads are not silently accepted
  • add JSON-RPC lite serialization/deserialization tests, including malformed envelope regressions
  • update exported JSON schema fixtures for the stricter envelope objects

Tests

  • cargo test -p codex-app-server-protocol jsonrpc_lite
  • just fmt
  • just fix -p codex-app-server-protocol
  • jq empty codex-rs/app-server-protocol/schema/json/JSONRPCError.json codex-rs/app-server-protocol/schema/json/JSONRPCErrorError.json codex-rs/app-server-protocol/schema/json/JSONRPCMessage.json codex-rs/app-server-protocol/schema/json/JSONRPCNotification.json codex-rs/app-server-protocol/schema/json/JSONRPCRequest.json codex-rs/app-server-protocol/schema/json/JSONRPCResponse.json codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json

Notes

  • just write-app-server-schema was attempted but failed because the machine had only ~116 MiB free and rustc reported No space left on device; the deterministic JSON schema changes were applied manually and validated with jq.

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