Skip to content

Org upkeep (.github#1): lint baseline, Go 1.27.1, tool pins, core v0.1.5, JSON logs off a terminal - #44

Merged
CMGS merged 5 commits into
masterfrom
upkeep/github-1
Sep 24, 2026
Merged

CMGS merged 5 commits into
masterfrom
upkeep/github-1

Conversation

@CMGS

@CMGS CMGS commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Implements the per-repo part of cocoonstack/.github#1: revive default rules, nolintlint, Go 1.27.1, the pinned tool versions, projecteru2/core v0.1.5 and JSON log records when stderr is not a terminal (only the sections that apply here).

Commits

  • 687b26a lint: enable revive default rules
  • 5c16864 lint: enable nolintlint, drop unused directives
  • 336d18a build: go 1.27.1
  • 822d73d build: controller-gen v0.22.0, crd-ref-docs v0.3.0
  • f98d818 log: JSON records when stderr is not a terminal

Notes

  • revive unexported-return: NewScatterGatherStore returns SandboxStore. Every production caller already uses it through that interface; the tests that need internals assert to *scatterGatherStore.
  • controller-gen v0.22.0 changes only the CRD's controller-gen.kubebuilder.io/version annotation (no schema change, deepcopy unchanged). crd-ref-docs v0.3.0 renders Optional: {} in the Validation column of docs/api.md.
  • asl still reports two advisory forwarder findings (pkg/envdproxy/dial.go:129 withTarget, pkg/envdproxy/envdproxy.go:143 sandboxHost). They exist on master already; the gating mode (-forwarder=false) is clean on both.

JSON logs off a terminal

sandbox-envd-proxy: stderr to a file gives {"level":"info","func":"main.run",..."message":"starting sandbox-envd-proxy ..."}; under script -q the console line has ANSI colour codes.

Gates

Run with GOWORK=off against the pinned golangci-lint v2.13.2 (built with go1.27.1):

fmt-check PASS
lint PASS
asl-linux PASS with -forwarder=false (plain asl: the 2 advisory findings in Notes)
asl-darwin PASS with -forwarder=false (plain asl: the 2 advisory findings in Notes)
test PASS
build PASS

gofumpt v0.12.0 / goimports v0.50.0 are held until the next golangci-lint release vendors them (see the issue).

Fix every finding: two unused-parameter func literals in
openapi_test.go and one unexported-return (NewScatterGatherStore now
returns SandboxStore).
Remove four directives nolintlint reports as unused: gosec no longer
flags the three it targeted, and the misspell one duplicates the
existing ignore-rules entry for creater.
Regenerate the CRD and docs/api.md; v0.3.0 now marks every optional
field's Validation column as "Optional: {}" instead of leaving it blank.
Both binaries now set UseJSON from a stderrIsTerminal check, so a
pipe, a pod or a service gets structured records while a terminal
keeps the console writer.
@CMGS
CMGS merged commit 1a4fadb into master Sep 24, 2026
2 checks passed
@CMGS
CMGS deleted the upkeep/github-1 branch September 24, 2026 07:12
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