Read the architecture at run time instead of a Buildarch ldflag (closes #259) #265

Merged
clawbot merged 1 commits from issue-259-remove-buildarch into next 2026-10-02 03:21:52 +02:00
Collaborator

Fixes #259, part of sneak/project-management#19.

The Makefile no longer passes the architecture to the linker. The Buildarch variable in cmd/upaasd/main.go and the field and setter in internal/globals are removed. The only place upaas reported the architecture was the startup log line written by Identify(); it now logs runtime.GOARCH under the key arch, the key the sneak/prompts conventions use. A new test in internal/logger checks that this line carries runtime.GOARCH. The footer and /health never showed the architecture and still don't.

CONVENTIONS.md is not an identical copy of prompts/GO_HTTP_SERVER_CONVENTIONS.md: it already differed in heading levels, the health check path and the Makefile VERSION line. So only the buildarch parts changed, the same edits the prompts change made.

Disclosures:

  • Deviation: the default branch (main) of sneak/prompts still has Buildarch. The removal is merged to its next (sneak/prompts#67) and waits on sneak/prompts#68. I followed next.
  • The startup log key changed from buildarch to arch; anything that filters upaas logs on the old key needs the new one.

Model: opus-5-5

Fixes https://git.eeqj.de/sneak/upaas/issues/259, part of https://git.eeqj.de/sneak/project-management/issues/19. The `Makefile` no longer passes the architecture to the linker. The `Buildarch` variable in `cmd/upaasd/main.go` and the field and setter in `internal/globals` are removed. The only place upaas reported the architecture was the startup log line written by `Identify()`; it now logs `runtime.GOARCH` under the key `arch`, the key the `sneak/prompts` conventions use. A new test in `internal/logger` checks that this line carries `runtime.GOARCH`. The footer and `/health` never showed the architecture and still don't. `CONVENTIONS.md` is not an identical copy of `prompts/GO_HTTP_SERVER_CONVENTIONS.md`: it already differed in heading levels, the health check path and the Makefile `VERSION` line. So only the buildarch parts changed, the same edits the prompts change made. Disclosures: - Deviation: the default branch (`main`) of `sneak/prompts` still has Buildarch. The removal is merged to its `next` (https://git.eeqj.de/sneak/prompts/pulls/67) and waits on https://git.eeqj.de/sneak/prompts/pulls/68. I followed `next`. - The startup log key changed from `buildarch` to `arch`; anything that filters upaas logs on the old key needs the new one. Model: opus-5-5
clawbot added the needs-review label 2026-10-02 02:42:13 +02:00
clawbot self-assigned this 2026-10-02 02:42:13 +02:00
clawbot added 1 commit 2026-10-02 02:42:14 +02:00
The Makefile no longer passes the architecture to the linker. The
Buildarch variable in main and the field and setter in globals are
gone; the startup log line reports runtime.GOARCH as `arch`.
CONVENTIONS.md drops Buildarch from its main, globals, logger and
Makefile examples, as the sneak/prompts conventions do.

Model: opus-5-5
Author
Collaborator

Review passed.

Model: opus-5-5

Review passed. Model: opus-5-5
clawbot merged commit 5168db69d9 into next 2026-10-02 03:21:52 +02:00
clawbot deleted branch issue-259-remove-buildarch 2026-10-02 03:21:52 +02:00
Sign in to join this conversation.