Fix review findings: chi path params, JSON-RPC conformance, SignalR/s… - #6
Merged
Merged
Conversation
…hutdown robustness
Correctness:
- chi v5.2.5 requires {param} braces; OpenAPIPatternToChi no longer rewrites
to :id, so OpenAPI/AsyncAPI parameterized routes actually match through the
router (was silently broken for every {id} route). Add end-to-end tests.
- JSON-RPC 2.0 conformance: ParseBody returns ordered RpcEntry[] with correct
-32600 Invalid Request (was all -32700), malformed batch elements no longer
abort siblings, empty batch is invalid, all-notification batches answer 204,
and procedure path params are extracted against the procedure's own pattern.
- SignalR delivery: Candidates dedupes per connection (was NxN streams), the
negotiate response advertises Text-only matching the handshake, handshake
errors are JSON-escaped, and dead removeConnectionStreams is removed.
- Manage-stream sockets get a read deadline (idle reaping); Shutdown cancels
pending delayed emissions; state.GetNamespace/GetAll deep-copy nested values.
- /_mock/examples validate (default true) now validates the response body
against the route's OpenAPI schema instead of being a silent no-op.
Design:
- Collapse loader/server mirror types to type aliases (RouteMapping, SchemaInfo,
RequestRecord, ResponseRecord); delete convert.go and the copy layers.
- Single-source constants: protocol names -> asyncapi.Protocol*, expression
source names -> runtime.Source*.
- Consolidate "push to channel" onto the ConsumerBus; central writeJSON helper;
pushPayload dead code removed.
- docs/architecture.md and api/openapi.yaml reconciled with implementation;
derivedExamples fails loud on a mis-typed match and deep-copies extensions.
Specs: add RS.ASP.11, RS.AMG.29/30, RS.SHR.22, RS.JRP.33/34, RS.MAPI.34 and
align RS.SHR.8/RS.JRP.22; 300/300 scenario coverage retained.
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.
…hutdown robustness
Correctness:
Design:
Specs: add RS.ASP.11, RS.AMG.29/30, RS.SHR.22, RS.JRP.33/34, RS.MAPI.34 and align RS.SHR.8/RS.JRP.22; 300/300 scenario coverage retained.