AUS-1008: Add per-serializer scale diagnostics and mark the yielding row release-required - #169
Merged
Merged
Conversation
Names beginning with rpc. and the name $/cancelRequest are refused by one check in SMDServiceCollection (Add, the indexer setter and AddBatch before any entry is copied), which every registration path reaches: BindMethod, the attribute binder and RegisterFuction through AddService, BindInterface through AddBatch. BindInterface drops its own rpc. test. An internal AddReserved keeps the duplicate rule for the library's later rpc.discover registration. README, CHANGELOG and docs/upgrading.md carry the change.
The core now bounds what it admits: a document over JsonRpcLimits.MaxDocumentBytes (4 MiB by default) or a batch with more than MaxBatchCount entries (1024) is answered with -32600 and a data object naming the limit and the configured maximum, before anything is parsed or executed. The byte check runs at every public Process and ProcessAsync entry before any copy, flattening or transcoding (string overloads measure the UTF-8 byte count); the batch check runs after a full parse and before the first dispatch, so no prefix of an over-long batch executes. Config.SetLimits sets the process-wide value or a per-session override; zero disables a field and JsonRpcLimits.Unlimited restores the 1.x behaviour. Kestrel's MaxRequestBytes stays and is met first. README, SECURITY.md, CHANGELOG and docs/upgrading.md describe the limits and the staged host-responsibility paragraph.
AUS-1004: Add JsonRpcLimits with document and batch bounds
…row release-required
Merged
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.
AUS-1001 item 6 of the 2.0.0 sequence (the P5 amendment on AUS-985). Harness, workflow and documentation only; nothing under Json-Rpc/ or the serializer packages changes.
TestServer_Console --scalekeeps its gate unchanged (inline rows, three paired runs, medians, exit code) and then prints a diagnostics table that is never part of the exit code: the three inline None rows and theyieldsOnceNone row at 1 and N workers under each serializer (jsmn, System.Text.Json, Json.NET), one run per cell, with the N/1 ratio and bytes per request at one worker. The serializer is restored afterwards and any failure is reported after the partial table. A final--no-diagnosticsargument skips it. The harness now references the two serializer projects.pages.ymlalso triggers on CHANGELOG.md, which the site builds a page from.--scaledescription covers the diagnostics; the KestrelEnableAsyncMethods = truerow with methods that suspend once is a release-required regression row, re-measured before each release against the previous release's figure, with no absolute floor.Verification: full solution Release build with no new warnings, 1220 tests on net8.0 and net10.0,
--scale 1 4 1.0with and without--no-diagnostics(exit 0, expected table shape, every response check passing; the figures were not judged on the busy machine), a forced gate failure keeping exit 1 through the diagnostics, the request-path checker, the chart check and the site build.Stacked on #168; once that merges, this diff is the single commit.