Skip to content

Org upkeep (.github#1): lint baseline, Go 1.27.1, Rust 1.98.1, JSON logs off a terminal, Markdown-safe image builds - #241

Merged
CMGS merged 7 commits into
mainfrom
upkeep/github-1
Sep 24, 2026
Merged

CMGS merged 7 commits into
mainfrom
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

  • 1c3e7d4 docs: package comments for every package
  • d477b6e lint: enable revive default rules
  • 4de77f3 lint: enable nolintlint, drop unused directives
  • 78e3806 build: go 1.27.1
  • 49bac54 build: rust 1.98.1
  • 5207b0f ci: image builds skip Markdown-only changes
  • 590b219 log: JSON records when stderr is not a terminal

Notes

  • sandboxd replaces the global logger with its journald writer right after SetupLog (the <N> level prefix is what journalctl -p keys on), so UseJSON on that call would be dead. The writer now has a JSON mode: off a terminal it writes <N> plus the raw JSON record in one write; on a terminal the console line as before. One test pins that; docs/deploy.md says it in one sentence.
  • revive: max/delete parameters renamed by meaning; the two drain loops in sdk/go/watch_test.go log each drained event.
  • Rust 1.98.1: both channels, both rust-version fields and both base images (digests from crane) move together; this supersedes dependabot build: bump rust from 1.98.0-alpine to 1.98.1-alpine in /boot #236 and build: bump rust from 1.98.0-slim to 1.98.1-slim in /silkd #237.
  • images.yml / build-os-images.yml no longer build images for Markdown-only pushes (same shape as cocoon 8d07763); the commit body replays real pushes from history.

JSON logs off a terminal

sandboxd: stderr to a file gives <6>{"level":"info","func":"main",...,"message":"sandboxd devel-..."}; under a pty <6>24 Sep 26 14:17 +08 INF sandboxd devel-... func=main. mcp: stderr to a file gives {"level":"fatal","func":"main",...}.

Gates

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

go-lint PASS
asl PASS
test PASS
build PASS
rust PASS
buildx PASS

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

Unused parameters become _ or unnamed, the max/delete parameters that
shadow builtins become limit/deleteAfter, and the watch drain loops log
each drained event instead of an empty body.
Every existing directive is still used; the config change is the whole diff.
Move the boot/init and silkd toolchain channel, rust-version and builder
base images together; supersedes the image-only dependabot bumps.
A README edit under protocol/, silkd/ or os-image/ started the image chain;
a protocol or silkd README rebuilt the silkd carrier and refolded it into
every image. The images.yml push filter now drops *.md, and both change
detections (images.yml detect, the build-os-images matrix) ignore it, so a
mixed push does not rebuild an image for its doc half; the matrix no-cache
loop's own *.md skip is redundant and goes.

Simulated on real history (first-parent commits, before = parent):
f6477cf and 401c0aa (protocol/silkd README only) go from a silkd carrier,
base and three flavors to no run; b0283fc (android README only) goes from
an android build to no run; e1d5973 (desktop Dockerfile + README) keeps its
one cached desktop build; 4c56260 (node README + silkd Cargo.lock) keeps
its full silkd refold.
sandbox-mcp sets UseJSON from a stderr terminal check. sandboxd replaces
the core/log writer with its journald writer, so UseJSON on SetupLog would
be dead there; the journal writer instead emits the raw JSON record behind
the <N> syslog prefix, in one write, when stderr is not a terminal, keeping
journald's priority classification, and a terminal keeps the console line.

Hot path: the JSON path skips the per-record console re-render.
@CMGS
CMGS merged commit 687260f into main Sep 24, 2026
4 checks passed
@CMGS
CMGS deleted the upkeep/github-1 branch September 24, 2026 07:23
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