Skip to content

DRIVERS-3588: Add Claude Code skill for retiring EOL server version references - #1970

Merged
jyemin merged 2 commits into
mongodb:masterfrom
jyemin:DRIVERS-3588-add-retiring-server-versions-skill
Aug 13, 2026
Merged

DRIVERS-3588: Add Claude Code skill for retiring EOL server version references#1970
jyemin merged 2 commits into
mongodb:masterfrom
jyemin:DRIVERS-3588-add-retiring-server-versions-skill

Conversation

@jyemin

@jyemin jyemin commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Adds a reusable skill (.claude/skills/retiring-server-versions/SKILL.md) documenting a repeatable process for finding and removing dead version-gated tests, prose, and pseudocode after the minimum supported MongoDB server version is raised.

Distilled from the DRIVERS-3439 pre-4.2 cleanup, which took many review rounds to find all the ways dead version references hide in this repo. Includes tested, verified grep/find/awk commands for each pattern shape.

Validated by running it in dry-run/discovery mode against a hypothetical 4.2-to-4.4 retirement in this repo (no edits made), and refined through two rounds of independent critical review.

Please complete the following before merging:

  • Is the relevant DRIVERS ticket in the PR title?

  • [N/A] Update changelog.

  • [N/A] Test changes in at least one language driver.

  • [N/A] Test these changes against all server versions and topologies (including standalone, replica set, and sharded
    clusters).

…ferences

Adds a reusable skill (.claude/skills/retiring-server-versions/SKILL.md)
documenting a repeatable process for finding and removing dead
version-gated tests, prose, and pseudocode after the minimum
supported MongoDB server version is raised.

Distilled from the DRIVERS-3439 pre-4.2 cleanup, which took many
review rounds to find all the ways dead version references hide in
this repo (vacuous "at-floor" qualifiers, wire-version-only phrasing,
stale illustrative examples, unrunnable YAML tests gated by
maxServerVersion, stale generated-file naming, etc.). Includes
tested, verified grep/find/awk commands for each pattern shape.

Validated by running it in dry-run/discovery mode against a
hypothetical 4.2-to-4.4 retirement in this repo (no edits made), and
refined through two rounds of independent critical review.
@jyemin
jyemin requested a review from NoahStapp July 27, 2026 22:47
@jyemin jyemin self-assigned this Jul 27, 2026
@jyemin
jyemin requested a review from a team as a code owner July 27, 2026 22:47
@jyemin
jyemin requested a review from Copilot July 27, 2026 22:48
@jyemin
jyemin requested a review from rozza July 27, 2026 22:49

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

Adds a new Claude Code skill documenting a repeatable, repo-wide process for cleaning up dead version-gated content after raising the minimum supported MongoDB server version in the specifications repository.

Changes:

  • Introduces a step-by-step workflow for determining scope, setting fix/leave criteria, and iterating on repo-wide sweeps.
  • Provides a catalog of search “shapes” (regexes/commands) to uncover common hidden EOL-version references across Markdown and YAML tests.
  • Documents operational practices (batching, regeneration guidance, and verification against real driver implementations).
Comments suppressed due to low confidence (2)

.claude/skills/retiring-server-versions/SKILL.md:156

  • Same issue here: \b is not a word-boundary in grep -E on common grep implementations, so this command can silently fail to match. Use a digit-boundary like ([^0-9]|$) instead (or switch to a tool/flag that supports \b).
grep -rnE "(wire ?[Vv]ersion|[Mm]ax[Ww]ireVersion|[Mm]in[Ww]ireVersion)['\"]? *(is |>=? ?|<=? ?|of |as )?9\b" source --include="*.md"

.claude/skills/retiring-server-versions/SKILL.md:235

  • Similarly here: \s isn't a whitespace metacharacter for grep -E on common implementations, so the blockquote branch of this pattern may not work. Prefer [[:space:]]* (or a literal space) for portability.
grep -rnE '"[^"]*4\.2[^"]*"|>\s*".*4\.2' source --include="*.md"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .claude/skills/retiring-server-versions/SKILL.md
Comment thread .claude/skills/retiring-server-versions/SKILL.md Outdated
Comment thread .claude/skills/retiring-server-versions/SKILL.md Outdated
description: >-
Use when raising the minimum supported MongoDB server version in this repository (e.g. EOL'ing an old server
version) and needing to find and remove now-dead version-gated tests, prose, and pseudocode across the whole
specifications repo.

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.

Suggested change
specifications repo.
specifications repo.
disable-model-invocation: true

Suggest making it an explicitly envoked skill to reduce context costs.

https://code.claude.com/docs/en/features-overview#context-cost-by-feature

By default, skill descriptions load at session start so Claude can decide when to use them. Set disable-model-invocation: true in a skill’s frontmatter to hide it from Claude entirely until you invoke it manually. This reduces context cost to zero for skills you only trigger yourself. For a skill you didn’t write, set skillOverrides in settings to do the same without editing its file.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I worry that the skill will go unnoticed and unused as a result. How to weigh the tradeoff?

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.

How much is the actual cost of the description being loaded here? The three lines of description text shouldn't add anything beyond a rounding error to the total context.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The cost is low, and there aren't many skills in this repo. I'm going to decline this one, as I think the tradeoff of someone not noticing the skill and being told of it outweighs the extra context.

@kevinAlbs
kevinAlbs self-requested a review August 11, 2026 19:45

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

LGTM with minor suggestions.

I was mildly concerned that the skill itself is a lot of content to maintain. But I think the skill can be liberally updated, as it is intended to help development, not provide user-facing documentation.

Comment thread .claude/skills/retiring-server-versions/SKILL.md Outdated
Comment thread .claude/skills/retiring-server-versions/SKILL.md Outdated
Comment thread .claude/skills/retiring-server-versions/SKILL.md Outdated
Comment thread .claude/skills/retiring-server-versions/SKILL.md Outdated
Review feedback:

- Note the cleanup is only expected once all drivers have dropped the old
  server version. Drivers tracking this repo via a git submodule pick up
  test deletions on their next bump, so removing tests before the EOL
  silently drops their coverage.
- Correct the regeneration guidance: `make -C source` only converts
  .yml to .json and does not process .template files. Point at the
  generator scripts in .github/workflows/unified-tests.yml, which is
  also what regenerates these files in CI.
- Drop exact search-hit counts, which go stale quickly, keeping the
  qualitative comparisons that motivate each scoped pattern.
- Add an AGENTS.md pointer to the skill, so it is discoverable from the
  always-loaded project instructions as well as by model invocation.

Make the patterns work for future retirements (one version at a time,
including 5.0 and later):

- Scope the table-cell search to the two versions in play instead of a
  [2-4] digit range. The range re-surfaces prior retirements and cannot
  match 5.0 or later at all, so it would have failed silently.
- Search both wire versions, and document that wire numbers go
  multi-digit at 5.0 (wire 13) and have gaps (4.4->5.0 skips 10-12,
  6.2->7.0 skips 20), so they must be looked up, never computed.
- Note that the multi-digit collision guarantee expires once the server
  reaches double-digit majors, with the left guard to add when it does.
- Widen the undotted identifier quantifier to {2,} so it still matches
  once versions reach three undotted digits.

Found while testing the commands against hypothetical 4.2, 5.0 and 8.0
retirements:

- Add tests/invalid/ schema fixtures to the LEAVE list. They hardcode
  versions below every conceivable floor to prove the schema rejects
  them, so they match the maxServerVersion sweep on every retirement.
- Note that the wire version table lags the server (no 9.0 row today),
  and how to sanity-check a zero-hit wire version search.
@jyemin
jyemin force-pushed the DRIVERS-3588-add-retiring-server-versions-skill branch from 80d0902 to ec24dd5 Compare August 13, 2026 19:22
@jyemin
jyemin requested review from kevinAlbs and rozza August 13, 2026 19:24
@jyemin

jyemin commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

All comments addressed.

Also fixed some other issues while testing the skill against 5.0 and 8.0.

@jyemin
jyemin merged commit 92b3c0b into mongodb:master Aug 13, 2026
6 checks passed
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.

5 participants