Skip to content

chore: sync MCP servers, agent instructions, SDK and tooling with FSharp.Azure.Cosmos - #21

Merged
xperiandri merged 13 commits into
mainfrom
mcp-and-tooling-updates
Oct 2, 2026
Merged

xperiandri merged 13 commits into
mainfrom
mcp-and-tooling-updates

Conversation

@xperiandri

Copy link
Copy Markdown
Collaborator

Proposed Changes

Ports the MCP, agent instruction, SDK and tooling changes made in FSharp.Azure.Cosmos since the last sync. .mcp.json registers the F# (FsLangMCP), GitHub and Microsoft Docs MCP servers for both VS Code / GitHub Copilot and Claude Code, CLAUDE.md and AGENTS.md point every agent to the shared Copilot instructions, and those instructions adopt the latest F# guidelines (voption, StringComparison and spans, XML doc comments, open sorting, MSTest assertions). The .NET SDK moves to 10.0.401, Fantomas to 8.0.5 with the tree reformatted, ReportGenerator to 5.4.7 and FSharp.Analyzers to 0.31.0. Tests run on Microsoft.Testing.Platform with the MSTest metapackage, and its code coverage extension replaces AltCover. Directory.Build.targets now formats each project once per build instead of once per target framework, which fixes concurrent Fantomas runs of the netstandard2.0 and net8.0 builds failing on locked files or with MSB3371.

Types of changes

What types of changes does your code introduce to FSharp.Control.R3?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • Build and tests pass locally – build.cmd (clean, restore, build, test, pack) and build.cmd CheckFormatCode succeed
  • I have added tests that prove my fix is effective or that my feature works (if appropriate) – the library behavior is unchanged; the formatting race fix was verified by forcing Fantomas to rewrite files in repeated builds
  • I have added necessary documentation (if appropriate)

Further comments

  • Commits mirror the corresponding FSharp.Azure.Cosmos commits and keep the R3 specifics: max_line_length=150, the project-specific instruction sections and the double Fantomas pass.
  • testconfig.json turns on method-level test parallelization, which the tests did not have before.
  • Fantomas 8.0.5 changes two things here: tight parens on calls whose callee is not a plain dotted name (e.g. ValueTask<'r>(...)), and a computation expression that would overflow max_line_length moves below the = (AsyncObservable.toLookup).
  • The formatting fix delegates to one instance of the project without a target framework, so a project is also formatted when it is built only as a project reference. Formatting in the outer build alone would skip that case.
  • In Claude Code the GitHub MCP server authenticates with the token stored by Git Credential Manager (.claude/scripts/github-mcp-headers.ps1), because the server does not support the OAuth dynamic client registration Claude Code needs.
  • Not ported: the ToolUpdate target (dotnet tool update --all on build) and the FAKE DotnetToolRestore target, as the ToolRestore target already restores tools during restore.
  • Merging Add integration parity coverage and normalize test suite to task CE in FSharp.Control.R3 #12 after this will conflict in Directory.Packages.props, the test project and the regrouped test files; keep its test layout and rerun Fantomas.

🤖 Generated with Claude Code

xperiandri and others added 4 commits October 2, 2026 22:00
The EditorConfig specification does not support inline comments, so a strict
parser reads `indent_style = space # default=space` as the value
`space # default=space` and the `[*]` header with a comment after it as a
different glob. The bare `http://EditorConfig.org` line was neither a
comment nor a setting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nfig

`.editorconfig` asked for CRLF in `.cmd`, `.bat` and `.ps1` files while
`.gitattributes` left them to `text=auto`, so the checkout and the editor
disagreed on one platform and files showed up modified without any content
change.

* `.cmd` and `.bat` are CRLF in every checkout, as `cmd.exe` misreads labels
  and `goto` in LF batch files.
* `.ps1` and `.psm1` are LF in both files, which keeps a
  `#!/usr/bin/env pwsh` shebang working on Linux. PowerShell on Windows
  reads LF too.
* Remove the space in the `[*.{ps1, psm1}]` glob, which made the `psm1`
  pattern match nothing.

The index is already LF, so no file content changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Pin the SDK to `10.0.401` in `global.json`.
* Install the latest `10.0` SDK in the dev container instead of `10.0.300`,
  which is older than the pinned one and would fail SDK resolution.
* Move the starship dev container feature from the retired
  `devcontainers-contrib` namespace to `devcontainers-extra`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README still asked for the .NET 6 SDK, while `global.json` pins
`10.0.401` and the projects use F# 10.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 2, 2026 21:31
Comment thread .config/dotnet-tools.json Outdated

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

The new raw test command fails for checkout paths containing spaces because project and results paths are unquoted.

Review effort: Balanced
Findings: 1 High severity

Open (1)
What changed in this PR

Synchronizes developer tooling, MCP configuration, SDK versions, formatting, and MSTest infrastructure with FSharp.Azure.Cosmos.

Changes:

  • Adds shared agent and MCP configuration.
  • Upgrades the SDK, tools, Fantomas configuration, and reformats F# sources.
  • Migrates tests and coverage to Microsoft.Testing.Platform and fixes concurrent formatting.
File Description
.claude/​scripts/​github-mcp-headers.ps1 Supplies GitHub MCP authentication headers.
.config/​dotnet-tools.json Upgrades and adds local tools.
.devcontainer/​devcontainer.json Updates container features and SDK.
.editorconfig Updates Fantomas and line-ending settings.
.gitattributes Defines script line endings.
.github/​copilot-instructions.md Expands shared coding guidance.
.github/​prompts/​create-pr-description.prompt.md Adds description-formatting guidance.
.github/​workflows/​publish_ci.yml Removes obsolete AltCover note.
.github/​workflows/​publish_release.yml Removes obsolete AltCover note.
.gitignore Ignores the generated skills link.
.mcp.json Registers MCP servers for supported agents.
AGENTS.md Points agents to shared instructions.
CLAUDE.md Points Claude Code to shared instructions.
Directory.Build.targets Adds skills linking and serialized formatting.
Directory.Packages.props Migrates to the MSTest metapackage.
FSharp.Control.R3.slnx Adds MCP configuration as a solution item.
README.md Documents updated SDK, test, and coverage behavior.
build/​Changelog.fs Applies Fantomas formatting.
build/​build.fs Migrates test and coverage orchestration.
global.json Pins the SDK and selects MTP.
src/​FSharp.Control.R3/​AsyncObservable.fs Applies Fantomas 8 formatting.
src/​FSharp.Control.R3/​Observable.fs Applies Fantomas 8 formatting.
src/​FSharp.Control.R3/​TaskObservable.fs Applies Fantomas 8 formatting.
tests/​FSharp.Control.R3.Tests/​BuilderTests.fs Applies Fantomas 8 formatting.
tests/​FSharp.Control.R3.Tests/​FSharp.Control.R3.Tests.fsproj Enables the MSTest runner and configuration.
tests/​FSharp.Control.R3.Tests/​ObservableTests.fs Applies Fantomas 8 formatting.
tests/​FSharp.Control.R3.Tests/​testconfig.json Enables method-level parallel testing.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread build/build.fs Outdated
xperiandri and others added 9 commits October 3, 2026 01:02
* Run `dotnet test` on Microsoft.Testing.Platform (`global.json`) with the
  MSTest runner enabled in the test project.
* Reference the `MSTest` metapackage instead of `MSTest.TestAdapter`,
  `MSTest.TestFramework` and `Microsoft.NET.Test.Sdk`.
* Replace AltCover with the Microsoft.Testing.Platform code coverage
  extension: `DotnetTest` runs `dotnet test --project` for each test project
  and writes Cobertura reports to `TestResults`, which
  `GenerateCoverageReport` turns into HTML and merged Cobertura reports.
* Run tests in parallel at method level, configured in `testconfig.json`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Remove unnecessary `sprintf` calls: interpolate the `dotnet watch`
  command, pass the tool command as is and use `failwithf`.
* Prefix the bump version commit with `release:` to follow Conventional
  Commits.
* Keep the current latest entry when publishing to GitHub with an empty
  changelog instead of failing on `LatestEntry`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* `dotnet-reportgenerator-globaltool` `5.3.11` -> `5.4.7`
* `fsharp-analyzers` `0.27.0` -> `0.31.0`
* Write `"rollForward": false` for every tool, as `dotnet tool update` does.
  It is the default, so tools keep running on the runtime they target.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three `.editorconfig` settings this version no longer recognizes:
- `fsharp_semicolon_at_end_of_line` and `fsharp_max_dot_get_expression_width`
  are dropped with no replacement.
- `fsharp_keep_indent_in_branch` is renamed to
  `fsharp_experimental_keep_indent_in_branch`.

F# files now get `end_of_line=lf`, which matches the eol `.gitattributes`
stores them with, so formatting on Windows no longer flips them to CRLF.
The remaining `.editorconfig` comments are corrected to the defaults and
examples of this version.

Two formatting differences from 6.3.16 show up in this repository:

- Tight parens on a call whose callee is not a plain dotted name, e.g. one
  carrying a type application (`ValueTask<'r>(...)`,
  `Assert.AreEqual<int>(4, i)`) or a method call on a record copy
  expression. Deliberate and permanent since 8.0.0-alpha-018
  (fsprojects/fantomas#3425): `fsharp_space_before_uppercase_invocation`
  only gets a say when the whole callee is a plain dotted name, and no
  `.editorconfig` option restores the old spacing here.
- A computation expression that would push a member line past
  `max_line_length` moves below the `=` instead of overflowing the line
  (`AsyncObservable.toLookup`).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Formatting only, produced by `dotnet fantomas .`; a second run leaves the
tree unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* `F#` – FsLangMCP semantic F# server backed by the compiler and FSAC, run
  as the pinned `fslangmcp` local tool
* `GitHub` – code search in dependency repositories
* `Microsoft Docs` – official Microsoft and Azure documentation

`.mcp.json` lists them under `servers` for VS Code / GitHub Copilot and
under `mcpServers` for Claude Code. In Claude Code the `GitHub` server
authenticates through `.claude/scripts/github-mcp-headers.ps1`, which reuses
the GitHub token stored by Git Credential Manager, because the server does
not support the OAuth dynamic client registration Claude Code needs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* `CLAUDE.md` imports the shared Copilot instructions, and `AGENTS.md`
  points other agents to them, so every agent follows a single source of
  truth.
* `Directory.Build.targets` links `.claude/skills` to `.github/skills` on
  design-time builds, so Claude Code discovers the repository skills once
  they exist. Git cannot store a Windows junction, and a committed symlink
  only checks out as a real link with `core.symlinks=true` plus Developer
  Mode, so the link is created locally and git-ignored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bring the instructions in line with FSharp.Azure.Cosmos:

* Document when to prefer each MCP server from `.mcp.json`: FsLangMCP for
  semantic F# work, GitHub for code search in dependency repositories and
  Microsoft Docs for official documentation.
* Restructure the F# guidelines into language and tooling, asynchrony and
  cancellation, values and collections, and functions, lambdas and strings.
* Adopt the `voption`, `StringComparison` and span guidance from the
  dotnet/fsharp instructions, `IcedTasks` CE guidance (this library does not
  reference `IcedTasks` yet and needs maintainer sign-off before adding it),
  `ToLookup` over `Seq.groupBy`, the nullness warning suppression order, the
  XML doc comment `<summary>` rules and `open` statement sorting.
* Prefer MSTest `Assert.Contains` and `Assert.HasCount` style assertions and
  running tests with `--no-build` and trx results.
* Ask the PR description prompt to wrap names and versions into backticks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…work

The library targets `netstandard2.0` and `net8.0`, and MSBuild builds both
target frameworks in parallel. The `Format` target ran in each of them, so
two Fantomas processes rewrote the same files at once: some files failed to
format because they were "being used by another process", and touching the
shared marker file could fail the build with MSB3371.

Every build of a project now calls `Format` on one dedicated instance of the
project without a target framework. MSBuild runs a target once per project
instance, so each project is formatted once per build, whether it is built
from the solution, as a project reference or on its own. Design-time builds
still skip formatting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@xperiandri
xperiandri force-pushed the mcp-and-tooling-updates branch from 725a547 to 50702aa Compare October 2, 2026 23:03
@xperiandri
xperiandri merged commit c79f780 into main Oct 2, 2026
7 checks passed
@xperiandri
xperiandri deleted the mcp-and-tooling-updates branch October 2, 2026 23:35
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.

2 participants