Skip to content

Review fixes: plugin docs, dynamic write-path test, claim corrections, presence-mode naming policy - #213

Open
manuc66 wants to merge 7 commits into
feature/split/pr6-stj-review-roundfrom
feature/split/pr7-review-fixes
Open

Review fixes: plugin docs, dynamic write-path test, claim corrections, presence-mode naming policy#213
manuc66 wants to merge 7 commits into
feature/split/pr6-stj-review-roundfrom
feature/split/pr7-review-fixes

Conversation

@manuc66

@manuc66 manuc66 commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Problem

Two external code reviews of the branch flagged: the plugin pattern undocumented, the golden master stale after the generator fix, stale README claims (JsonDocument round-trip, test count, performance numbers), the dynamic write path untested, and the generated presence mode ignoring naming policy / case-insensitivity.

Fix

  • State in the README that the STJ API is not frozen before 1.0.0.
  • Regenerate the AOT golden master and add an explicit RegenerateGoldenMaster test.
  • Test the dynamic subtype write path for RegisterDynamicSubtype.
  • Document the runtime plugin pattern (KnownSubTypeOf, RegisterSubtypeAssembly, RegisterDynamicSubtype) in README/MIGRATION/CHANGELOG.
  • Attribute the JsonDocument round-trip to the generator, not the converter; refresh the test count and the converter performance numbers after the streamed write.
  • Honor JsonNamingPolicy and PropertyNameCaseInsensitive in the generated presence mode (uses the shared TryGetProperty helper), regenerate the golden master and cover the three cases with tests.

Tests

  • STJ 202/202, Aot 84 pass + 14 Native-AOT-only, generator 74/74 (net8.0 and net10.0).

Honest note(s)

  • The converter performance numbers were re-measured on the same machine after the streamed write; the resolver and generator columns were not re-measured (their write path did not change).
  • The test-count note reflects the suites as of this PR.

…ssembly, RegisterDynamicSubtype)

The audits flagged these public features as entirely undocumented. Add a README
section with a runnable example, a MIGRATION pointer, and a CHANGELOG entry.
Also document the name-based security implication for plugin assemblies.
…rter

The STJ converter write path is streamed since the Utf8JsonReader rework;
only the AOT generator still round-trips through a JsonDocument. The MaxDepth
+1 note, the 2-3x memory note and the engine comparisons claimed the round-trip
for both. Scope them to the generator and refresh the STJ test count (202).
Re-measured the converter scenarios on the same machine: the write side no
longer round-trips through a JsonDocument, so serialization allocations dropped
(Single 856B->784B, Collection 3288B->2.93KB). Runtime updated to .NET 10.0.10
and a note explains which engine still carries the JsonDocument cost.
…ed presence mode

The generated SelectType matched presence properties with the literal name,
ignoring both options that the runtime converter honors. Route the lookup
through the shared TryGetProperty helper (which already applies the naming
policy and case-insensitive fallback), regenerate the golden master and cover
the three cases with tests.
The '202 unit tests' count covered only the converter suite. Spell out the
whole STJ family: 202 converter tests, 84 generated-converter tests plus 14
Native-AOT-only, 74 generator tests.
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