Skip to content

Expose product-owned accessibility facets - #3880

Closed
richlander wants to merge 43 commits into
feature/3864-inspection-view-descriptorsfrom
feature/3865-accessibility-facets
Closed

Expose product-owned accessibility facets#3880
richlander wants to merge 43 commits into
feature/3864-inspection-view-descriptorsfrom
feature/3865-accessibility-facets

Conversation

@richlander

Copy link
Copy Markdown
Owner

Summary

  • add product-owned accessibility facets to type and member inventory requests/results
  • classify missing/public, protected, protected internal, private protected, internal, and private accessibilities in one shared catalog
  • default to public while supporting opaque-ID unions within an axis and intersections across kind/accessibility
  • cross-filter descriptor counts against the opposite axis so listing and application remain consistent
  • prove accessibility comes from metadata facts rather than s_, compiler-generated, or generated-looking names

Stack

Slice 3 of 3 for #3863, #3864, and #3865.

Validation

  • dotnet run --project src/DotnetInspector.Queries.Tests -c Release: 6 passed
  • dotnet build dotnet-inspect.slnx -c Release
  • MAI-Code quick read: clean, with no default/count/filter, compound-accessibility, metadata-boundary, or API-contract blockers

@richlander
richlander force-pushed the feature/3865-accessibility-facets branch from e359d26 to 2328254 Compare August 7, 2026 18:02
@richlander

Copy link
Copy Markdown
Owner Author

Restacked onto the updated #3877 head after the lower stack integrated origin/main.

  • old parent: 2cd2d6db
  • new parent: c627dce9
  • old head: e359d260
  • new head: 23282543

git range-diff 2cd2d6db..e359d260 c627dce9..23282543:

1:  e359d260 = 1:  23282543 Expose product-owned accessibility facets

The slice content is unchanged; only its base moved.

@richlander
richlander force-pushed the feature/3865-accessibility-facets branch from 2328254 to 394a06d Compare August 7, 2026 18:08
@richlander

Copy link
Copy Markdown
Owner Author

A newer origin/main commit landed before review, so the lower stack was updated again and this slice was restacked onto the current #3877 head.

  • old parent: c627dce9
  • new parent: 2c68d482
  • old head: 23282543
  • new head: 394a06d4

git range-diff c627dce9..23282543 2c68d482..394a06d4:

1:  23282543 = 1:  394a06d4 Expose product-owned accessibility facets

The slice content remains unchanged; only its base moved.

@richlander
richlander force-pushed the feature/3865-accessibility-facets branch from 394a06d to 2e6e05c Compare August 7, 2026 18:45
@richlander

Copy link
Copy Markdown
Owner Author

Restacked onto the adapted #3877 head after origin/main advanced through the section-subsystem changes.

  • old parent: 2c68d482
  • new parent: df29a7ae
  • old head: 394a06d4
  • new head: 2e6e05ce

git range-diff 2c68d482..394a06d4 df29a7ae..2e6e05ce:

1:  394a06d4 = 1:  2e6e05ce Expose product-owned accessibility facets

This slice is content-identical; only its base moved. The new head passes its full Release solution build and all six query contract tests.

@richlander
richlander force-pushed the feature/3865-accessibility-facets branch from 2e6e05c to 022c417 Compare August 7, 2026 19:24
@richlander

Copy link
Copy Markdown
Owner Author

Restacked once more after origin/main advanced through #3767/#3794/#3862.

  • old parent: df29a7ae
  • new parent: fdaf7ef1
  • old head: 2e6e05ce
  • new head: 022c4173
1:  2e6e05ce = 1:  022c4173 Expose product-owned accessibility facets

The slice is content-identical. The new head passes the full Release solution build and all six query contract tests.

@richlander
richlander force-pushed the feature/3865-accessibility-facets branch from 022c417 to 24ccfbf Compare August 7, 2026 21:30
@richlander

Copy link
Copy Markdown
Owner Author

Restacked onto #3877 head 05fc8027 after the parent fixes. The range-diff preserves the accessibility slice and adds the PrivateScope review fix:

1:  022c4173 = 1:  d494a92a Expose product-owned accessibility facets
-:  -------- > 2:  24ccfbf3 Classify private-scope members as private

@richlander
richlander force-pushed the feature/3865-accessibility-facets branch from 24ccfbf to 5c5c8bc Compare August 7, 2026 21:38
@richlander

Copy link
Copy Markdown
Owner Author

Final restack after #3875 moved the stack base. This range-diff shows the #3880 slice itself is unchanged:

1:  d494a92a = 1:  085a0bcb Expose product-owned accessibility facets
2:  24ccfbf3 ! 2:  5c5c8bcb Classify private-scope members as private
    @@ src/DotnetInspector.Queries.Tests/ApiInventoryQueryTests.cs
      
      namespace DotnetInspector.Queries.Tests;
     @@ src/DotnetInspector.Queries.Tests/ApiInventoryQueryTests.cs: public class ApiInventoryQueryTests
    -         Assert.Contains(generatedLookingPublic, publicTypes.Types);
    +             member => member.Name == "op_Addition");
          }
      
     +    [Fact]

@richlander

Copy link
Copy Markdown
Owner Author

Resolved the PrivateScope classification finding in 5c5c8bcb.

Method and field PrivateScope now map to the private facet, Public is handled explicitly, and unknown access masks fail visibly. A synthetic CLR image exercises PrivateScope method/field metadata through ApiSurfaceExtractor and ApiInventoryQuery, proving neither reaches the public/null fallback.

@richlander
richlander force-pushed the feature/3865-accessibility-facets branch from 5c5c8bc to 5a1735a Compare August 7, 2026 22:07
@richlander

Copy link
Copy Markdown
Owner Author

Restacked onto #3877 head d1a3dbc5 after its Source Locations discovery fix.

git range-diff 49caed57..5c5c8bcb d1a3dbc5..5a1735a9:

1:  085a0bcb = 1:  8aa3b5a0 Expose product-owned accessibility facets
2:  5c5c8bcb = 2:  5a1735a9 Classify private-scope members as private

The restack changed only the parent. The accessibility query class remains 8/8 passing and the full Release solution build passes at the new head.

@richlander
richlander force-pushed the feature/3865-accessibility-facets branch from 5a1735a to 3fd20ae Compare August 7, 2026 23:38
@richlander

Copy link
Copy Markdown
Owner Author

Restacked onto #3877 head 548a57a1 after the lower slice's review fixes.

The accessibility implementation remains unchanged. Conflict resolution composes its AccessibilityFacets result with the new parent-owned InspectionFailures field. A follow-up test-only commit selects all accessibility facets when exercising the inherited private static-constructor regression, since this slice intentionally defaults member inventories to public accessibility.

At stack tip, the query suite passes 10/10, the Source Locations no-acquisition regression passes, and the full Release solution build succeeds.

@richlander
richlander force-pushed the feature/3865-accessibility-facets branch from 3fd20ae to 397c26e Compare August 8, 2026 00:58
@richlander

Copy link
Copy Markdown
Owner Author

Restacked onto #3877 head 7c0ee024 after its descriptor/execution fixes.

git range-diff 548a57a1..3fd20ae0 7c0ee024..397c26e4 is patch-identical for all three slice commits:

1: 0127fec1 = 1: 06d37daf Expose product-owned accessibility facets
2: c1b350c5 = 2: 5d5ae74e Classify private-scope members as private
3: 3fd20ae0 = 3: 397c26e4 Exercise constructor facets across accessibility

The restack changed only the parent. At stack tip, query tests pass 10/10, descriptor tests pass 15/15, and the full Release build succeeds.

@richlander
richlander force-pushed the feature/3865-accessibility-facets branch from 397c26e to d26fe9e Compare August 8, 2026 01:29
@richlander

Copy link
Copy Markdown
Owner Author

Restacked onto #3877 head 2124fba9 after its discovery-annotation CI fix.

git range-diff 7c0ee024..397c26e4 2124fba9..d26fe9e5 is patch-identical for all three slice commits. The restack changed only the parent.

@richlander
richlander force-pushed the feature/3865-accessibility-facets branch from d26fe9e to 66bd99b Compare August 8, 2026 13:58
richlander and others added 24 commits August 21, 2026 10:32
Preserve abstraction and init-only accessor semantics, keep setter-only explicit properties compileable, and recognize nullable and extern-alias aggregate display forms without weakening structural MethodImpl identity.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 877c41d4-8130-4747-be53-7f86c1825f59
Require interface and generic-shape coherence, restrict nullable aliases to platform identities, reject hostile init markers, aggregate event sealing per accessor, and emit legal explicit indexer bodies.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 877c41d4-8130-4747-be53-7f86c1825f59
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 877c41d4-8130-4747-be53-7f86c1825f59
Fail closed for incomplete or inconsistent explicit aggregates, validate row/accessor signatures, account MethodImpl projection against extraction budgets, and preserve valid sections beside inapplicable body Facts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 877c41d4-8130-4747-be53-7f86c1825f59
Index MethodImpl rows without eager structural decoding, charge projection only for admitted members, and commit its decode credit with the retained type. Add a finite-bound CoreLib canary and preserve init-accessor structural identities across the restack.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 877c41d4-8130-4747-be53-7f86c1825f59
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 877c41d4-8130-4747-be53-7f86c1825f59
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 877c41d4-8130-4747-be53-7f86c1825f59
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 877c41d4-8130-4747-be53-7f86c1825f59
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 877c41d4-8130-4747-be53-7f86c1825f59
Cache repeated MethodImpl signatures and TypeSpec blobs, preserve generic-context identity, and impose a fixed per-type projection budget for distinct or numerous hostile rows.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 877c41d4-8130-4747-be53-7f86c1825f59
Keep malformed accessibility visible in summary extraction and defer focused-query MethodImpl projection until a method survives admission.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 877c41d4-8130-4747-be53-7f86c1825f59
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 877c41d4-8130-4747-be53-7f86c1825f59
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 877c41d4-8130-4747-be53-7f86c1825f59
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 877c41d4-8130-4747-be53-7f86c1825f59
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 877c41d4-8130-4747-be53-7f86c1825f59
Discard canonical accessors owned by EditorBrowsable(Never) properties and events before target projection across full, summary, bounded, and focused metadata paths while preserving noncanonical explicit implementations.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 877c41d4-8130-4747-be53-7f86c1825f59
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 877c41d4-8130-4747-be53-7f86c1825f59
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 877c41d4-8130-4747-be53-7f86c1825f59
Preserve bounded MethodImpl certainty, effective nested visibility, independent slot facts, and unspellable accessor evidence across strict source and human inventory projections.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 877c41d4-8130-4747-be53-7f86c1825f59
Count retained undetermined interface targets like proven targets so valid external inherited-interface evidence can finance its bounded decode work without weakening pending-candidate limits.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 877c41d4-8130-4747-be53-7f86c1825f59
Committed MethodImpl projection text represents an interface identity and two decoded method signatures, so give it a distinct bounded decode-work credit. Pending projection remains unable to finance its own expansion, preserving hostile-input failure behavior while allowing Windows CoreLib extraction to complete.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 877c41d4-8130-4747-be53-7f86c1825f59
Cap committed MethodImpl decode credit relative to retained model text and charge inherited-interface closure decoding. Preserve structured nested-generic interface names and MethodImpl resolution evidence across full, summary, and focused aggregate projections.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 877c41d4-8130-4747-be53-7f86c1825f59
Contain artifact-authored metadata fallback text, use canonical metadata-name arity for explicit-interface identities, and reject aggregates whose virtual accessors claim incompatible slots while preserving legitimate CoreLib companion accessors.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 877c41d4-8130-4747-be53-7f86c1825f59
Bound init-only modifier decoding, validate focused type visibility and abstract accessor shape, preserve default-interface MethodImpl C# projection, keep strict errors free of artifact names, and make metadata accessor fallback identity-complete.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 877c41d4-8130-4747-be53-7f86c1825f59
@richlander

Copy link
Copy Markdown
Owner Author

Round 36 replacement attempt 44efb1846 is superseded by the required cascading restack after the parent CI fix. New head 030f45e577e8f45dca25f76fba4f6086ef60d393 is based exactly on parent 067f0358a; range-diff maps all 43 child commits unchanged. The integrated Discovery and Source Locations gates pass 109/109 in Release. Round 36 remains pending current-head mergeability and ci-required: SUCCESS.

@richlander

Copy link
Copy Markdown
Owner Author

Round 36 is complete for PR 3880.

  • Review models GPT-5.6 Sol and Claude Opus 5 were used for adversarial review.
  • Review feedback is: converging.
  • Round start: 2026-08-21 07:31 PDT.
  • Round end: 2026-08-21 11:14 PDT.
  • Round duration: 3:43

Fix description: Six metadata/C# defects were fixed: bounded init-modifier decoding, contained strict errors, focused visibility validation, identity-complete accessor fallback, abstract-accessor validation, and valid default-interface MethodImpl projection. The child was then exactly restacked across the parent CI fix, preserving all 43 commits. Exact head 030f45e57 is mergeable, clean, and has ci-required: SUCCESS; fixes and the required restack moved the reviewed head, so the round is complete but not review-clean.

@richlander

Copy link
Copy Markdown
Owner Author

Superseded by migration coordinator #4649

Per #4649's documented plan, this PR is closed without merge. Round 36's reviews were converging but the branch has had no activity since 2026-08-21, and its parent slice #3877 is now closed as superseded. #4649 explicitly directs: "do not resolve or cascade-restack the old stack merely to make it mergeable... we plan to supersede and close #3877/#3880 after their useful work has been assigned to replacement slices."

The branch, exact head, and review/range-diff evidence remain preserved as implementation evidence per #4649 — this closure does not discard that work, it stops treating this head as a merge candidate. The outstanding disposition-matrix harvest (behavioral claim → destination slice → retain/relocate/replace/drop) is tracked in #4649.

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