Skip to content

Development

m4bwav edited this page Sep 30, 2026 · 1 revision

Build and test

The repository needs the .NET 10 SDK (global.json pins 10.0.401) and, for the .NET Framework tests, Windows.

git clone https://github.com/m4bwav/IsImageUrlDotNet
dotnet restore --locked-mode
dotnet tool restore
dotnet fantomas --check .
dotnet format tests/IsImageUrlDotNet.CSharpTests --no-restore --verify-no-changes
dotnet build -c Release
dotnet test --no-build -c Release -f net10.0
dotnet test --no-build -c Release -f net48
dotnet pack src/IsImageUrlDotNet --no-build -c Release -o artifacts

The build treats warnings as errors. Fantomas checks the F# formatting, since dotnet format skips F# projects; dotnet format checks the C# tests. The net48 test run is Windows only and exercises the package's net462 build. The F# analyzers command CI runs is in AGENTS.md.

dotnet test on the solution (IsImageUrlDotNet.slnx, Release) on 2026-09-29, on Windows, ran both frameworks:

Project net10.0 net48
IsImageUrlDotNet.Tests (F#: the new API, the public API list) 103 passed 103 passed
IsImageUrlDotNet.CSharpTests (C#: extension forms, FSharp.Core through the dependency) 12 passed 12 passed
IsImageUrlDotNet.GoldenTests (the golden test alone) 1 passed 1 passed

No test touches the network: everything that makes a request talks to the fixture server in tests/Golden/Capture/FixtureServer.fs, which is also the proxy, with .test host names that never resolve.

The golden recordings

tests/Golden/1.0.2.*.json hold what the published 1.0.2 answered for 117 cases, with the requests each case sent, recorded by the F# program in tests/Golden/Capture against its own fixture server. The golden test runs the same cases against the new build and compares every case with the recording for its runtime and OS. The recordings never change: when the test fails, the source is fixed. A recording for a new runtime may be added, made by the same program from the published package. The capture pins IsImageUrlDotNet [1.0.2] in Capture.fsproj; to run it against another version, change that line in a copy outside the repository (how the wiki's replay did it).

CI and releases

ci.yml runs on every push to master and every pull request, on Ubuntu 24.04, Windows and macOS. It does a locked restore, the format checks, the build, the F# analyzers and a NuGet audit. Then it runs the tests on net10.0 (and net48 on Windows), packs, checks the package's contents, and restores the packed package into fresh C# and F# consumers.

A release follows one order: update CHANGELOG.md with a dated heading, set <Version> in src/IsImageUrlDotNet/IsImageUrlDotNet.fsproj, merge, wait for ci to pass on master, then tag v<version> and push the tag. release.yml tests again on Ubuntu and Windows and attests the package. It then waits for the maintainer's approval at the nuget environment, pushes to nuget.org through Trusted Publishing (no stored API key), and makes the GitHub Release. verify-published.yml then checks the published package from nuget.org on all three systems.

Notes for maintainers and agents

AGENTS.md holds the rules, the commands and the traps; ai-docs/ holds the record (start with ai-docs/HANDOFF.md). The program that produced every output on this wiki is ai-docs/notes/2026-09-29-wiki-verify.cs, with its outputs beside it, and ai-docs/notes/2026-09-29-github-wiki.md says how to update the wiki for a new release.

Clone this wiki locally