fsprojects/FSharp.Azure.Cosmos
59.5
Adequate · 3 October 2026
5.4k
lines of production code
F#
primary language
2
measurements over time
What this system is
FSharp.Azure.Cosmos is an F\# library that provides idiomatic helpers and computation-expression builders for the Azure Cosmos DB .NET SDK, enabling declarative construction of CRUD operations with built-in concurrency control and error handling. It wraps the standard SDK to map HTTP responses to discriminated unions and offers utilities for managing sub-status codes, unique keys, and asynchronous iteration. The project includes a comprehensive test suite using the Cosmos DB Emulator and a generated documentation site to guide users through integration and API usage.
Features
Added PowerShell script for GitHub MCP authentication headers
A new PowerShell script (.claude/scripts/github-mcp-headers.ps1) has been added to support Claude Code's GitHub MCP integration. This script retrieves the GitHub OAuth token from the local Git Credential Manager and outputs the necessary Authorization header in JSON format, allowing authenticated access to GitHub resources without requiring a personal access token. If no credential is found, it outputs an empty object to prevent authentication failures.
.claude · high confidence
Initial documentation site for FSharp.Azure.Cosmos
The documentation site is now available, providing a Getting Started tutorial, How-To Guides (including handling Cosmos DB sub-status codes), Background explanations, and an API reference. The site features a Bootstrap 5 layout with a fixed left sidebar navigation, a search box, and a light/dark theme toggle.
docsSrc · high confidence
Initial release of FSharp.Azure.Cosmos 1.2.0
This change introduces the FSharp.Azure.Cosmos library, providing F\#-idiomatic helpers for the Azure Cosmos DB .NET SDK. Key additions include a \ResponseMessage\ extension to access the Cosmos DB sub-status code (e.g., distinguishing between a missing item and a missing container on 404), a \CosmosName\ module for validating field names in dynamic queries, and \FeedIterator\ extensions that implement \AsAsyncEnumerable\ without relying on \taskSeq\ to prevent crashes in Debug builds. The release also includes a \SubStatusCodes\ module with comprehensive constants for handling specific Cosmos DB error conditions, and builders for constructing \UniqueKeyPolicy\ and \UniqueKey\ objects.
src/Cosmos · high confidence
Introduces F\# computation-expression builders for Cosmos DB operations
The library now provides F\# computation-expression builders for Create, Read, Delete, Patch, Replace, and Upsert operations, allowing users to construct requests using a declarative syntax (e.g., \create { item \<- myItem; partitionKey \<- pk }\). Each builder exposes custom operations for setting IDs, partition keys, consistency levels, ETags, indexing directives, and pre/post triggers. The implementation wraps the standard \Microsoft.Azure.Cosmos\ SDK, mapping HTTP status codes to discriminated union result types (such as \CreateResult\ or \DeleteResult\) and handling exceptions via \CosmosResponse\. Concurrent variants for Patch, Replace, and Upsert are also included, supporting optimistic concurrency control with retry logic on precondition failures.
FSharp.Azure.Cosmos · high confidence
New .NET 10 dev container with Cosmos DB Emulator support
Developers can now use a pre-configured dev container environment based on .NET SDK 10.0, which includes essential VS Code extensions (C\#, F\#, Docker, etc.) and automatically starts the Cosmos DB Emulator in GitHub Actions workflows to enable integration testing. The container shares the host network to allow the emulator to be accessible at 127.0.0.1:8081, and runs dotnet tool/restore on creation.
.devcontainer · high confidence
Repository scaffolding and developer tooling configuration
The repository has been initialized with standard developer tooling and configuration files. This includes an .editorconfig for consistent code formatting (specifically for F\# via Fantomas), .gitattributes and .gitignore for proper line-ending and file handling, and Directory.Build.props/targets to centralize build properties, enable central package management, and automate Fantomas formatting and .NET tool restoration. Additionally, configuration for AI coding assistants (Claude Code, GitHub Copilot) has been added via .mcp.json, AGENTS.md, and CLAUDE.md, and the project license was updated from Unlicense to MIT.
(repo-wide) · high confidence
Behavioural changes
Release automation and build infrastructure overhaul
The build system has been restructured to support automated releases via FAKE, introducing a new Changelog.fs module that enforces Keep a Changelog standards and generates release notes with GitHub link references. Documentation generation is now handled by a dedicated FsDocs.fs module wrapping the fsdocs tool, and the main build.fs script has been updated to use the .NET SDK 10.0.300, migrate tests to the Microsoft Test Platform, and fix path quoting for dotnet test commands.
build · high confidence
Test coverage
Added test infrastructure for stable Cosmos DB database identification; Added unit and integration test infrastructure for Cosmos operations; Extracted shared test infrastructure for Cosmos DB integration tests.
Dependencies
Upgrade to .NET 10 and update core dependencies
The project has been upgraded to target .NET 10.0 across the build, source, and test projects. Key dependency updates include Microsoft.Azure.Cosmos to version 3.62.0, FSharp.Core to 10.0.100, and NuGet packages (NuGet.Common, NuGet.Protocol) to 6.14.3 to address security vulnerabilities. The test infrastructure has been migrated to use MSTest (version 4.2.3) and Microsoft.NET.Test.Sdk (18.5.1), replacing previous testing frameworks.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 52 → 59 (+7.2)
- Rubric changed (rubric-2026.09.15 → rubric-2026.10.1) — scores are not directly comparable.
Lenses
- Code Health 99 → 98 (-1.5)
- Architecture 100 → 89 (-10.6)
- Maturity 39 → 59 (+20.1)
- Readiness 56 → 56 (+0.1)
- Security 81 → 80 (-1.3)
- Accessibility 53 → 53 (+0.0)
Resolved (5)
- Documentation: no contributor guidance (README.md)
- Documentation: no usage examples (README.md)
- Medium CVE: Microsoft.Build.Tasks.Git 10.0.300
- Outdated: Microsoft.SourceLink.GitHub
- Outdated: System.Formats.Asn1
New (2)
- FileTooLong: Cosmos/SubStatusCodes.fs (src/Cosmos/SubStatusCodes.fs)
- Outdated: MSTest.TestFramework
Changes since last survey
- 22 commits — 20 feature/other, 2 fixes
By area
- (root) — 10 commits
- tests/Cosmos.Tests — 4 commits
- (repo) — 2 commits
- .github/copilot-instructions.md — 2 commits
- .github/workflows — 1 commit
- build/build.fs — 1 commit
- src/Cosmos — 1 commit
- tests/Cosmos.Tests.Infrastructure — 1 commit
Notable commits
- fix: fix(build): quote paths passed to dotnet test (#36)
- fix: fix: ExistsAsync returns false for an existing item under concurrent calls (#32)
- change: Merge pull request #37 from fsprojects/chore/net10
- change: Merge pull request #39 from fsprojects/test/infrastructure-project
- change: chore!: target net10.0
- change: chore(ai): adopt voption and span guidance from the dotnet/fsharp instructions (#27)
- change: chore(ai): improve Claude Code integration (#28)
- change: chore(deps)!: update Microsoft.Azure.Cosmos to 3.62.0 (#38)
- change: chore(deps): remove the redundant System.Linq.Async and System.Formats.Asn1 references
- change: chore(deps): update Fantomas to 8.0.5 (#29)
- change: chore(security): update Microsoft.SourceLink.GitHub to 10.0.401
- change: chore: align script line endings between .gitattributes and .editorconfig
- change: chore: move .editorconfig comments onto their own lines
- change: ci: install only the .NET 10 SDK in workflows and the dev container
- change: docs: document the test infrastructure project and its environment variables
- change: docs: refer to the iteration extensions through <see> in test category summaries
- change: docs: replace backticks with <see cref> and <c> in IterationExtensionsUnitTests doc comments
- change: feat: expose the sub-status code of a stream ResponseMessage (#33)
- change: release: bump version to 1.2.0
- change: test: extract the shared test infrastructure project
- …and 2 more
Architecture
- Containers 0 added · 0 removed · contexts 1 added · 0 removed · edges 2 added · 1 removed
Added bounded contexts (1)
- FSharp.Azure.Cosmos.Tests.Infrastructure
Added dependency edges (2)
- FSharp.Azure.Cosmos.Tests → FSharp.Azure.Cosmos.Tests.Infrastructure
- FSharp.Azure.Cosmos.Tests.Infrastructure → FSharp.Azure.Cosmos
Removed dependency edges (was a dependency, now gone) (1)
- FSharp.Azure.Cosmos.Tests → FSharp.Azure.Cosmos
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
fsprojects/FSharp.Azure.Cosmos was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 3 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit d1b040a6905a34468ffe855a05330617a06d5dbb — the exact code this score is about.
- Scored under rubric-2026.10.1 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-4f4226d619ea.