Skip to content

[Internal] Changelog: Adds per-PR Unreleased pattern; retires in-repo release-copilot-agent#5864

Merged
NaluTripician merged 11 commits into
mainfrom
users/ntripician/changelog-rules
May 14, 2026
Merged

[Internal] Changelog: Adds per-PR Unreleased pattern; retires in-repo release-copilot-agent#5864
NaluTripician merged 11 commits into
mainfrom
users/ntripician/changelog-rules

Conversation

@NaluTripician

Copy link
Copy Markdown
Contributor

Summary

Moves the .NET Cosmos SDK and the FaultInjection package from release-time PR-title-derived
changelogs to per-PR manual entries under a persistent ### Unreleased section, matching the
Java and Python SDK pattern.

After this PR:

  • Every PR that touches Microsoft.Azure.Cosmos/src/** or Microsoft.Azure.Cosmos/FaultInjection/src/** must add (or justify the absence of) a changelog entry under ### Unreleased in the corresponding changelog.md.
  • The release agent (now exclusively in the toolkit) reads that section, reconciles it, and closes it with a version+date at release time.

This PR must be reviewed as a pair with the cosmos-sdk-copilot-toolkit PR:
azure-data-database-platform/cosmos-sdk-copilot-toolkit#68
Do not approve one without the other.

Background: Issue #5858,
PR #5860 (retroactive fix-up, separate in-flight).

Files Changed

Changelogs (Unreleased section structure)

File Action Notes
changelog.md Edit Adds ### Unreleased block with four subsections. Includes PR #5851 (Change Feed Estimator) pre-staged under #### Bugs Fixed.
Microsoft.Azure.Cosmos/FaultInjection/changelog.md Edit Prepends ### Unreleased block (anchor: unreleased-faultinjection). Existing beta sections untouched.

Contributor documentation

File Action Notes
CONTRIBUTING.md Edit Inserts ## Changelog entry section after Contribution flow. Includes: where to add, how to write, verb→subsection table, [Internal] definition, preview-feature carve-out, reviewer checklist, merge conflict guidance.
PULL_REQUEST_TEMPLATE.md Edit Appends ## Changelog block with two checkboxes.

AI / Copilot guidance

File Action Notes
.github/copilot-instructions.md Edit (1) Adds Changelog entry required bullet. (2) Adds Changelog classifier 4-step rubric immediately after. (3) Replaces ReleaseCopilotAgent bullet with pointer to toolkit skills.

Release flow (in-repo agent retired)

File Action Notes
.github/agents/release-copilot-agent.agent.md Delete Retired — toolkit skills are now the sole canonical source. Audit confirmed only copilot-instructions.md referenced it (updated in this PR).

CI

File Action Notes
.github/workflows/prlint.yml Edit Updates on-failed-regex-comment only. Title regex line 16 is unchanged. Removes false "used to help generate the changelog" claim; replaces with accurate [Internal] definition pointing to CONTRIBUTING.md.
.github/workflows/changelog-check.yml Create Soft non-blocking workflow: posts a reminder comment when a PR touches shipped source but not the changelog. Skippable via no-changelog-needed label. Uses marocchino/sticky-pull-request-comment@v2 (community action — requires org allow-list if not already permitted; inline fallback documented in spec §5.11).

What this does NOT change

  • No public API change. No GenAPI run needed. ContractEnforcementTests.cs not affected.
  • No wire / serialization change.
  • No production code under Microsoft.Azure.Cosmos/src/ or test code.
  • No version bump. Directory.Build.props untouched.
  • Historical changelog sections (### 3.59.0, ### 3.58.0, etc.) are untouched — existing anchors continue to work.
  • prlint.yml title regex is unchanged (line 16).
  • Encryption / Encryption.Custom changelogs — deferred per gate decision Q1. FaultInjection is in scope.

Side Effects (from landscape analysis)

  • 🟢 MINOR SE-1: scrape_changelogs.py regex — Features Added already covered; Bugs Fixed/Breaking Changes/Other Changes not extracted by the script (pre-existing gap in feature-parity dashboard; not a regression from this PR). Script runs unchanged.
  • 🟢 MINOR SE-2: First release after merge: reconciliation sweep will show every prior-merged PR as "no bullet in Unreleased" — expected. Release skill now includes transition-release note for the operator.
  • 🟢 MINOR SE-3: [Internal] meaning shift — now a review hint only; no longer affects changelog generation. CONTRIBUTING.md, copilot-instructions.md, and prlint comment all updated consistently.
  • 🟢 MINOR SE-4: Merge conflicts in ### Unreleased — guidance added to CONTRIBUTING.md ("take both bullets").
  • 🟢 MINOR SE-5: Author awareness — PR template, CONTRIBUTING.md, and copilot-instructions.md all surface the rule at PR-author time.
  • 🟡 POTENTIAL SE-8: marocchino/sticky-pull-request-comment@v2 requires org allow-listing in Actions settings. If not permitted, the changelog-check job will fail (silently, since it's non-blocking). Fallback: swap for inline gh pr comment step with an HTML comment marker — documented in spec §5.11.

Skeptic Pass

Q1: What didn't I look at?

  • Encryption / Encryption.Custom changelogs (explicitly deferred per gate decision).
  • ADO pipeline definitions (not in scope — no pipeline change needed for a process-only change).
  • Open in-flight PRs that may land before this merges and create Unreleased merge conflicts. Those PRs will add bullets to a section that doesn't exist yet (on main); once this merges the conflict is trivial to resolve (keep both bullets).

Q2: What assumption could be wrong?

Q3: Who didn't I think about?

  • External contributors: the PR template ## Changelog block will be visible to forks. This is intentional — the rule applies to all PRs.
  • Release engineers in the window between this merge and the toolkit PR merge: the skill still exists with the old behavior. Both PRs should merge same-day; the spec calls out reviewing them as a pair.

Q4: What would break in a scenario I haven't tested?

  • A release operator runs Mode 1 of cosmos-release-dotnet before the first PR with a changelog entry lands post-merge. The Unreleased section would be empty. The reconciliation step (§1.2.2) would surface many gaps (expected). The transition-release note handles this.

Quality Gates

  • ✅ YAML validity: prlint.yml and changelog-check.yml both parse cleanly (python -m yaml validated).
  • ✅ No production code modified.
  • ✅ Three-places alignment: CONTRIBUTING.md, copilot-instructions.md, and changelog-check.yml comment all state the same rule with consistent wording.
  • ✅ Agent deletion audit: only copilot-instructions.md referenced release-copilot-agent.agent.md (confirmed via grep pre-deletion; updated in this PR to a retirement notice).
  • scrape_changelogs.py: verified regex handles Features Added/Added; Bugs Fixed gap is pre-existing and documented.
  • ✅ No new unit/integration tests (no production code under change).
  • ⚠️ marocchino/sticky-pull-request-comment@v2: community action — requires org allow-list entry if not already permitted.

Reviewer guidance

Please review together with cosmos-sdk-copilot-toolkit#68. Do not approve one without the other.

Requested reviewers: @kirankumarkolli + one of @Kushagra Thapar / @fabian-meiswinkel / @debdatta-kunda

NaluTripician and others added 7 commits May 13, 2026 14:14
Adds ### Unreleased block with #### Features Added / Breaking Changes /
Bugs Fixed / Other Changes to both the main SDK changelog and the
FaultInjection changelog, per the new per-PR changelog process.

PR #5851 (Change Feed Estimator inflated-lag fix) is pre-staged under
#### Bugs Fixed in the main changelog — it was authored on the
copilot-investigate-issue-5847 branch and belongs here.

Part of: #5858

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds a ## Changelog entry section to CONTRIBUTING.md after the
Contribution flow section. Includes:
- Where to add entries (four subsections)
- FaultInjection-specific guidance
- How to write customer-facing entries with examples
- Verb→subsection mapping table
- [Internal] prefix definition and preview-feature carve-out
- Reviewer checklist
- Merge conflict guidance

Also appends ## Changelog block to PULL_REQUEST_TEMPLATE.md with two
checkboxes, matching the new per-PR changelog requirement.

Part of: #5858

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Three changes to .github/copilot-instructions.md:
1. Adds 'Changelog entry required' bullet under 'How AI should produce
   code/changes here' explaining the per-PR Unreleased pattern.
2. Adds 'Changelog classifier' deterministic rubric block immediately
   after — four-step decision tree for AI/reviewers when uncertain
   whether an entry is needed. Ambiguous outcomes default to a
   non-blocking comment, never silent skip.
3. Replaces the ReleaseCopilotAgent bullet in 'Named Copilot Agents'
   with a one-line pointer to the toolkit skills (cosmos-release-dotnet
   and cosmos-release-dotnet-faultinjection). The in-repo agent is
   being retired in this same PR.

Part of: #5858

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The ReleaseCopilotAgent in-repo agent file is retired. The canonical
.NET SDK release flow is now in the cosmos-sdk-copilot-toolkit under:
  - .github/skills/cosmos-release-dotnet/SKILL.md (main SDK)
  - .github/skills/cosmos-release-dotnet-faultinjection/SKILL.md (FI)

Audit performed before deletion: only .github/copilot-instructions.md
referenced this file (that reference has been updated to the toolkit
pointer in the preceding commit). Worktrees are excluded from this
audit per the established convention.

Reason: having two in-lockstep release agents creates drift risk. The
toolkit skill is now the sole canonical source and is maintained with
peer-review via the toolkit repo.

Per gate decision 'other' in human-gate-decision.json.

Part of: #5858

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

Updates the comment text posted when PR titles fail the lint check.
Removes the now-false claim that [Internal] is 'used to help generate
the changelog'. Replaces with an accurate description:
- [Internal] is a review hint (no customer-observable impact)
- Changelog is maintained per-PR in ### Unreleased of changelog.md
- Points to CONTRIBUTING.md for full definition and preview-feature
  carve-out

Title regex (line 16) is unchanged — only the comment text changed.

Part of: #5858

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds .github/workflows/changelog-check.yml — a GitHub Actions workflow
that posts a non-blocking reminder comment when a PR diff touches
Microsoft.Azure.Cosmos/src/** or FaultInjection/src/** but does not
also update the corresponding changelog.md.

Key design decisions:
- Non-blocking: does not gate the merge
- Skippable: add the 'no-changelog-needed' label to silence the check
- Per-package: detects main SDK and FaultInjection independently;
  a PR that touches both but updates only one changelog surfaces only
  the missing side
- Comment includes the Changelog classifier rubric from
  copilot-instructions.md for easy reference
- Uses marocchino/sticky-pull-request-comment@v2 for idempotent
  one-comment-per-PR semantics. Note: this community action requires
  an org allow-list entry if not already permitted in
  Azure/azure-cosmos-dotnet-v3. Fallback: swap for inline
  'gh pr comment' with an HTML marker.

Per gate decision Q3 in human-gate-decision.json.

Part of: #5858

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

@github-actions github-actions Bot 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.

All good!

@NaluTripician NaluTripician changed the title docs: Adopt per-PR Unreleased changelog pattern; retire in-repo release agent [Internal] Changelog: Adds per-PR Unreleased pattern; retires in-repo release-copilot-agent May 13, 2026
…ssion artifacts

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

The .coding-harness/ folder holds local Coding Agent Harness session state (env.json with local worktree path; review-feedback-N.json with per-cycle reviewer output). These were never intended for the public repo. Adding .gitignore entry to prevent recurrence. Per PR Deep Reviewer Cycle 1 finding F1.
Comment thread changelog.md Outdated
Comment thread changelog.md Outdated
NaluTripician and others added 2 commits May 14, 2026 08:52
…851 entry, normalize Added/Fixed headings

- Revert the pre-staged PR #5851 entry from the Unreleased section (PR #5851 is still open).
- Normalize all historical '#### Added' -> '#### Features Added' and '#### Fixed' -> '#### Bugs Fixed' across changelog.md and FaultInjection/changelog.md for consistency with the new Unreleased subsection naming.

Addresses review comments on PR #5864.

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

Copy link
Copy Markdown
Contributor Author

Merged origin/main into the branch (2a2492b) to pick up #5860 (retroactive Unreleased entries) and resolve the changelog.md conflict.

Resolution applied to the ### Unreleased block:

PR status is now MERGEABLE.

@kushagraThapar kushagraThapar 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.

Thanks for the iterations on this — the rename to the new Features Added / Bugs Fixed scheme and dropping the pre-staged #5851 bullet both look great. LGTM 🚀

@NaluTripician NaluTripician enabled auto-merge (squash) May 14, 2026 19:07
@NaluTripician NaluTripician merged commit 8b03a5a into main May 14, 2026
33 checks passed
@NaluTripician NaluTripician deleted the users/ntripician/changelog-rules branch May 14, 2026 22:50
NaluTripician added a commit that referenced this pull request May 18, 2026
Resolves CONTRIBUTING.md conflict by placing the new fork-CI
documentation (### How CI works for pull requests from forks,
### Working on the pipeline split itself) under ## Contribution
flow, ahead of the new ## Changelog entry section that was added
to main in PR #5864.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
NaluTripician pushed a commit that referenced this pull request May 19, 2026
…epo root

Per review feedback from @kushagraThapar (and the matching question from
@kundadebdatta): without a leading slash, git attribute patterns match
gitignore-style at any depth, so the original lines also applied to
Microsoft.Azure.Cosmos.Encryption/changelog.md and
Microsoft.Azure.Cosmos.Encryption.Custom/changelog.md - both of which
#5864 explicitly deferred from this change.

Anchoring both patterns with a leading '/' restores the stated PR scope:

  changelog.md:                                            merge: union
  Microsoft.Azure.Cosmos/FaultInjection/changelog.md:      merge: union
  Microsoft.Azure.Cosmos.Encryption/changelog.md:          merge: unspecified
  Microsoft.Azure.Cosmos.Encryption.Custom/changelog.md:   merge: unspecified

Also expands the header comment to record the anchoring rationale so a
future contributor doesn't drop the leading slashes by accident.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
NaluTripician added a commit that referenced this pull request Jun 9, 2026
…gelog files (#5889)

## Problem

PR #5864 moved the SDK to a per-PR `### Unreleased` model where every
shipped-source PR appends a bullet to the same anchor, and each release
PR (e.g. #5876) sweeps those bullets into a versioned section. Both
shapes produce textbook merge conflicts on `### Unreleased` for every
in-flight PR. Concrete recent hits: #5829 and #5868.

## Fix

Register the git [`union` merge
driver](https://git-scm.com/docs/gitattributes#_built_in_merge_drivers)
for the two changelog files shipped in this repo:

- `changelog.md` (main SDK)
- `Microsoft.Azure.Cosmos/FaultInjection/changelog.md`

On conflict, git takes lines from both sides — exactly the "take both
bullets" rule already documented in
[`CONTRIBUTING.md`](../blob/main/CONTRIBUTING.md) under **Changelog
entry → Merge conflicts**. The manual rule remains valid as a
reviewer-eyeball backstop; the union driver just automates the common
case.

## Scope

Exactly one file added (`.gitattributes`). Zero production / test / CI
changes. Encryption changelogs are intentionally **not** included,
deferred per #5864.

## Caveat

If two PRs edit the **same** line — rare for append-only bullet lists,
but possible during release sweeps that rewrite history blocks — `union`
silently keeps both sides' versions of that line. Reviewers should
continue to eyeball changelog diffs on conflict-prone PRs.

## Validation

**1. `git check-attr` confirms the driver applies to both targets:**

```
$ git check-attr merge -- changelog.md
changelog.md: merge: union

$ git check-attr merge -- Microsoft.Azure.Cosmos/FaultInjection/changelog.md
Microsoft.Azure.Cosmos/FaultInjection/changelog.md: merge: union
```

**2. End-to-end smoke test in a scratch worktree** — two throwaway
branches each appended a different bullet to `### Unreleased`, then
merged. With the driver in place the merge auto-resolved cleanly:

```
--- attempting merge smoke-a -> smoke-b ---
Auto-merging changelog.md
Merge made by the 'ort' strategy.
 changelog.md | 1 +
 1 file changed, 1 insertion(+)
Merge exit code: 0

--- post-merge Unreleased region ---
  ### <a name="unreleased"/> Unreleased

  - SMOKE B bullet (test only)
  - SMOKE A bullet (test only)
  #### Features Added
  ...

Contains SMOKE A : True
Contains SMOKE B : True
Conflict markers : False
SMOKE TEST PASSED
```

The scratch worktree and its branches were discarded after the test; the
PR contains only `.gitattributes`.

**3. Build sanity check:**

```
$ dotnet build Microsoft.Azure.Cosmos\src\Microsoft.Azure.Cosmos.csproj -c Release --nologo
Build succeeded.
    0 Warning(s)
    0 Error(s)
```

## Changelog entry

- [x] **No changelog entry required.** Repo-config-only change
(`.gitattributes`). Does not modify any file under
`Microsoft.Azure.Cosmos/src/**` or `FaultInjection/src/**`. Step 1 of
the classifier in `.github/copilot-instructions.md` short-circuits to
"no entry required."

---

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

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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