Skip to content

Measure the conditions of a package that declares a function once per platform - #1064

Merged
jmrplens merged 2 commits into
issue-1042-config-gatefrom
issue-1017-gobco-staging
Sep 29, 2026
Merged

jmrplens merged 2 commits into
issue-1042-config-gatefrom
issue-1017-gobco-staging

Conversation

@jmrplens

@jmrplens jmrplens commented Sep 29, 2026 •

Copy link
Copy Markdown
Owner

make coverage-conditions PKG=./cmd/server panicked before measuring anything, so the condition half of the gate had never run on the server, and the same was true of internal/toolutil and the e2e harness. gobco v1.3.4, the latest release, parses every .go file of a directory and type-checks them as one package, ignoring //go:build lines and _windows.go names alike, so a function declared once per platform is a redeclaration panic. This is the tooling half of #1017: it makes the gate measure those packages on the platform it runs on, and says what it still cannot measure. Closing the conditions it now reports, and measuring the other platforms, is later work, listed at the end.

The recipe stages a copy of the module. scripts/coverage-conditions.sh, which the target now calls, copies the module into a temporary directory (without .git, .claude/worktrees, node_modules and dist), removes from the package's copy every .go file go list does not report as built here, runs gobco on the package there, names what it left out, and removes the copy whatever happens, an interrupt included. It is a copy of the module and not of the package because gobco reaches an external test package through the import path those tests name: a package copied under another path hands them the uninstrumented original (internal/toolutil failed to build that way, undefined: toolutil.GobcoCover), and tests read docs/, the root's files and their own directory's name, all of which the copy keeps where they were.

Only the constraint lines gobco would misjudge are blanked. gobco chooses which parsed files to instrument with a build context holding only GOOS and GOARCH. That context reads a constraint naming only operating systems, architectures and unix exactly as the go command does, and rejects one naming a tag, a release, cgo or the compiler, which would compile the file and leave its conditions out of a report that still reads complete. So the copy blanks those lines and no others, line for line, so every position is the original's, and a package holding such a file is staged for that reason alone. A package with neither kind of file runs where it is, exactly as before, a constraint on the platform alone included: internal/tools/packages, whose one constrained file is behind //go:build !windows, runs in place (300/302, 42 s), and internal/config still reports 424/424 in 4 s.

A run whose figure means nothing says so, in one line a caller can pick out. TAGS=<tag> reaches go list and gobco's go test alike, and a package whose tests the build context leaves out is refused with a pointer to it. A report of Condition coverage: 0/0 is refused, since it is what gobco prints when no test wrote its counts and when it declined every file. A gobco that exits non-zero, staged or not, is said to have printed no measurement, and a staged run then names what the staging changed: the blanked constraint lines first, since a test that reads its own files' headers fails on exactly those, then what the copy left out.

make check-spec-conditions runs gobco through the same script, so a package with a file per platform is measured there instead of reported as not measured, and gobco's version is pinned in one place, scripts/coverage-conditions.sh. A package it reports as not measured is reported with the recipe's own verdict (or gobco's panic line) rather than the first line of output, which a staged run opens with its notice. scripts/check_spec_conditions_sh_test.py is new and holds that in a throwaway repository against a stand-in recipe.

The upstream register follows. Row 73 of docs/development/upstream-bugs.md, recorded on main when I reported the gobco defect as rillig/gobco#40 and sent the fix as rillig/gobco#41, described this change as still to come. Its blocking and workaround notes now say what the staged copy measures, that the harness and the other platforms' halves stay unmeasured, and that the pin to move when a gobco release carries the fix is the one in scripts/coverage-conditions.sh.

Measured through the script on linux/amd64:

package before after
cmd/server panic (peerStdinIsNull redeclared) 1990/2032 (42 left), staged, five files left out, 210 s
internal/toolutil panic (syncDirectory redeclared) 3604/3782 (178 left), staged, two files left out, 49 s
internal/tools/packages 300/302, where it is 300/302, where it is, 42 s
internal/config 424/424 424/424, where it is, 4 s
test/e2e/internal/harness (TAGS=e2e) panic (serverBuildArgs redeclared) not a measurement (below)

The script's own tests: scripts/coverage_conditions_sh_test.py (17 cases) and scripts/check_spec_conditions_sh_test.py (3), each case that holds a change checked to fail against the script before it; shellcheck is clean on all three scripts.

Decisions I took here

  • A package gobco could already read runs in place, unstaged, so every figure measured before this change stays what it was. Staging is triggered only by a file the go command does not build here or by a built file whose constraint names more than the platform.
  • The copy lives in the temporary directory rather than beside the package, so a run killed before its trap leaves a copy there rather than a second copy of every package in the checkout.
  • A package whose only tests the build context leaves out is refused rather than reported, since its report would be empty or all "never evaluated". A package with no tests at all is reported as before.
  • For the harness I chose the hint over refusing up front: no general rule tells which packages have tests that read their own file headers, so the run is allowed, and its failure names the blanked lines.

What this leaves open under #1017

  • The Windows and macOS halves are not measured. The five files the copy leaves out of cmd/server (the Windows socket-mode, connection-refused and transport halves and the non-Linux probe) and the two of internal/toolutil (the non-Unix download and file halves) build only on another platform, and nothing runs gobco on Windows or macOS. The script says so in its notice rather than claiming they are measured elsewhere. A reporting step on the Windows and macOS legs of the cross-platform matrix is the follow-up.
  • The conditions the gate now reports are not closed here. cmd/server has 42 evaluated only one way (main.go 11, bearer_guard.go 5, and one to three in fourteen other files), which belong to the change that next takes cmd/server to its gate. internal/toolutil's 178 are taken by One helper for a BasicUser completed from the captured answer, instead of three copies #1028 further up this stack, which brings the package to 3716 of 3716.
  • The e2e harness waits on gobco. Under TAGS=e2e it compiles and its tests run in the copy, but every file sits behind e2e, so every constraint line is blanked, and its own TestSources_EveryFile_CarriesExactlyTheE2EConstraint fails on the blank lines. The run prints 863/1162 and then says that figure is not a measurement, naming the blanked lines as the cause. Without blanking gobco declines every file (0/0). What unblocks it is gobco evaluating constraints with the tags its go test is given, which is the second half of Honor build constraints and build tags when selecting the files to instrument rillig/gobco#41; with that fix the harness measures 863 of 1162, and the one test that then fails on gobco's own generated files, which carry no //go:build e2e, is ours to exempt.

Part of #1017.

@sourcery-ai sourcery-ai Bot 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.

Sorry @jmrplens, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 1 day and 9 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 47 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: jmrplens/gitlab-mcp-server/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 51d94094-e9d2-43d7-9fe0-ebe9d67e5437

📥 Commits

Reviewing files that changed from the base of the PR and between 93eb912 and 29cee5e.

📒 Files selected for processing (12)
  • .github/agents/test-expert.agent.md
  • .github/skills/increase-test-coverage/SKILL.md
  • .github/workflows/ci.yml
  • .gitignore
  • Makefile
  • docs/development/static-analysis.md
  • docs/development/testing/README.md
  • docs/development/upstream-bugs.md
  • scripts/check-spec-conditions.sh
  • scripts/check_spec_conditions_sh_test.py
  • scripts/coverage-conditions.sh
  • scripts/coverage_conditions_sh_test.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the ci Build pipeline, workflows, or lint configuration label Sep 29, 2026
@jmrplens
jmrplens added this pull request to stack #1075 September 29, 2026 00:22
@jmrplens jmrplens added the v3.1.0 Targeted at the 3.1.0 release label Sep 29, 2026
@jmrplens jmrplens added this to the 3.1.0 milestone Sep 29, 2026
@jmrplens jmrplens changed the title issue 1017 gobco staging Measure the conditions of a package that declares a function once per platform Sep 29, 2026
…tforms

gobco v1.3.4, the latest release, parses every .go file of a directory
with go/parser.ParseDir and type-checks them together, whatever a
//go:build line or a _windows.go name says. A package that declares a
function once per platform therefore dies with a redeclaration panic
before anything is measured, and three packages here are in that shape:
cmd/server (peerStdinIsNull, bindUnixSocket, isConnRefused),
internal/toolutil (syncDirectory, openLeafNoFollow, createNewLeafNoFollow)
and test/e2e/internal/harness (serverBuildArgs, split on the race
detector). `make coverage-conditions PKG=./cmd/server` panicked, so the
condition half of the house gate had never been run on the server.

The recipe moves to scripts/coverage-conditions.sh. A package whose
directory holds a .go file the go command does not build is staged: the
module is copied into a temporary directory, leaving out .git,
.claude/worktrees, node_modules and the top-level dist, those files are
removed from the package's copy, gobco runs on the package there, the
files left out are named as not measured by this run, and the copy is
removed whatever happens. The copy is of the module rather than of the
package because gobco reaches an external test package through the
import path those tests name, and a copy under another path hands them
the uninstrumented original (internal/toolutil failed that way,
undefined: toolutil.GobcoCover); tests also read docs/, the root's files
and their own directory's name, which a copy of the module keeps. The
files to remove are the complement of what go list says it builds, since
ParseDir also reads a name starting with a dot or an underscore that
IgnoredGoFiles never lists.

gobco decides what to instrument with a go/build.Context holding only
GOOS and GOARCH, which reads a constraint naming only operating systems,
architectures and unix as the go command does and rejects one naming a
tag, a release, cgo or the compiler: that file would be compiled and its
conditions silently missing. The copy blanks those constraint lines and
no others, line for line, so positions stay the original's, and a
package holding such a file is staged for that reason alone. A package
with neither kind of file, a constraint on the platform alone included,
runs where it is, as before.

TAGS=<tag> reaches go list and gobco's go test alike, a package whose
tests the build context leaves out is refused with a pointer to it, and
a report that measured no condition (Condition coverage: 0/0) is refused
rather than passed on. A gobco that exits non-zero is said, in one line,
to have printed no measurement; a staged run then names the blanked
constraint lines as the likely cause, since a test reading its own
headers fails on them (the e2e harness does), and what the copy leaves
out.

scripts/check-spec-conditions.sh runs gobco through the script, so a
package in this shape is measured there instead of reported as not
measured, the gobco version is pinned in one place, and a package it
cannot measure is reported with the script's own verdict rather than the
staging notice that opens the output. scripts/check_spec_conditions_sh_test.py
holds that.

Measured through rgo on linux/amd64: cmd/server 1990/2032 (five files
left out, nothing blanked, 210 s), internal/toolutil 3604/3782 (two files
left out, 49 s), internal/tools/packages 300/302 run where it is,
internal/config 424/424 run where it is. The e2e harness stays
unmeasured until gobco honours build tags, and the Windows and macOS
halves stay unmeasured until something runs gobco there.

Part of #1017.
…ile per platform

The testing README said gobco could not analyse a package with
build-constrained files at all and that cmd/server and internal/toolutil
were covered by mutation testing only. That paragraph is rewritten
rather than joined by a second one: it names the three packages in that
shape and their paired declarations, says what
scripts/coverage-conditions.sh stages, why the copy is of the module and
which constraint lines it blanks, and gives the figures it measured
(cmd/server 1990/2032, internal/toolutil 3604/3782, internal/config
424/424 unchanged). Two paragraphs say what stays open: the Windows and
non-Linux halves the copy leaves out, which nothing measures today, and
the e2e harness, whose own source checks fail on the blanked lines until
gobco honours build tags. The check-spec-conditions paragraph and the
static-analysis row say that gate runs gobco through the same script,
and the coverage skill and the test agent say where gobco's version is
pinned and how a package behind a tag is measured.

Row 73 of the upstream register, the gobco defect this works around, said
the gate could not measure the three packages and that issue 1017 would.
Its workaround and blocking notes now say what the staged copy measures,
that the harness and the other platforms' halves stay unmeasured, and
that the pin to move lives in scripts/coverage-conditions.sh.

Part of #1017.
@jmrplens
jmrplens force-pushed the issue-1017-gobco-staging branch from 43a3f59 to 29cee5e Compare September 29, 2026 00:42
@sonarqubecloud

Copy link
Copy Markdown

@jmrplens
jmrplens merged commit 0ea4abd into main Sep 29, 2026
6 checks passed
@jmrplens
jmrplens deleted the issue-1017-gobco-staging branch September 29, 2026 03:02
jmrplens added a commit that referenced this pull request Oct 6, 2026
…es only Windows and macOS build (#1206)

#1064 made the condition gate able to read `cmd/server` at all, by
measuring it in a staged copy of the module without the files Linux does
not build, and #1017 stayed open for what that left. Two things: the
conditions and mutants of `cmd/server` that no test decided, and the
files a Linux run leaves out, which nothing measured anywhere. This
closes both.

## cmd/server on Linux

At e19b579 gobco measured 2229 of 2270 conditions of `cmd/server` both
ways. The 41 left are the list #1089 carried, less one closed since.
Every one is answered here: the package now measures 2236 of 2236, the
total lower because some conditions were removed rather than tested. The
whole package was then put through gremlins, which had only ever run on
the files a change touched. That run found 10 lived mutants and 1 timed
out, all answered below. Its not-covered mutants sit where gremlins has
no statement counter to read, and every one of them that compiles was
applied by hand and fails the suite (see Measured).

Most of the answer is tests, each for a case nothing exercised: a
shorter block checked after a longer one (`longestAuthBlock`), the
guard's two refusals with no rejected-token cache, a challenge with no
scope or no metadata URL, a capture of a handler that wrote nothing, a
pseudo-version whose patch overflows an int, request ids a decoder never
hands over (an unterminated string, `+1`, `4-2`), both credentials on a
terminal, a public URL that does not parse, an instance list entry with
no host, the singular `gitlabURL` field, a prebuilt catalog on the
dynamic and meta surfaces, a second `WriteHeader` and a second stop of
the SSE heartbeat, a card preflight that names no header, a lone `-`
among a peer's arguments, a probe target that does not parse, a peer
that exited between being listed and having its command line read,
`WithGroup("")`, `forget` among two shapes, a shape registry with no
registration hook, a staging descriptor that names something other than
a directory, closing a socket whose path is already gone, a listen
carrying prompts or resource list-changed beside its resources, and the
telemetry tool-name flag not registered at all. The Cygwin half of the
terminal check is false on every platform but Windows, so it is reached
through a seam, `isCygwinTerminal`, as `osExecutable` already is.

Some conditions could never take their other value, and those are code
changes rather than tests:

- `transportBudget.window` tested `effectiveWindow <= 0`, which
`newTransportBudget` has already resolved to the default, so a budget
that exists answers its own window. That is the lived mutant #1017
named, and the window now falls back in two places rather than the three
`AUB-002` described, so its comment in `internal/tenancy` says two (#958
owns the rest of that).
- `requireExplicitInstance` tested for a nil request, which an HTTP
handler is never given; `securityHeadersMiddleware` tested for a nil
body, which net/http never hands a server; `newReadinessGate` tested for
a nil context, which no caller passes; `listenUnix` tested
`filepath.Dir` for an empty string, which it never returns; and both
`Serve` loops tested their error for nil, which `Serve` never returns.
- `isUnixSocketAddr` asked about the native separator and then about
`/`, so on every platform but Windows the second question was reached
only when the first had said no to the same byte. One
`strings.ContainsAny` asks both.
- `sdkLogHandler.WithGroup("")` now returns the receiver, as slog's
contract for the method says. Passing the empty name on was not
harmless: the JSON handler opens a group with no name for it, so the
attributes after it were nested under `""` while this handler, seeing no
group, still renamed them. The Logger never forwards an empty name, so
nothing served changes.

The rest are mutants that no input can tell from the original, which is
the code saying it carries something it does not need: a capacity hint
in `publicPaths`, a `servers` counter in `runProbe` that only ever meant
"a failure was recorded", an `n > 0` guard before a scan that answers
false for no bytes, a `len(commit) > 7` before a cut that `min` makes,
an `IndexByte` boundary that `strings.Cut` replaces, a deadline
comparison `context.WithTimeout` already makes, a `sort.Slice` `<` that
`cmp.Compare` replaces, the two branches of `metricHostsFor` that
answered the environment's instance the same way, and the check that
skips the catalog text rewriter when there is nothing to substitute,
which now lives in `catalogTextRewriter` with a test of its own. The SSE
heartbeat's idleness boundary took a parameter instead: `writeKeepAlive`
is handed the tick it answers, so a test holds the exact interval, which
a call to `time.Since` cannot. The readiness gate's exemption for
unmarked connections timed out rather than dying, because its mutant
deadlocks registration and the first test to register waited for it
without a bound; that helper now waits at most
`testHTTPLivenessTimeout`, and the mutant is killed in 37 seconds.

Eleven tagless switches had a case expression gremlins reports as not
covered, since a case expression carries no statement counter of its
own. They are rewritten as the chains of returns or ifs the repository
already uses for that reason (`isRequestID`, `validateTLSFiles`,
`metricHostsFor`, `prepareStdioCatalog` twice, `shutdownHTTPServer`,
`parseProbeTarget`, `sanitizedInput.Read` and `readLine`,
`logKeyringChoice`, `inferTransport`). `sanitizedInput.Read` gave its
line handling to an `accept` method on the way, which golangci-lint's
nesting rule asked for.

## The Windows and macOS halves, in CI

The cross-platform job's Windows and macOS legs now run
`scripts/coverage-conditions.sh` on `cmd/server` and `internal/toolutil`
through bash, not make, with `GOBCO_GATE=beyond:linux/amd64`. **The step
gates.** It fails the leg on a condition not evaluated both ways in a
file that leg builds and linux/amd64 does not, and prints, counts and
passes one in a file Linux builds too. Holding the shared files there as
well would fail a leg over a test the platform skips, for a condition
the Linux run decides both ways: measured on Windows, that is 20
conditions of `cmd/server` and 12 of `internal/toolutil`, every one of
them both ways on Linux. That Linux run is the local one,
`GOBCO_GATE=all make coverage-conditions`, which every touched package
passes before it is committed. No CI step runs gobco on Linux, before
this change or after it, so the shared files are held by that run and
not by CI; the step's comment and the testing README say so.

The script gained what the step needs. `GOBCO_GATE` makes the report a
gate: unset it passes whatever it found, as before; `all` fails on any
condition gobco names as never true, never false or never evaluated,
which is the gate a touched package is held to locally;
`beyond:GOOS/GOARCH` holds only the files the named platform does not
build, asked of the go command under that platform and the same tags. A
value it cannot read is refused before gobco runs. `GOBCO_TEST_FLAGS`
hands gobco's `go test` flags of its own, here `-timeout=30m`, since
gobco runs it with go test's ten-minute default and `cmd/server` is
about three times slower on Windows.

Windows builds four sources of `cmd/server` Linux does not
(`conn_refused_windows.go`, `socket_mode_windows.go`, `probe_other.go`,
`descriptor_limit_other.go`) and two of `internal/toolutil`
(`download_output_other.go`, `file_utils_other.go`); macOS builds only
`probe_other.go` beyond Linux. Two of them carry conditions. The
connection-refused check's two operands were already decided by its own
test. The Windows listen's failure was decided by nothing, so
`socket_mode_windows_test.go` now binds under a directory that does not
exist, and binds where it can. Running golangci-lint over the package
with `GOOS=windows`, which nothing in CI does, reported two findings in
those files, both corrected here: Winsock's refusal constant is renamed
`errWSAEConnRefused`, as errname asks of a sentinel error, and a
misspelling in `socket_mode_windows.go`'s file comment is fixed.

## Measured

On the Windows Server 2025 test VM (Go 1.27.1, PortableGit 2.55.0's bash
5.3, 4 cores), the step as CI runs it: `cmd/server` 2180/2206, every
condition of the four Windows-only files both ways, 20 shared conditions
left to Linux; `internal/toolutil` 3836/3848, both Windows-only files
both ways, 12 left to Linux; exit 0, 15 minutes for the two. The leg
took 20 minutes before, so it stays well inside its 60. That run was on
the tree before the last mutant fixes, which changed only files Linux
builds too, before the rename above, which changes no condition, and
before this branch moved onto the two layers below it in this stack,
whose only change to these two packages is `internal/toolutil/errors.go`
(the bound on a reflected message and Workhorse's Orbit query refusal),
a file Linux builds too. That file adds 20 conditions to
`internal/toolutil` which the Windows figure predates, all of them in
the shared files the step does not gate; what it gates on Windows, the
six files Linux does not build, is the same at the head.

On linux/amd64 at the head: `cmd/server` 2236/2236 and
`internal/toolutil` 3870/3870 with `GOBCO_GATE=all`, and
`internal/tenancy`, whose comments changed, 444/444. The register row
and the testing README carry the 3870.

gremlins over the whole of `cmd/server`, `--workers 2`, in three groups
of files run side by side on the same tree (main.go with the flag files;
the gate, guard, probe, subscription, stdio and session-owner files; the
rest): Killed 1249, Lived 10, Not covered 47, Timed out 1, of 1307
mutants. Every file a fix then changed was run again on the final tree:
`main.go` Killed 354, Lived 0, Not covered 16; `probe.go` 73, 0, 2;
`health.go` and `readiness.go` 50, 0, 0; and `stdio.go`, whose group had
started before its line handling moved into `accept`, 58, 0, 0. None
timed out. A gremlins dry run on the head lists the same 47 not-covered
mutants (1242 runnable), every one of them in a place that has no
statement counter of its own: a constant or package-level variable
initializer, or the two Windows files, which gremlins mutates although
Linux never compiles them. Not covered is not the same as asserted, so I
applied the initializer mutants by hand and ran the whole `cmd/server`
suite on each. The 23 that turn a `+` between strings into a `-` do not
compile. The other 22, in 19 distinct forms (a timeout's `*` turned into
`/`, a refusal code losing its sign, `maxUnixPathLen`'s `- 1` becoming
`+ 1`), each fail the suite: the HTTP server timeouts through
`TestHTTPServerTimeouts_AreDeadlinesRatherThanTheAbsenceOfOne`, all
three forms of `idleTimeoutDisabled` through
`TestIdleTimeoutDisabled_OutlastsEveryOtherDeadline`, the two refusal
codes through
`TestRefusalCodes_MirrorTheirStatusAndSitWhereTheSpecificationAllows`,
the socket path limit through
`TestMaxUnixPathLen_IsTheLongestPathAnAddressCanCarry`,
`stdioRereadTimeout` through
`TestRefreshStdioAuthority_FollowsTheInstanceUntilTheContextEnds`,
`httpShutdownTimeout` through four tests,
`TestHTTPShutdownTimeout_SitsInsideTheBracketItsCommentArgues` among
them, the probe's timeout and budget and the telemetry, startup-drain,
stale-socket, pprof and shutdown-grace timeouts each through tests of
their own, and `sseKeepAliveInterval` at zero by panicking
`time.NewTicker`.

The script's tests (26, among them nine new for the gate, the test flags
and the CI step) pass under bash 5 and under bash 3.2.57, the version
macOS ships as `/bin/bash`, in a `bash:3.2` container.

## Gates

This is the third layer of a stack: it sits on the Orbit query layer for
#1031, which sits on the layer raising the bound on GitLab's reflected
message, which sits on main at fbf81ff. Since the base this branch was
first measured on, 862e393, nothing below it has changed `cmd/server`,
and what main had gained before that, since the base the mutation runs
measured, changes only string literals there (help text, a flag's usage,
the first-run guidance), which no mutator touches, so the `cmd/server`
mutation figures carry. Below it, #1199 changed IDN-013's text and added
one of its declared sites in `internal/tenancy`, and the two layers
changed `internal/toolutil/errors.go`; those two packages' figures were
measured again. Everything below ran on the head of this branch; the one
conflict of the rebase was `docs/development/testing/testing.md`, which
was regenerated rather than merged.

- `go build ./...`, and `go test -count=1 -cover`: `cmd/server`,
`internal/tenancy` and `internal/toolutil` 100.0% of statements.
- `GOBCO_GATE=all make coverage-conditions`: `cmd/server` 2236/2236,
`internal/toolutil` 3870/3870, `internal/tenancy` 444/444. The
`internal/toolutil` figure was taken again after the layer below began
refusing a null message in Workhorse's query refusal, which added its
four conditions.
- `make coverage-mutants PKG=./internal/tenancy`: Killed 239, Lived 0,
Not covered 67 (every one an `iota` or constant declaration), Timed out
0. `cmd/server` as above.
- `golangci-lint run --build-tags e2e` on `./cmd/server/...` and
`./internal/tenancy/...`: clean, and clean on `cmd/server` under
`GOOS=windows` and `GOOS=darwin`.
- `go vet` of `cmd/server` and `internal/toolutil` for windows and
darwin on amd64 and arm64: clean.
- `make check-test-subtests`, `check-test-goroutines`,
`check-test-file-names`, `check-action-ids`, `check-md-escaping`,
`check-doc-tool-names`, `check-surface-quality`, `check-tenancy`,
`check-sdk-context`, `check-dead-consts`, `check-e2e-static`,
`check-orbit-record`, `check-gateway-chars`, `audit-catalog-first`,
`check-action-grants-derivation`, `audit-1to1`, `audit-1to1-sdk`,
`audit-1to1-paths` and `audit-1to1-grants`: all pass.
- `check-testing-docs`, `check-llms`, `check-tool-reference`,
`check-lhm-manifest`, `check-footprint`, `check-site-stats` and
`check-action-grants`: all pass.
- `go run ./cmd/format_md_tables/ --check`, `node
scripts/check-doc-links.mjs`, markdownlint-cli2 on the changed Markdown,
`make check-em-dash`: pass.
- `python3 -m unittest scripts/coverage_conditions_sh_test.py`: 26 tests
pass under bash 5.2. The run under bash 3.2.57 in a `bash:3.2` container
was before the rebase, which changed neither the script nor its tests.
- actionlint v1.7.7 on `ci.yml`: no findings. That run had no shellcheck
on its path, so shellcheck 0.9.0 was run on its own over the step's
`run` block and over `scripts/coverage-conditions.sh`: no findings.
Before the rebase, actionlint v1.7.7 with shellcheck 0.10.0 had found
none either.

## Decisions I took here

- The cross-platform step gates rather than reports, and gates only the
files Linux does not build, for the reason above. The shared files stay
with the local `GOBCO_GATE=all` run on Linux that a touched package
passes before it is committed; this change adds no Linux gobco step to
CI.
- The step runs on Windows and macOS only. Linux builds none of the
files it would hold.
- A Go runtime crash of #467 fails this step the way it fails the unit
suite's first run, and the answer is the same: rerun the failed job. The
step does not reproduce the crash-aware runner's retry.
- Conditions no input can reach were removed rather than tested through
their impossible state, and equivalent mutants were answered by
rewriting the code they sat in rather than by declaring them.
- The two stale test comments the godoc audit reported in `main_test.go`
were corrected on the way, since the package was being held to its gates
anyway.

## Not done

- The macOS leg was not run: no macOS machine was available. What it
depends on was checked instead: the script's tests under bash 3.2.57,
and its tools being the ones a macOS runner has (BSD awk, tar, mktemp
and tr behave the way the tests exercise them). macOS builds only
`probe_other.go` beyond Linux, which carries no condition, so the leg
holds nothing today and is there for the next file only it builds.
- gremlins does not honor build constraints either, so the two Windows
files' mutants are reported not covered on Linux and measured nowhere. A
gremlins run on Windows would answer them, and that is not this change.
- The e2e harness and retiring the staged copy wait on gobco honoring
build tags, register row 73, and stay with #1099.

Closes #1017.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Build pipeline, workflows, or lint configuration v3.1.0 Targeted at the 3.1.0 release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant