Skip to content

AUS-1008: Add per-serializer scale diagnostics and mark the yielding row release-required - #169

Merged
Astn merged 6 commits into
masterfrom
aus-1008-harness
Sep 26, 2026
Merged

Astn merged 6 commits into
masterfrom
aus-1008-harness

Conversation

@Astn

@Astn Astn commented Sep 26, 2026

Copy link
Copy Markdown
Owner

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 --scale keeps 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 the yieldsOnce None 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-diagnostics argument skips it. The harness now references the two serializer projects.
  • The pull-request scaling job splits the gate table and the diagnostics into separate summary sections.
  • pages.yml also triggers on CHANGELOG.md, which the site builds a page from.
  • README and CHANGELOG: the --scale description covers the diagnostics; the Kestrel EnableAsyncMethods = true row 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.0 with 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.

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
@Astn
Astn merged commit deee9c5 into master Sep 26, 2026
4 of 5 checks passed
@Astn Astn mentioned this pull request Sep 27, 2026
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