Skip to content

Add scoped Components code-review checks - #70683

Closed
PureWeen wants to merge 1 commit into
dotnet:mainfrom
PureWeen:shneuvil-microsoft-components-ccr-instructions
Closed

PureWeen wants to merge 1 commit into
dotnet:mainfrom
PureWeen:shneuvil-microsoft-components-ccr-instructions

Conversation

@PureWeen

Copy link
Copy Markdown
Member

Add scoped Components code-review checks

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable. (Documentation-only; no runtime behavior changes.)
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Put compact Components review facts directly in path-scoped instructions.

Description

Keep the existing links and path scopes, and add four focused review checks to the two Components instruction files:

  • Case-insensitive [Parameter] name collisions across declared and inherited parameters, including the compatibility risk when adding a base-class parameter.
  • The permanent-test boundary clarified in Clarify Blazor test proportionality and permanent regression test boundaries #70411: managed RenderTree/component/service contracts stay at a faithful .NET unit-test boundary; deterministic module contracts can use Web.JS .test.ts; browser-owned behavior uses the owning browser suite. Preserve the generated-template Playwright and existing Platform suite boundaries, and reject tests that never exercise or observe the intended contract. "Browser-observed rendering or rehydration" does not mean managed RenderTree output alone.
  • Root-component operation ordering must not prevent a later removal from releasing an initialization task awaited for first-render quiescence.
  • Synchronous circuit termination from an UnhandledException subscriber can disconnect the client before a later JS.Error notification.

The circuit checks are scoped to Server and Endpoints. Existing logging guidance is unchanged. This PR does not change AGENTS.md, skills, product code, public APIs, or test-suite policy.

Source verification used main at f2484a6bf688bd1acb1af13802255c2c23a071dd: ComponentProperties/MemberAssignment, the existing parameter-collision tests, CircuitHost, CircuitRegistry, the merged permanent-regression policy, and the existing Platform test suite. The ordering hazards are illustrated by the frozen #68633 proposal at 39b01416d015e6dda10381a4cb4a1487ac9bee80; the instructions do not claim that current main already serializes batches that way.

Validation:

  • git diff --check - passed.
  • npx --offline --yes --registry=https://packagefeedproxy.microsoft.io/npm/ --package markdownlint-cli@0.45.0 markdownlint --disable MD041 -- .github\instructions\components.instructions.md .github\instructions\components.server.instructions.md - passed. MD041 is excluded because these existing instruction fragments do not start with an H1; their original frontmatter and opening text are unchanged.
  • Content checks passed: only the two intended files changed; existing content, links, and applyTo values are preserved; both files are ASCII and under 4 KB.
  • An independent source review completed with no remaining findings after precision corrections.
  • Runtime/browser tests were not run because no executable behavior changed.

Paired CCR canary

Ran one old/new pair for each frozen historical change on PureWeen/aspnetcore (10 completed reviews). Both arms receive the same current instructions, skills, and normative Components policy over the historical product source; only these two instruction files differ between arms. Every fixture preserves its historical product diff exactly. Actions logs confirm the expected path-matched instructions were loaded in all 10 runs. Treatment wording matches this PR after line-ending normalization.

Historical change Old instructions New instructions Observed result
#69478 PureWeen/aspnetcore#142: 2 inline PureWeen/aspnetcore#143: 2 inline Same count; new API-proposal feedback mentions inherited-parameter name collisions, while old feedback does not. This is not a standalone finding of the exact case-insensitive collision.
#68633 PureWeen/aspnetcore#144: 5 inline PureWeen/aspnetcore#145: 6 inline Both identify quiescence/disposal deadlock; only new identifies synchronous disconnect suppressing JS.Error.
#67314 PureWeen/aspnetcore#146: 4 inline PureWeen/aspnetcore#147: 5 inline Both identify the vacuous test. New separates the managed rendered-class contract (.NET rendering test) from computed indicator styling (Selenium), rather than combining them into a browser-test request.
#69705, intended-silent documentation control PureWeen/aspnetcore#148: 1 inline PureWeen/aspnetcore#149: 1 inline Neither stays silent; both request a renderer-attachment retry/reselection clarification.
#69706, intended-silent documentation control PureWeen/aspnetcore#150: 0 inline PureWeen/aspnetcore#151: 1 inline Silence regression: new adds a recommendation to make compatibility-break approval explicit.

These are mixed, exploratory, single-run output observations, including ties and a control regression. Comment counts are not correctness scores. Other comments were not independently adjudicated, and nondeterminism prevents attributing every difference to the instructions. No overall CCR improvement, accuracy, or recall claim is made.

Fixes: N/A (guidance-only change; no linked issue).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@PureWeen
PureWeen requested review from a team and wtgodbe as code owners November 17, 2026 23:17
Copilot AI balanced review requested due to automatic review settings November 17, 2026 23:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 reported for the path-scoped Components guidance updates.

No open issues 🎉

What changed in this PR

Adds focused, path-scoped Components review guidance without changing runtime behavior, public APIs, or test-suite policy.

Changes:

  • Adds checks for case-insensitive parameter-name collisions, including inherited parameters.
  • Clarifies faithful permanent-test boundaries in line with #70411 and rejects tests that do not exercise the intended behavior.
  • Adds Server/Endpoints checks for initialization deadlocks and error notifications suppressed by synchronous circuit termination.
File Description
.github/​instructions/​components.server.instructions.md Adds root-component ordering and client-error notification checks; preserves logging guidance.
.github/​instructions/​components.instructions.md Adds parameter-collision and test-boundary checks; preserves existing links and path scope.

Review effort: Balanced

@kubaflo kubaflo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review summary

Reviewed b2a342ae9e70a23a961edc78d9e2f0e2843a2e5d, target main, frozen base tip and verified merge base f2484a6bf688bd1acb1af13802255c2c23a071dd. Read both modified instruction files in full and traced the specific parameter-binding, permanent-test, circuit-quiescence, and disconnect/notification contracts. Reconciled CCR agreement 5948313533; no earlier substantive defect finding was present.

No actionable defect established. ComponentProperties enumerates inherited bindable properties through MemberAssignment, builds an OrdinalIgnoreCase writer dictionary, and throws for distinct colliding parameter members. MemberAssignment excludes the same inherited virtual property by base-definition identity, so the wording's “distinct parameter members” qualification matters. Existing case-variant and inherited-clash tests support the compatibility warning; it is not a blanket claim that ordinary overrides collide.

The test-boundary checks preserve managed RenderTree/service and faithful deterministic-module coverage below the browser while reserving browser-owned observables for the owning browser suite. The explicit distinction between browser-observed rendering and managed RenderTree output avoids treating any render assertion as E2E-only. The existing Platform suite path is present, and generated-template ownership remains separate.

Circuit ordering trace: current CircuitHost sets shouldWaitForQuiescence for the first update and awaits its initial render tasks. The frozen #68633 proposal at 39b01416d015e6dda10381a4cb4a1487ac9bee80 chains subsequent updates behind previousUpdate until the complete dispatched update finishes. If initialization requires disposal, queuing the removal behind that initialization creates the stated dependency cycle. The instruction is conditional on introducing serialization, not a false assertion that current main has that queue.

For error notification, the registered CircuitRegistry event subscriber calls TerminateAsync; its synchronous prefix removes the registered circuit and calls Client.SetDisconnected() before returning the disposal ValueTask. TryNotifyClientErrorAsync returns early when Client.Connected is false. That supports the warning to trace event subscribers before moving JS.Error notification later; an async-void subscriber does not defer the synchronous disconnect prefix.

Validation: git diff --check f2484a6bf688bd1acb1af13802255c2c23a071dd b2a342ae9e70a23a961edc78d9e2f0e2843a2e5d passed. Exact-byte comparison verified all prior text/frontmatter/links remain unchanged before the appended sections. The two files are ASCII and respectively 2,659 and 2,162 bytes, below the stated 4 KB bound. I did not rerun markdownlint or execute runtime/browser tests for this instruction-only change.

Canary calibration: the description appropriately calls the five old/new pairs exploratory and mixed, explicitly including one intended-silent control regression and another non-silent control in both arms. Counts are not correctness scores, and one pair per case cannot isolate instruction effects from nondeterminism. I did not independently inspect those fork review transcripts, instruction-load logs, historical-diff parity, or model identities; no multi-model consensus or overall CCR improvement is established by this review. These limitations are not erased by the source-grounded checks above.

Required Build Analysis and license/cla currently pass. Assessment: no source-level findings; safety confidence: low for cross-cutting agent guidance without an independently audited canary, rather than a shipping-code change. GPT-6.1 Sol source/text/CLI review; no relevant supplied visual media, browser/device or model campaign, product edits, approval, request-changes event, merge, or thread resolution.

@PureWeen

Copy link
Copy Markdown
Member Author

Closing this for now.

A held-out check showed that the test-boundary rule added comments on PRs where the reviewer should stay silent. Real-bug detection did not improve. The other rules do not have enough held-out cases yet to show a gain.

We will look at the JS.Error ordering in the circuit termination path as a possible code fix instead of review guidance. The branch stays in place.

@PureWeen PureWeen closed this Nov 20, 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.

3 participants