Skip to content

docs: BadgeSmith is the badge standard for every opencode-dotnet repository - #911

Merged
Blind-Striker merged 2 commits into
masterfrom
docs/badgesmith-canon
Nov 15, 2026
Merged

Blind-Striker merged 2 commits into
masterfrom
docs/badgesmith-canon

Conversation

@Blind-Striker

@Blind-Striker Blind-Striker commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

Rule

BadgeSmith (api.localstackfor.net) is the badge standard for every opencode-dotnet repository. docs/engineering/documentation.md ("Consumer documentation") gains one bullet:

Every opencode-dotnet repository's README shows its status through BadgeSmith (api.localstackfor.net): one test-result badge per CI operating system, and one nuget.org badge and one GitHub Packages badge per package a consumer installs, each with ?prerelease=true while its feed carries only prereleases. CI posts each operating system's test counts from master pushes through BadgeSmith's pinned update-test-badge action, and a failed post never fails CI; the workflow's comments own the mechanics. Each badge URL is checked live before it is committed.

The canon names no secret and no commit; .github/workflows/ci.yml's comments own the mechanics. This SDK is the reference implementation: the README badge row and package table, and the two BadgeSmith steps in ci.yml (continue-on-error, always() with the master-push guard, the action's own exit 0 on a failed post).

The SDK against the rule (checked live 2026-11-15)

BadgeSmith URL Status Message
badges/tests/linux/opencode-dotnet/opencode-sdk-dotnet/master 200 23429 passed
badges/tests/windows/opencode-dotnet/opencode-sdk-dotnet/master 200 32209 passed
badges/tests/macos/opencode-dotnet/opencode-sdk-dotnet/master 200 23429 passed
badges/packages/nuget/OpenCodeDotNet.Sdk 200 1.1.0
badges/packages/nuget/OpenCodeDotNet.Sdk.Extensions 200 1.1.0
badges/packages/github/opencode-dotnet/OpenCodeDotNet.Sdk?prerelease=true 200 2.0.0-nightly.20261115.g8693db6
badges/packages/github/opencode-dotnet/OpenCodeDotNet.Sdk.Extensions?prerelease=true 200 2.0.0-nightly.20261115.g8693db6
redirect/test-results/{linux,windows,macos}/…/master 302 to the latest master push run

Pin

The badge-smith checkout moves from d778400b to bc7ed07860ec4b0e702add6370c2636daccb2adf, which keeps the existing deploy-alignment rule: it is the latest of badge-smith's 31 production deployments with a success status (2026-10-19, deployment run 39317408114, which built and deployed that SHA); the one newer commit, aab23e8d, is documentation and was not deployed. The composite update-test-badge/action.yml and its inputs are identical at both pins and match what ci.yml passes; the tools/badgesmith.cs entry point it runs is the same blob at both pins, but the Commands/BadgeUpdateCommand.cs file it includes changed (an access-modifier change) and its Spectre.Console.Cli dependency moved from 0.55.0 to 0.57.2, so this is a real move to the deployed client, not a no-op.

Reporter glob (folded in on review)

The test reporter's path: "test-results/**/*.trx" also matched the merged/merged-*.trx reports dotnet test writes beside the per-module TRX files, and those repeat the module results, so the reporter's totals, and the counts this workflow posts to the BadgeSmith test badges, were inflated. From the artifacts of run 43761253451 (#904's merge):

Leg Direct TRX files (passed) merged/ reports add Posted
Linux 11,812 (9 files) 11,809 23,621
Windows 16,250 (12 files) 16,247 32,497

path is now test-results/*/*.trx, the files directly under main/, service-elections/ and native-aot/. The reporter at its pinned SHA expands path with fast-glob 3.3.3 (micromatch 4.0.8), where * never crosses a path separator on any runner. verify-test-roster already reads only the direct files, the artifact upload keeps test-results/**, and no repository gate asserts the reporter glob. After this merges, the badges show about 11.8k (Linux, macOS) and 16.2k (Windows).

Verification

  • This PR changes ci.yml, so it runs the full CI, including the Tools tests that read the docs.
  • Local check on Windows: slopwatch, Release build and OpenCode.Sdk.Tools.Tests (2,823 passed, 0 failed) on the first commit, and the Release build and Tools tests again after each wording change, on this head included.
  • The first master push after the test-data secret moved to the organization level (feat(hosting): ask the registered owner of an address for its state, as the CLI does (#847) #904's merge) posted on all three operating systems with HTTP 201; the per-leg evidence is in the comment below.

@Blind-Striker Blind-Striker added this to the Next milestone Nov 15, 2026
@Blind-Striker

Copy link
Copy Markdown
Collaborator Author

Org-level test-data secret verified on the first master push after the move (#904's merge, eaf9d64c, run 43761253451). The badge step is fail-soft, so a green step proves nothing; each leg's step log shows the post itself:

Leg Badge step log Badge now (cache-busted) Redirect now
Linux Successfully posted to …/tests/results/linux/opencode-dotnet/opencode-sdk-dotnet/master (HTTP 201) 23621 passed run 43761253451
macOS Successfully posted to …/tests/results/macos/… (HTTP 201) 23621 passed run 43761253451
Windows Successfully posted to …/tests/results/windows/… (HTTP 201) 32497 passed run 43761253451

Before this push the badges read 23429 / 32209 passed and pointed at run 43756205528. The badge URLs sit behind CloudFront (s-maxage=600), so the plain URL can show the previous push for up to ten minutes; the check above adds a cache-busting query parameter.

…sitory

documentation.md (Consumer documentation) records the rule: a README shows
one test-result badge per CI operating system and, per package a consumer
installs, one nuget.org and one GitHub Packages badge, each with
prerelease=true while its feed carries only prereleases; CI posts test counts
from master pushes through BadgeSmith's pinned update-test-badge action and a
failed post never fails CI; every badge URL is checked live before it is
committed. The SDK is the reference implementation.

ci.yml moves the badge-smith pin from d778400b to bc7ed07, the commit the
latest successful production deployment of api.localstackfor.net runs.
…/ reports

dotnet test also writes merged/merged-*.trx reports that repeat module
results; test-results/**/*.trx matched them, so the reporter's totals and the
BadgeSmith counts posted from them were inflated (Linux 23,621 for 11,812
tests; Windows 32,497 for 16,250). test-results/*/*.trx matches only the
per-module files directly under main/, service-elections/ and native-aot/.
@Blind-Striker
Blind-Striker added this pull request to the merge queue Nov 15, 2026
Merged via the queue into master with commit b75f112 Nov 15, 2026
17 checks passed
@Blind-Striker
Blind-Striker deleted the docs/badgesmith-canon branch November 15, 2026 23:00
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.

1 participant