Skip to content

Fix Java.Interop documentation errors (R072, pass 3) - #1953

Merged
jonathanpeppers merged 3 commits into
mainfrom
jonathanpeppers-review-java-interop-r072-pass-3
Nov 28, 2026
Merged

jonathanpeppers merged 3 commits into
mainfrom
jonathanpeppers-review-java-interop-r072-pass-3

Conversation

@jonathanpeppers

@jonathanpeppers jonathanpeppers commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: e8b6e37e92cf7bc0cd0f58b1dbf2490aa3359762

Dimension Assessment Rationale
Change confidence 8.5/10 ↑ Reviewed all 333 in-scope blocks against pinned sources; checked all 106 changed channels and preserved surrounding XML.
↑ Independent Gemini reviews found no concrete issues, including in the invoker correction.
↓ Runtime execution was not performed; the current Android 36 index has a separate unresolved metadata conflict.
Diagnosis confidence 9/10 ↑ Pinned implementation lines directly establish the corrected behavior, including the version, invoker and virtual-dispatch differences.
↓ The documented runtime behavior was checked by source inspection rather than on a device.
Evidence fit Unknown ↓ No specific symptom was reported; the campaign requested a search for documentation errors.

Scope

Third-pass review of 333 AI-changed documentation blocks and 1,031 channels across 23 assigned Java.Interop XML files. This PR corrects 106 channels in 64 blocks across 13 files. It also rechecks the fixes and findings in #1762; that PR had no uncertain findings.

Corrections and evidence

The .NET 9 evidence uses dotnet/android bf2cefd89217847ec180263106c68b9308d0c699, submodule 03cb8e258735a5e0b8a5c703832639fb6b65f3c7; the .NET 10 Android 36.1 evidence uses dotnet/android 659cd98e7fb9dcd359d6fa9f2f9aaa806d117695, submodule 33992194b9373e9322244612c94ed9941b9bc2fd. The later .NET 10 servicing source is dotnet/android 8fa045dbb0f405201c2ccc68ba11284abd54ee27, submodule 5c085cfd61c3c687391961082002dd2998066c7f.

Uncertain findings

The two unchanged JniTypeManager.TryRegisterNativeMembers overloads, for ReadOnlySpan<char> and string, have conflicting Android 36 availability evidence. The historical 36 index lists them in Java.Interop 1.0.0.0. #644 identifies the exact 659cd98e7fb9dcd359d6fa9f2f9aaa806d117695 source used to generate those docs, so their documented behavior was checked against that source. The current 36 index instead omits the base overloads and identifies a different assembly version. Their current framework availability remains uncertain; no generated index or metadata was changed.

Checks

  • Personal ledger: 333/333 blocks and 1,031/1,031 AI-changed channels; two additional directly related channel corrections recorded separately.
  • Parsed all 23 scoped XML files; zero placeholders before and after. Verified the 106 corrected channels, preserved API metadata, BOM, CRLF and all bytes outside the approved spans; git diff --check passes.
  • Verified the pinned source blobs and the later .NET 9 and .NET 10 servicing sources. Independent gemini-4-argon reviews of all three commits found no concrete issues; model usage was verified in local usage events.

jonathanpeppers and others added 2 commits November 27, 2026 17:52
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 28, 2026 00:02
@jonathanpeppers
jonathanpeppers enabled auto-merge (squash) November 28, 2026 00:02
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the documentation-only API contract clarifications.

No open issues 🎉

What changed in this PR

This documentation-only PR refines Java.Interop API contracts following the prior review pass. It corrects version-specific behavior and clarifies marshaling, reference handling, and runtime lifecycle guarantees without changing API metadata or runtime code.

Changes:

  • Distinguish .NET 9, 10, and 11 behavior for runtime setup, type lookup, and marshal-member building.
  • Clarify base-implementation guarantees, null results, reference cleanup, and activation behavior.
  • Correct attribute defaults, wrapper-generation guidance, and type-registration documentation.
File Description
docs/​xml/​Java.Interop/​TypeManager.xml Corrects type-registration behavior.
docs/​xml/​Java.Interop/​JniValueMarshalerState.xml Documents the reference returned for a null peer.
docs/​xml/​Java.Interop/​JniValueMarshalerAttribute.xml Clarifies accepted marshaler types.
docs/​xml/​Java.Interop/​JniValueMarshaler`1.xml Qualifies generic base-implementation behavior.
docs/​xml/​Java.Interop/​JniValueMarshaler.xml Clarifies conversion expressions and invalid-reference results.
docs/​xml/​Java.Interop/​JniTypeSignatureAttribute.xml Explains wrapper-generation defaults and version-specific invokers.
docs/​xml/​Java.Interop/​JniTypeSignature.xml Documents a JNI-name exception condition.
docs/​xml/​Java.Interop/​JniRuntime+ReflectionJniValueManager.xml Refines activation, conversion, and cleanup contracts.
docs/​xml/​Java.Interop/​JniRuntime+JniValueManager.xml Clarifies version-specific delegation and peer disposal.
docs/​xml/​Java.Interop/​JniRuntime+JniTypeManager.xml Corrects version-specific lookup and registration behavior.
docs/​xml/​Java.Interop/​JniRuntime+JniMarshalMemberBuilder.xml Distinguishes supported operations from .NET 11 obsolescence.
docs/​xml/​Java.Interop/​JniRuntime+CreationOptions.xml Corrects runtime-option defaults and version-specific usage.
docs/​xml/​Java.Interop/​JniRuntime.xml Refines runtime selection, disposal, and service-property contracts.

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for this documentation-only clarification of Java.Interop API behavior.

No open issues 🎉

Review effort: Balanced

@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto review

@dalexsoto

Copy link
Copy Markdown
Member

In response to @jonathanpeppers's request: My review needs another scheduled pass: I captured the current discussion and the 13-file change list, but the tick budget ended before I read the changed documentation or implementation source. The missing coverage is the 106 edited channels in docs/xml/Java.Interop/ (notably JniRuntime+JniTypeManager.xml, JniRuntime+JniValueManager.xml, JniRuntime+ReflectionJniValueManager.xml and JniValueMarshaler.xml) against the pinned .NET 9/10/11 implementations, plus the target-only commit and the earlier #1762 decisions. No API read failed. This is a reviewer coverage gap, not an identified defect in this PR; the captured head and remaining file-by-file scope are preserved for continuation.

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed all 13 changed documentation files and their relevant source behavior. The version-qualified JNI behavior, reference ownership and cleanup guarantees, and defaults are consistent with the reviewed implementation and surrounding member documentation. No blocking issues found.

@jonathanpeppers
jonathanpeppers merged commit ebcf0b6 into main Nov 28, 2026
4 checks passed
@jonathanpeppers
jonathanpeppers deleted the jonathanpeppers-review-java-interop-r072-pass-3 branch November 28, 2026 01:53
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.

3 participants