Skip to content

cDAC review instructions: require doc updates for contract/data-descriptor changes - #130532

Merged
max-charlamb merged 2 commits into
dotnet:mainfrom
max-charlamb:cdac-review-doc-instructions
Jul 13, 2026
Merged

max-charlamb merged 2 commits into
dotnet:mainfrom
max-charlamb:cdac-review-doc-instructions

Conversation

@max-charlamb

@max-charlamb max-charlamb commented Jul 10, 2026 •

Copy link
Copy Markdown
Member

Improves the cDAC Copilot PR-review instructions so reviews consistently flag missing doc updates for contract and data-descriptor changes.

Motivation

Copilot PR reviews on cDAC changes have repeatedly missed cases where docs/design/datacontracts/<Name>.md should have been updated alongside the code. The doc under docs/design/datacontracts/ is the authoritative spec of each contract (1:1 with Abstractions/Contracts/I<Name>.cs) and it drifts silently when reviewers don't check it.

Change

Two edits to .github/instructions/cdac.instructions.md:

  1. Broaden applyTo so these instructions load for PRs that touch:

    • src/native/managed/cdac/** (existing)
    • docs/design/datacontracts/** (new)
    • src/coreclr/**/datadescriptor/** (new -- catches all three datadescriptor dirs: vm/, gc/, nativeaot/Runtime/)
  2. Add a "Documentation updates" section with a short list of change patterns that MUST have a matching doc update:

    • Abstractions/Contracts/I<Name>.cs -- add/remove/rename methods, new exposed types/enums
    • Contracts/Contracts/<Name>_<N>.cs -- new version file, or semantic change to an existing version's algorithm (pure refactors excluded)
    • New contract entirely -- new docs/design/datacontracts/<Name>.md
    • src/coreclr/**/datadescriptor/** -- consuming contract's doc may need to reflect the change; check affected algorithms

    With an explicit exclusion list (pure refactors, test-only, restored-behavior bug fixes, Legacy/**, build/CI).

Kept the section deliberately short (~11 lines) -- shorter instruction blocks have produced better reviewer behavior than longer ones.

Note

This PR was drafted with assistance from GitHub Copilot.

…iptor changes

Copilot PR reviews for cDAC changes have repeatedly missed cases where
docs/design/datacontracts/<Name>.md needed to be updated alongside the code.
Add an explicit "Documentation updates" section listing the code-change
patterns that require a matching doc update, and broaden applyTo so the
instructions load for docs/design/datacontracts/** and every
src/coreclr/**/datadescriptor/** directory (vm, gc, nativeaot/Runtime).

Co-authored-by: Copilot <[email protected]>
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.

@max-charlamb
max-charlamb marked this pull request as ready for review July 10, 2026 22:37

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.

Pull request overview

Updates the cDAC folder-specific Copilot review instructions so they also apply to cDAC contract specification docs and CoreCLR data-descriptor sources, and adds an explicit checklist to require corresponding docs/design/datacontracts/<Name>.md updates when contract/data-descriptor-related code changes.

Changes:

  • Expanded the applyTo scope to include docs/design/datacontracts/** and src/coreclr/**/datadescriptor/** in addition to src/native/managed/cdac/**.
  • Added a short “Documentation updates” section enumerating contract/data-descriptor change patterns that must be accompanied by doc updates, with explicit exclusions.

…or wording

Per review feedback (rcj1): the Data/<Type>.cs + Target.ReadGlobal* rule
was redundant with 'semantic change to an existing version's algorithm'
and risked false positives on contract docs written in prose style
(rather than a strict 'list every data structure' style). Drop it, and
soften the datadescriptor bullet from 'must reflect' to 'may need a
matching update ... check whichever contracts' algorithms are affected'
for the same reason.

Co-authored-by: Copilot <[email protected]>
Copilot AI review requested due to automatic review settings July 11, 2026 00:13

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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

@max-charlamb
max-charlamb merged commit 0836e3b into dotnet:main Jul 13, 2026
28 checks passed
@max-charlamb
max-charlamb deleted the cdac-review-doc-instructions branch July 13, 2026 14:33
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview7 milestone Jul 14, 2026
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
…iptor changes (#130532)

Improves the cDAC Copilot PR-review instructions so reviews consistently
flag missing doc updates for contract and data-descriptor changes.

## Motivation

Copilot PR reviews on cDAC changes have repeatedly missed cases where
`docs/design/datacontracts/<Name>.md` should have been updated alongside
the code. The doc under `docs/design/datacontracts/` is the
authoritative spec of each contract (1:1 with
`Abstractions/Contracts/I<Name>.cs`) and it drifts silently when
reviewers don't check it.

## Change

Two edits to `.github/instructions/cdac.instructions.md`:

1. **Broaden `applyTo`** so these instructions load for PRs that touch:
   - `src/native/managed/cdac/**` (existing)
   - `docs/design/datacontracts/**` (new)
- `src/coreclr/**/datadescriptor/**` (new -- catches all three
datadescriptor dirs: `vm/`, `gc/`, `nativeaot/Runtime/`)

2. **Add a "Documentation updates" section** with a short list of change
patterns that MUST have a matching doc update:
- `Abstractions/Contracts/I<Name>.cs` -- add/remove/rename methods, new
exposed types/enums
- `Contracts/Contracts/<Name>_<N>.cs` -- new version file, or semantic
change to an existing version's algorithm (pure refactors excluded)
   - New contract entirely -- new `docs/design/datacontracts/<Name>.md`
- `src/coreclr/**/datadescriptor/**` -- consuming contract's doc may
need to reflect the change; check affected algorithms

With an explicit exclusion list (pure refactors, test-only,
restored-behavior bug fixes, `Legacy/**`, build/CI).

Kept the section deliberately short (~11 lines) -- shorter instruction
blocks have produced better reviewer behavior than longer ones.

> [!NOTE]
> This PR was drafted with assistance from GitHub Copilot.

---------

Co-authored-by: Max Charlamb <[email protected]>
Co-authored-by: Copilot <[email protected]>
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants