Skip to content

[WP03 · SubStep 03.02] Implement the serialization posture - #37

Merged
deku2026 merged 5 commits into
mainfrom
wp03-02-serialization-posture
Sep 22, 2026
Merged

deku2026 merged 5 commits into
mainfrom
wp03-02-serialization-posture

Conversation

@deku2026

Copy link
Copy Markdown
Contributor

Implements the WP03.02 serialization posture under the approved Design profile (Design PR 65).

Changes

  • Bounded binary codecs: C# ContractWire / WireLimits (Foundation) and TS decodeContract / encodeContract / wireLimits (@arcforges/proto). Registry size classes (4 MiB unary/helper, 256 KiB inline page, 32 KiB stream frame, 64 MiB large projection), root plus 100 nested levels, typed tooLarge/tooDeep/malformed refusals, unknown fields retained.
  • Strict HTTP-exception JSON: strict JsonSourceGenerationOptions on the three generated contexts; generated C# <Schema>Json.Parse/TryParse/Serialize and TS parse/tryParse/serialize<Schema>Json codecs; per-schema x-arcforges-max-bytes.
  • Explicit service catalogues: generated C# ContractServices.All (PublicApi, Sdk.Contracts) and TS contractServices.
  • Public transport: createPublicGrpcWebTransport fixes binary gRPC-Web and refuses codec overrides.
  • Build posture: JsonSerializerIsReflectionEnabledByDefault=false everywhere; eng/check_serialization.py gate plus nine negative/positive tests.
  • Native AOT probe (test-only, never packed): roots all 13 C# libraries, AOT/trim diagnostics are errors, and it runs the independent fixtures/public/wp03-02.json vectors. The build runs the gate, publish and probe once on the CI host (Linux).
  • Receipts: contract-access refresh, provenance successor contract-bindings-r5, dependency receipt wp03-02-r1 (admits only Microsoft.DotNet.ILCompiler + linux-x64/win-x64 runtime packs 10.0.11 as build-test tooling), licence inventory, secret-scan allowlist for the new receipt's public hash rows.

Local validation (Windows, existing SDK 10.0.401 via local adapter; CI stays on 10.0.400)

  • Native AOT probe on win-x64: zero diagnostics; 31/31 binary and 51/51 JSON vectors, all 162 generated messages, both catalogues and explicit binding passed.
  • TS serialization tests (7) passed the same vectors; generation check, Release build (0 warnings), foundation suites (476 cases, 314-case exchange), npm test, access/licence/provenance/dependency/naming gates passed.
  • The vectors caught one real divergence: Google.Protobuf's stream parser accepted a top-level unmatched end-group tag; C# now uses the span parser, which refuses it.

Not covered: Linux AOT runs in this PR's CI. No live RPC, browser/device, installed consumer or macOS result is claimed. F-026 stays open until WP06.02.

🤖 Generated with Claude Code

deku2026 and others added 5 commits September 22, 2026 15:35
Author binary limit/nesting/unknown-field/malformed cases, strict
HTTP-exception JSON cases and expected service catalogues from the
approved Design profile before implementing the posture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add bounded C#/TS binary codecs with registry size classes and the shared
100-level nesting bound, strict source-generated HTTP-exception JSON codecs
with declared byte limits, generated service catalogues, the binary-only
public transport factory and reflection-disabled System.Text.Json.

Add the serialization policy gate with negative tests and a test-only
Native AOT probe that roots every C# library and runs the independent
WP03.02 vectors; the build runs both once per host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ce and dependency receipts

Refresh the contract-access inventory for the new codec, catalogue and
transport sources; bind regenerated outputs through the immutable
contract-bindings-r5 successor; admit the Native AOT compiler selected by
the pinned SDK in dependency receipt wp03-02-r1 with DesktopPlatform's
reviewed nuspec evidence; register the probe project and bind the new
receipt's public hash rows in the secret-scan allowlist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ld identity inspection

The AOT probe selects its host RID in the project, so Release builds place it
under bin/Release/net10.0/<rid>/; the inspection now finds it there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@deku2026
deku2026 merged commit e6c4a77 into main Sep 22, 2026
12 checks passed
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