CIMatrix — the on-demand OS matrix

.github/workflows/os-matrix.yml runs go2cs’s own instruments on GitHub-hosted runners, on demand, and as the stages CI on master calls. It reaches platforms the project’s own test machines do not cover — both macOS legs above all — and gives Linux a second, independent host. It is never a merge gate: the project’s own machines and their measured budgets stay authoritative, and nothing this workflow produces lands in the repository. Its timeouts are scaled from the budgets measured on the project’s own machines (Budgets).

The three fits

1. The darwin census — the one thing nothing else can do. Layout L3 emits a darwin/ folder for every platform-varying package, and -p:GoTargetOS=darwin selects it, so the flavor exists in the corpus. Nothing else builds it on Apple hardware — and there are two of those, arm64 and x64, which are different compilations of the same flavor. A darwin dispatch fans out to both, and both compile clean. Compile is the milestone, operational is later, so the census is the deliverable whether or not it is green.

2. The native-Linux control. A Linux reading taken under WSL shares its machine with a Windows host. A hosted ubuntu-latest is a second Linux with a different kernel, a different filesystem and no Windows host underneath it. A finding that reproduces on both is a property of the platform; a finding that reproduces on only one is a property of the topology. That distinction is worth a dispatch before Linux work is planned around it.

3. Sweep-shard overflow. The validated sweep is the project’s longest-running check, and moving the corpus to a new Go release multiplies it. When every machine is committed, a shard can run here instead of waiting — filtered, one dispatch per shard, results read from the artifacts.

The one schedule — the darwin regression guard

goos=darwin stage=census runs daily at 04:41 UTC, and nothing else does. It is still not a merge gate: no push trigger, no pull_request trigger, and no other flavor or stage on a timer. It is a regression guard whose conclusion is read each morning.

Why darwin and only darwin. windows and linux are each compiled by standing gates on the project’s own machines, so a mechanical break in either surfaces the day it lands. Nothing else compiles the darwin flavor. Without a schedule, a darwin-only break goes unnoticed until the next dispatch, however long that is. A darwin census dispatch took about 10 to 17 minutes on the hosted macos-15 and macos-15-intel runners in September 2026.

A scheduled event carries no inputs, so the plan job resolves the effective goos/stage/filter/dotnet once — schedule takes the fixed darwin/census pair, a dispatch takes its own inputs unchanged — and every consumer downstream reads needs.plan.outputs.* rather than inputs.*. The resolution is positive-controlled in all four arms, negative control included (with the schedule branch neutered, a schedule event falls to linux, not darwin — so the darwin in the live arm is the branch firing and not a default agreeing by luck).

Reading a red scheduled census: it is a regression attributable to that day’s merges, not a newly discovered wall. darwin compiles clean on both architectures. Root it against the day’s merges.

CI on master

.github/workflows/ci-master.yml is the automatic check on master, the branch every change lands on. Every job calls a stage of this workflow (workflow_call), so it runs with exactly the same toolchain pins and steps.

Event Jobs (each on linux and windows) Runner minutes
push to master, pull_request into master go-test, golib-tests (Release, with GOROOT exported), gen-tests about 78: golib-tests 12 and 17, gen-tests 1 and 2 (measured), go-test about 15 and 25 (provisional), and the plan jobs
nightly, 03:17 UTC behavioral-full, default mode; and behavioral-smoke over 81 projects (Mn, Select, Channel, GoCall, Defer) in M:N mode about 135: behavioral-full linux 47, windows 72; the M:N subset about 6 per leg (measured)

A newer push to the same ref cancels an older run; the nightly is never cancelled by a push. Other branches are not triggered: they use this workflow on demand. A run called this way reports workflow_call as its event in the plan job, so a nightly call is never mistaken for this workflow’s own darwin schedule. golib-tests exports GOROOT, spelled as go env GOROOT prints it, on every leg, so the tests that read a Go tree run instead of reading Inconclusive.

How to trigger

Actions → OS matrix (on demand) → Run workflow. Or from the CLI:

gh workflow run os-matrix.yml -f goos=darwin -f stage=census
gh workflow run os-matrix.yml -f goos=linux  -f stage=sweep-shard -f filter=compress/flate
Input Values Meaning
goos windows · linux · darwin The corpus flavor to bind. Each maps to a runner + RID pair; darwin fans out to BOTH mac runners (arm64 and x64) in one dispatch.
stage census · behavioral-smoke · behavioral-full · behavioral-stderr · sweep-shard · release-smoke · aot-smoke · nugetgo-behavior · golib-tests · gen-tests · solution-build · stack-probe · converter-cgo · cgo-e2e · cgo-nuget-e2e · go-test · reconvert-footprint · mn-platform What to run. One stage per dispatch. behavioral-full runs the whole behavioral enumeration in slices; behavioral-stderr runs named projects directly and keeps their whole stderr; golib-tests builds and runs src/tests/GolibTests for the GOOS on each of its runners, with filter as an MSTest --filter expression (blank runs the whole suite), and annotates each test’s outcome by name. It exports GOROOT as go env GOROOT prints it, so the tests that read a Go tree run. On a whole-suite run, the tests it reports skipped (NotExecuted, an Assert.Inconclusive) must be exactly those src/tests/GolibTests/ExpectedSkips/<rid>.txt lists by name: a newly skipped test, a listed test that ran, or a runner with no manifest fails the leg by name. A manifest line that starts with ? is a MAY-SKIP entry, for a test that decides its own skip from a measurement near its floor on that runner: either outcome passes, but a manifest with more than one, an entry whose reason does not start MAY SKIP:, or an entry for a test that did not run fails the leg by name. A whole-suite run also builds and runs src/tests/ChannelTests, golib’s channel suite, in its own step. solution-build runs dotnet build src/go2cs.slnx, every member of the converter-dev workspace, for the GOOS on each of its runners, with filter as the configuration (Release, the blank default, or Debug); it names the distinct errors by code and by project, and refuses to run where $(USERPROFILE)/go2cs exists, since a member that fell back to that deployed tree would pass against it. Off windows it leaves out each behavioral project whose [GoPlatformExclusive(...)] does not name the leg’s GOOS (the windows-native projects compile Win32 syscall surface no other GOOS has), builds a copy of the solution without them, and names each one; the windows leg builds the whole solution. stack-probe is an opt-in diagnostic that never banks: it sweeps ONE row with run-validated-sweep.ps1 -TestFilter while .github/stack-probe.ps1 takes dotnet-stack reports of that row’s converted test host at fixed offsets (filter options below). It first proves the instrument on a deliberately hung program, and fails as blind if the planted frame is missing. converter-cgo is opt-in: it runs the converter’s go test in src/go2cs on each runner, where a C compiler lets go list run cmd/cgo, with filter as a go test -run regular expression (blank selects the cgo tests), and opens its summary with the compiler go env CC names. It is the only hosted stage that gives the converter’s compiler-gated cgo tests a compiler, including cgo Phase 1’s exit gate. go-test runs the converter’s whole suite, go test ./... in src/go2cs, with the pinned Go (GOTOOLCHAIN=local) and the leg’s .NET SDK, and lists each package’s verdict and every failing test in its summary. filter may end ;cc=zig or ;cc=llvm-mingw (windows only), with an optional ;sha=HEX: the leg then downloads that pinned toolchain, refuses it unless its sha256 is the pin’s (or sha=’s, which exists to show the refusal), and only then hands it to go as CC. reconvert-footprint measures a converter change’s corpus footprint on the GOOS, one leg per GOOS (darwin runs on osx-arm64 alone, since the emission is the same bytes on either mac): two -stdlib -comments -platforms <goos>/amd64 reconverts, by the converter built at base= and by the one built at changed=, each into its own root seeded from base’s src/core, src/version.props and docs/validation, run one after the other and diffed against each other. Its artifact holds the whole diff, a numstat, a per-directory table, the GoPositionMap line count and both conversion logs. A non-empty footprint is the reading, not a failure: the step fails only when a conversion exits non-zero, either arm holds an unresolved lift marker, either arm rewrote a [module: GoManualConversion] file, or the diff has a line the script cannot attribute (.github/reconvert-footprint.ps1). mn-platform is the M:N platform read, one leg per GOOS (darwin on osx-arm64): src/tools/mnspike2/run-q1-kit.sh builds the Q1 kit’s programs with twins, plain and with the old interface switch pair and compares each twin run with its plain run, then run-mn-closure.sh converts MnHttpClosure, builds it with twins and compares its runs under GO2CS_MN=1 with go run on the runner. filter is extra MSBuild properties for the closure build (-p:Name=value, separated by spaces): a dispatch twins the standard library under the program by passing that switch there, because no tracked file may turn it on until row 10’s ruling (repoguard TestStdlibTwinsDefaultOff). Each script prints READING lines (the closure’s carry the scheduler’s peak OS threads); the step fails when either script reads FAILURE. Every run has a deadline of the scripts’ own (run-deadline.sh, Q1_TIMEOUT, 300 s, on every OS): a run still alive there has its managed stacks taken with a pinned dotnet-stack into the artifact, is killed, and reads HUNG, which fails the script.
filter free text, optional The shard. Comma-separated exact roster package names for sweep-shard (each swept with -Exact, and a name not on the roster refuses the run), a project-name substring for behavioral-smoke, comma-separated project names for behavioral-stderr. behavioral-full ignores it. Blank takes the stage’s documented default.
dotnet 10.0.x · 10.0.402 The SDK channel for setup-dotnet. Blank takes 10.0.x.
run_timeout 1-1800, optional The behavioral stages’ per-program run budget in seconds (GO2CS_RUN_TIMEOUT). Blank takes 120.
published_version a four-part go.* version, optional release-smoke only. Blank packs this tree and consumes that pack (the pre-publish gate). Set, the pack is skipped and every leg restores that version from nuget.org (the post-publish smoke).
consumer_ref a tag or branch name, optional release-smoke only. The ref whose src/tests/CSharpConsumer arm H builds unchanged. Blank takes the newest nuget-<version> release tag below the version under test. Set, it is the exception path and needs consumer_override.
consumer_override floor=<a.b.c.d>;news=<path>, optional release-smoke only, with consumer_ref: the break the override is for. Arm H checks it against the tree and its verdict reads OVERRIDE.
nugetgo_module MODULE@VERSION nugetgo-behavior only, and required there. Its sample program and mappings row must exist at src/tests/ModuleBehavior/MODULE@VERSION/ on the dispatched ref.
nugetgo_package a NuGet package version nugetgo-behavior only, and required there: the rehearsal package every row runs (e.g. 1.1.0-int.1).
nugetgo_feed a NuGet v3 feed URL, or git:REF:FOLDER, optional nugetgo-behavior only. Blank takes int.nugettest.org, where module releases are rehearsed. git:REF:FOLDER is a folder of nupkgs in this repository at a branch or commit, for a package no gallery serves: the plan resolves REF to one commit, and each leg extracts the folder and passes it to the row as a local folder feed. The go.* closure still restores from nuget.org.
nugetgo_feed_sha256 64 hex digits nugetgo-behavior with a git: feed only, and required there: the SHA-256 of the package’s nupkg in that folder. Each leg refuses a nupkg that hashes otherwise. Refused with a gallery feed.
aot_bound_minutes 1-340, optional aot-smoke only: the AOT step’s own limit. Blank takes 330 (5 h 30 m). An expired bound reads NOT MEASURED (timeout) on osx-x64 and fails the leg on linux-x64 and win-x64. A small value makes the bound fire on purpose.
arch x64 · arm64 · both goos linux only. x64, the default, is the ubuntu-latest leg (linux-x64) every linux dispatch runs; a dispatch that omits the input, and the schedule, derive the same matrix as before the input existed. arm64 runs the ubuntu-24.04-arm leg (linux-arm64) instead, and both runs the two. The plan gives the arm leg arch: arm64, which the leg binds as GoTargetArch beside GoTargetOS, so it builds the linux/arm64 flavour. census, golib-tests and sweep-shard run there. reconvert-footprint takes the input as the TARGET arch: arm64 measures the linux/arm64 emission on the arm leg and both measures linux/amd64 and linux/arm64, one leg each. behavioral-smoke, behavioral-full, behavioral-stderr and stack-probe are refused on it by name until the linux hand-owned runtime files are arm64’s, because they run converted programs. release-smoke, aot-smoke and nugetgo-behavior refuse the input: they already run every shipped RID, linux-arm64 included. (A tree with no linux-arm64/ folder under src/core runs the arm leg as a calibration: it builds the linux/amd64 flavour, runs census and golib-tests only, says calibration: YES in its environment report, and banks nothing.) Every leg that builds the corpus opens with a flavour probe (.github/flavour-probe.ps1). It reads which zgoarch_<GOARCH>.cs internal/goarch compiles, and fails the leg when that is not the arch the plan gave it (amd64 when it gave none): an unbound arm leg compiles amd64 and stops there. Before it builds, the pack job runs .github/pack-flavour-guard.ps1: it reads push-nuget’s GOOS/GOARCH pair map, refuses the pack unless linux-arm64 packs at linux/arm64 and every other RID at amd64, and runs the same probe for each pair with the -p:GoTargetOS and -p:GoTargetArch the pack passes. darwin needs no input: once src/core holds a darwin-arm64/ folder, the plan gives the osx-arm64 leg arch: arm64 on every stage the flavour probe reads, so it builds the darwin/arm64 flavour that src/_paths.ps1 gives its instruments on Apple silicon; osx-x64 stays darwin/amd64. The probe’s skip list (release-smoke, aot-smoke, nugetgo-behavior and cgo-nuget-e2e, which consume packed bytes, and reconvert-footprint, whose darwin target stays darwin/amd64) is the list the plan leaves unbound, and repoguard’s TestProbedStagesBindTheArchPathsGives holds the two equal. sweep-shard and stack-probe rows still convert at darwin/amd64 until the bank re-reads them (-Platforms, Resolve-SweepPlatforms in src/_roster.ps1). Its budgets take the mac legs’ 1.5x until its own runs replace them.
filter options ;key=value pairs after the stage’s own filter, no ; inside a value The dispatch form’s input count is guarded (Test-NugetgoBehaviorProof.ps1), so the two diagnostic stages take their options here, parsed and checked by the plan job. golib-tests: ;jit=PATTERN, a DOTNET_JitDisasm pattern; with tiering off, the JIT’s listing of each matching method is printed to the job log (e.g. FullyQualifiedName~P256FieldDifferential;jit=p256Mul p384Mul). behavioral-smoke: ;mn=1 runs the filtered programs in M:N mode (BehavioralRunner --mn: every program on the scheduler, and every selected project and its sub-libraries built with generated twins); blank or ;mn=0 is default mode. stack-probe: ROW;test=REGEX[;at=S,S] – test is required and passed as -TestFilter, which filters both sides of the compare; at is when to dump the test host, in seconds from when it starts (default 120,870; the per-test deadline is 900 s). sweep-shard, on goos darwin only: ROWS;dns=IP[,IP] sets the job’s DNS servers on every enabled network service before the sweep (an opt-in for net’s TestLookupNoSuchHost NXDOMAIN keys, which the hosted mac resolver answers late), flushes the caches, logs the effective resolver, and times NXDOMAIN for invalid.invalid through Go’s resolvers before and after as DNSPROBE lines. sweep-shard, any goos: ROWS;timeout=Nm is the sweep’s -TestTimeout in whole minutes, 1-180 (blank takes 45m); the script’s per-row $longTimeouts floors still win over a smaller value. It exists for a row whose own test sizes a wait from its deadline: internal/poll’s TestSplicePipePool waits 0.9 x the deadline, so at 45m it outlasts the row’s 30m per-test floor and is cut before its disclosed failure prints. reconvert-footprint: ;base=SHA;changed=SHA, both required and both full 40-digit SHAs, with nothing before the first ;; a short SHA is refused, because the reading names the commits it measured. base equal to changed is the determinism control and must read 0 files. An unknown or repeated key, an empty value, or an option on any other stage fails the plan by name.

There is no all value: one dispatch per flavor keeps each leg’s artifacts, budget and verdict separate, which is what makes a wall readable. Dispatching all three is three cheap clicks.

The Go toolchain is derived, never written here — the workflow reads <GoStdLibVersion> out of src/version.props and hands that exact release to setup-go. Both the converter and the sweep refuse a toolchain whose release differs from that pin (such a run is NOT MEASURED, never a verdict), so a hardcoded version in CI could only duplicate the pin or silently contradict it.

The stages

census — compile the corpus flavor and bucket the wall

Builds src/go2cs-stdlib.slnx at -c Debug -m --no-incremental -p:GoTargetOS=<goos> -p:UseSharedCompilation=false -clp:ErrorsOnly. --no-incremental is not optional for a target-changing pass: what differs between flavors is the <Compile> item set, not any source timestamp, so an incremental build validates the other target’s assemblies.

It then reports the census the way the repository measures one — packages-compiling first: projects under src/core, assemblies actually produced (each project’s own bin/Debug/<TargetFramework>/<AssemblyName>.dll — the probe derives that folder rather than spelling it, so a target-framework change cannot make it report zero on a green build), diagnostics bucketed by code (raw and distinct), the same buckets by project, and the first distinct errors inline. Everything lands in the job summary and in the artifact. Raw error count is deliberately not the headline: fixing a file-inclusion defect raises it by surfacing what was hiding behind the failure.

behavioral-smoke — prove the harness runs on the runner

Builds the converter explicitly (go build in src/go2cs) and then runs a filtered run-behavioral.ps1 pass over a small pure-compute family — the Defer projects by default: defer/panic/recover ordering printed through fmt, with no clock, filesystem or socket in them, so a failure indicts the harness or the corpus flavor rather than platform semantics.

filter is a project-name substring or a|b|c alternatives; a filter that selects no project fails by name. The run is in default mode unless filter ends ;mn=1, which passes BehavioralRunner --mn. The runner then sets GO2CS_MN=1 and the exact GoTwinsFor list itself, and prints its mode; a default run clears any inherited GO2CS_MN or GoTwinsFor and says so. MnMixedStorm;mn=1 also runs the storm directly at three sizes beside Go’s build: each run has a deadline (MN_DIRECT_DEADLINE_S, 180 s), and a run past it (named HANG), a non-zero exit, or an output differing from Go’s fails the step by name, after every arm has printed its reading.

The explicit converter build is there on purpose. A hosted runner has no go2cs binary at all, and every harness rebuild predicate keys on a converter *.go being newer than the binary — which a toolchain change never touches. Building it as its own step also separates a Go-toolchain failure from a harness failure in the log.

sweep-shard — a filtered validated sweep against go test

Runs run-validated-sweep.ps1 -Filter <name> -Exact under pwsh once for each roster package named in the filter, with setup-go supplying the go test -json baseline toolchain the comparison needs. container/heap is the default filter, a small, quick row, and the right answer to “does a sweep run here at all”. Per-row evidence (each swept package’s comparison record and results files) is collected into the artifact under rows/, alongside the full log and a post-sweep git status of src/core.

Keep shards small. The sweep’s own per-package deadline floors reach into the hours, and the job budget is a ceiling, not an allowance.

release-smoke — consume a rehearsal feed the way a user does

The release’s own pack, rehearsed, then consumed on the chosen flavor’s legs. A pack job on windows-latest runs push-nuget.ps1 -VersionSuffix ci.<run id> under Windows PowerShell — pack-only by the script’s own contract (no bump, no tag, nothing under docs/validation, no push) — and packs every package as a prerelease of the release the tree would publish next, <GoStdLibVersion>.<GoBuildNumber + 1>-ci.<run id> (GoBuildNumber is the last-published build; go.lib.targets reads a prerelease as its release, so a pack labelled with the published build fails every consumer’s GO2CS3002 once <GoBreakFloor> names the release in development, and the pack’s own “Pack floor” check refuses it). It uploads the merged packages as the release-smoke-feed artifact. It is the only Release-configuration build of the darwin flavor anywhere. The stage fans out to ALL FIVE shipped RIDs (win-x64, linux-x64, linux-arm64, osx-arm64, osx-x64) from that one pack, whatever goos says. Each leg then runs src/tests/PackageTests/release-smoke.ps1 against the feed, every arm restoring into a fresh cache with go.* mapped to the feed alone:

A leg is green when arms A-D, G, H and L pass. Dispatch it at the tree that ships, before every release: it is what proves the packages carry what that tree’s converter emits on every OS (a converter that emits a runtime API the packages lack fails here). The pack job’s budget is its own (240 min; measured 38-53 min).

The cgo job, release-smoke cgo, one per shipped RID, runs beside pack and the legs on every release-smoke; no input turns it on or off. A -cgo conversion is one package and builds against a go2cs clone, never the go.* packages, so the job reads the tree the release is cut from, not the feed. Go builds cgo Phase 3’s end-to-end program with the runner’s C compiler (gcc, clang on macOS) and the probe library (.github/cgo-probe.ps1, cgo-e2e’s own build), go2cs converts, builds and runs it, and every arm is read both ways: TestCgoPhase3ProgramRunsAsGoDoes, cgo-e2e’s own test, through .github/release-smoke-cgo.ps1. It is green only when the test passed and every arm that started passed, so a skip or a renamed test reads red. It gates: a release-smoke dispatch is green when its legs and its five cgo jobs are.

After the publish, the same stage with published_version set to the version just pushed (-f published_version=<version>) skips the pack and runs the same arms on the same five RIDs against nuget.org itself, go.* and everything else restored from there: the release as a user receives it. It is dispatchable once every id in the walkthrough’s restore closure is listed (a partial index fails restore loudly, NU1102). The input is refused on any other stage and must be four numeric parts.

aot-smoke — a Native AOT publish of a package consumer

The same pack job, then ONE Native AOT publish and run of PackageSymbols (a hand-written consumer that sets no trim mode of its own) on all FIVE shipped RIDs (win-x64, linux-x64, linux-arm64, osx-arm64, osx-x64): test-package-symbols.ps1 -AotOnly. The executable must exit 0 and print its PACKAGE-SYMBOLS line (the value printed, not judged); the publish wall time is a READ line, and so are two ILC readings, measured and not judged: READ (ILC cycle-cutoff methods) (distinct “will always throw” lines ILC logs when it cuts a self-nesting generic instantiation) and READ (IlcCompile ms) (from MSBuild’s performance summary). The cut-off count is deterministic; IlcCompile is not (measured 2026-10-14: one tree read 7,001 s and 5,444 s on hosted linux, a 22% spread, and 6,340 s and 9,897 s on hosted windows, a 56% spread; runs 38555847362 and 38576996407), so a single-run IlcCompile comparison is read against its RID’s band. A consumer takes go.lib’s TrimMode=partial default, under which the publish compiles every referenced go.* assembly whole. For this fixture’s 31 assemblies that takes about 3 min on hosted linux and windows, 6 on osx-arm64 and 11 on osx-x64, with 0 cycle cut-offs on every RID, since golib’s generic-cycle fix (2026-10-14) broke ILC’s generic cycle in golib (runs 38575258530 and 38587876788). It is read before every release like the census, and a red holds the release. It reads this tree’s pack only: published_version is refused for it. osx-arm64 is read, and gates like linux-x64 and win-x64. On the hosted macos-15 (3-core arm64) runner it publishes in about 6 min (run 38587876788). osx-x64 is BOUNDED, not open-ended. The AOT step stops at aot_bound_minutes (330 by default), inside the 6 hours a hosted job may run. On osx-x64 the step is continue-on-error and the next step turns an expired bound into “NOT MEASURED (timeout)” with exit 0, while a publish that ENDED with a non-zero exit stays red. linux-x64 and win-x64 keep their gate: an expired bound fails them.

nugetgo-behavior — one sample row per shipped RID

A third-party module with no Go tests cannot be validated by go2cs -recurse -tests, so its nugetgo package ships a behavioral proof: one row per shipped RID, each written ON a host of that RID. A module WITH Go tests may carry the same rows beside its test proof, never in its place: its page gains a “Sample behavior” section and its README a Sample behavior badge, and the rows replace a local-feed sample run in the module publishing procedure. No row is inferred from another, so the stage runs the same five legs as release-smoke, whatever goos says, with no pack. Each leg builds the converter and runs src/tools/nugetgo/Invoke-NugetgoBehaviorRow.ps1: the sample program under src/tests/ModuleBehavior/MODULE@VERSION/ is run with go run, converted against nugetgo_package on nugetgo_feed, built with -r <rid> and run with dotnet. The row records both outputs’ hashes, the module assembly that loaded, the RID the host’s dotnet reports, the GOOS go reports, and the host as the runner label, ImageOS and ImageVersion. The leg exits non-zero when the outputs differ; the row is still written, as the evidence.

The row is annotated in its OWN step as one base64 notice titled nugetgo-row <rid>, and kept in the artifact. src/tools/nugetgo/Get-NugetgoBehaviorRows.ps1 -RunId <id> -OutDir <dir> reads the rows back through the annotations API, and nugetgo-pack.ps1 -BehaviorProofDir <dir> binds each to the bytes the release packs for its RID. The plan refuses the three nugetgo_* inputs on any other stage, a malformed value, and a module with no sample at the dispatched ref.

gh workflow run os-matrix.yml -f stage=nugetgo-behavior \
  -f nugetgo_module=github.com/inconshreveable/mousetrap@v1.1.0 -f nugetgo_package=1.1.0-int.1

cgo-nuget-e2e — a third-party cgo module, packed and consumed on every shipped RID (opt-in)

The hosted proof that a cgo package can ship as a nugetgo package against the go.* packages: it packs github.com/mattn/go-pointer v0.0.1, a real third-party cgo module, and runs it on all five shipped RIDs. It is OPT-IN: no schedule starts it, and it never runs as part of another stage. goos and filter are ignored.

The legs provision the OS’s default pinned C toolchain (.github/cgo-toolchain.ps1: zig, llvm-mingw on windows), because go run and the sample’s conversion both load go-pointer with cgo on. The built program needs none. Every artifact is named with the run’s suffix, and no feed outside the run’s artifacts is written.

-f filter=';feedrun=<run id>' reuses that run’s J1 feed instead of packing again, which saves the hour and more that J1 takes. The plan allows it only when what J1 packs is the same at both commits: the git tree of every entry under src/ except src/go2cs, src/tests and src/archived, plus global.json, .github/pack-flavour-guard.ps1 and the pack job’s own text. On any difference it names the paths in a warning and runs J1. J2’s and J3’s summaries state the reuse. A reused feed is never a release reading, and INC 4’s final reading runs J1 fresh.

gh workflow run os-matrix.yml -f stage=cgo-nuget-e2e -f goos=linux

Results flow

Nothing is automatic and nothing is written back. Every leg uploads an artifacts/ bundle (7-day retention, uploaded on failure too) and writes its headline table into the run’s job summary, so a verdict is readable without downloading anything.

Every leg ALSO echoes its summary as annotations (.github/annotate-summary.ps1). That is not decoration: a job summary and an uploaded artifact are both served from GitHub’s Azure blob storage, reached by a redirect from the GitHub API, so a host whose egress policy allows the API and denies that storage domain — which is the position a restricted-egress cloud host is in — can dispatch a run, read every job and step conclusion, and not one line of what the run measured. Annotations come back from GET /repos/{owner}/{repo}/check-runs/{id}/annotations as JSON from the API itself, so the headline survives that block, and it lands on the run page where a reader sees it without opening the summary tab. The summary and the artifact are still written in full; this is a second, cheaper-to-read copy. GitHub caps annotations at ten per level per step, so the helper packs the text into a few chunks, stays clear of the length cap, and — when a summary is longer than the budget — says how much it dropped rather than truncating silently.

A sweep-shard summary carries, above its tail, each FAILING row’s comparison record as lines: its status, how many verdicts matched, how many are disclosed, the undisclosed divergence count, and the first 40 undisclosed divergences with both verdicts, each followed by the C# side’s first 8 failing lines from the row’s go2cs_test_results.json (Get-ComparisonDivergenceLines, src/_roster.ps1, guarded by src/tests/sweep-row-divergence-selftest.ps1). The C# FAIL listing in the log shows one shape only; a Go pass / C# skip divergence, a Go skip / C# pass one or a one-sided row is readable from these lines alone on a host that cannot fetch the artifact.

Report a result in the repository’s terms. If you trigger a run, read the summary, download the artifact if the detail matters, and report the finding the way the repository measures it — a census as a census (assemblies produced, buckets by code), a sweep row as its arithmetic.

Read a sweep row from its comparison record, never from its pass line: the disclosed count is not on the pass line, so a row summarized from it under-reports by exactly the disclosures — and a disclosure count is half of what makes a row honest.

Reading a run

What this is NOT

Budgets

Stage Base macOS legs Scaled from
census 150 min 225 min The full stdlib solution build --no-incremental on the project’s slowest anchored machine, plus a cold NuGet restore of every project.
behavioral-smoke 90 min 135 min Converter go build plus a filtered four-phase run whose shared core closure is built from nothing.
behavioral-full 150 min 225 min The whole behavioral enumeration in slices, with a purge between. Provisional.
behavioral-stderr 60 min 90 min Converter go build, a transpile and compile of a handful of named projects, and one direct run of each. Provisional.
sweep-shard 210 min 315 min One convert/build/run/compare cycle per matched row; the sweep’s own per-package floors are the reason this is the largest.
golib-tests 90 min 135 min One Release build of GolibTests and its core closure for the GOOS, from cold, then dotnet test (the whole suite, or a --filter). Provisional.
gen-tests 30 min 45 min One Release build of GenTests (go2cs-gen and golib), from cold, then dotnet test (the whole suite, or a --filter). Provisional.
solution-build 60 min 90 min One cold build of src/go2cs.slnx: golib, go2cs-gen, the test projects, every behavioral and performance member and their core closure. Provisional.
stack-probe 90 min 135 min One row’s -tests convert and build, the filtered compare, and up to the 900 s per-test deadline while the probe waits. Provisional.
go-test 60 min 90 min go test ./... in src/go2cs: about 11 minutes of tests on a host without .NET, plus the arms that need one. Provisional.
reconvert-footprint 60 min 90 min Two converter go builds and two full -stdlib conversions, one after the other, two seeded roots extracted from git, and one diff. Measured whole jobs: linux 8 and 9 min (runs 45107298207, 45109219711), windows 15 min (45109222613), darwin on osx-arm64 18 min (45109225319); the two conversions are 160-400 s each.
mn-platform 150 min 225 min The Q1 kit (22 Release builds of small programs, one at a time: about 20 min on a 4-core cloud box), then the closure: one converter go build, a -recurse conversion and a twinned build of its standard library closure (about 15 min on that box). Provisional.
converter-cgo 15 min 23 min The converter’s go test filtered to its cgo tests: one cold module download and build, plus one converter go build for the driver-level arms. Provisional.
cgo-e2e 75 min 113 min cgo’s end-to-end gate: a cgo program is built by Go and converted by go2cs with the leg’s C compiler, the converted project is built with the .NET SDK, and each check is run both ways and compared. Its go test deadline is 60 minutes on every GOOS (40 until 2026-11-28, when darwin crossed it as a pattern: the gate program’s build alone takes 12 to 14 minutes on osx-x64). Provisional.
release-smoke 90 min 135 min The leg only: converter go build plus eight small restore/build/run arms. The pack job (windows, 240 min) is separate. Provisional.
release-smoke cgo job 80 min 80 min One per shipped RID, beside the legs: one cold module download and converter test build, the probe library, and cgo-e2e’s Phase 3 test alone, which builds golib and the converted closure cold, under cgo-e2e’s 60-minute go test deadline. cgo-e2e’s darwin jobs, which run more tests, cross 40 minutes since 2026-11-28 (osx-x64). Provisional.
cgo-nuget-e2e 90 min 135 min J3’s leg: the nugetgo-behavior row’s shape plus the pinned C toolchain’s download, and on win-x64 a second row for R-a. pack (J1, windows, 240 min) and J2 (linux, 90 min) are separate jobs. PROVISIONAL until the first run.
nugetgo-behavior 90 min 135 min The leg: converter go build, one go run, one conversion against the feed, and one cold restore, build and run of the sample. release-smoke’s leg is the closest shape. Provisional.
aot-smoke 240 min 360 min The leg only, five RIDs: one Native AOT publish of a 31-package consumer under TrimMode=partial – linux 56, windows 71, osx-x64 293 min before golib’s generic-cycle fix (37523439849, where osx-arm64 did not finish in 360); after it, linux 212 s, windows 167 s, osx-arm64 354 s (38587876788), osx-x64 654 s (38575258530).

The macOS multiplier is 1.5x because macos-15 (arm64) is a 3-core runner and every phase here is parallel-MSBuild bound. GitHub’s hard ceiling for a hosted job is 360 minutes and every value stays under it. A timeout is a safety net against a hung child, never a performance assumption — these sit well above the top of each scaled range on purpose.

BehavioralRunner carries its own budgets that no caller-side timeout can influence, so the smoke stage sets them explicitly through their documented environment variables (GO2CS_BUILD_TIMEOUT and friends), sized for a cold four-core runner where the Transpile phase rewrites every .cs immediately before Compile and warm state can never make the run a no-op.

Notes on the darwin legs

What a darwin leg establishes, and what it cannot, so a failure is recognized rather than re-diagnosed: