Commit Graph
8 Commits
Author SHA1 Message Date
sam 1425050506 fix(build): stamp gatewayVersion/runtimeVersion in the right package
-X main.gatewayVersion/main.runtimeVersion targeted package main, but
those vars live in internal/app/archied (cmd/archied is a thin
wrapper). An -X target that doesn't exist is silently ignored by the
linker, so every archied binary this shipped -- task build, install.sh,
Dockerfile.archied, and the carina self-update script -- reported
"dev" instead of its real version. Point every one of those ldflags at
the actual package.

Also, while chasing the carina incident this surfaced:

- restart.go: /restart didn't check for an in-flight /update install.
  The install runs as archied's own child process, so a restart killed
  it mid-build (observed: "signal: terminated") instead of letting it
  finish or fail cleanly. Refuse the restart while updateInProgress.
- update.go / update_report.go: the "no version could be confirmed
  running" branch still opened with "Update complete", contradicting
  its own next clause. Reworded so an unverified outcome isn't
  reported as completion.
2026-09-02 00:00:32 +10:00
sam 7da5a64deb chore(build): bump Docker builder images from golang:1.26 to golang:1.27-trixie
go.mod is already on 1.27.0 (supersedes the 1.26.6 stdlib CVE fix set);
the Dockerfiles were still pinned to the older 1.26-trixie floating tag.
2026-08-31 21:25:50 +10:00
sam 54be74ae89 feat(releaseupdate): stamp install type at build time, fail closed on unknown
/update could report success at the correct target version while the
archie-agent container running it never actually changed: the update
mechanism trusted the configured installer's exit code and reported
whatever version number the release claimed, with nothing verifying
the two agreed.

The first piece of the fix: a new internal/installtype package
reports how a binary was built for distribution (Type(), defaulting
to "unknown"), stamped once per release artifact via
"-ldflags -X .../installtype.buildType=<value>" rather than guessed
at runtime by probing the environment -- restic and Tailscale both
treat "which install shape is this" as a build-time decision for the
same reason: a probed signal is guessable, a compiled-in one is not.

releaseupdate.Service.Install now refuses to run the configured
Installer at all when InstallType is unset or installtype.Unknown, so
an unstamped or misconfigured build can no longer silently attempt an
update it has no way to know is even the right kind for how this
instance was deployed. Wired through every real archied build path so
the gate doesn't just exist in principle: Taskfile.yml's build task
(binary), Dockerfile.archied (container), and install.sh (binary) all
now stamp it; cmd/archied/telegram_setup.go wires
Service.InstallType from installtype.Type().

Configuration-page display of install type/version and post-update
verification against the actually-running reference (not just the
installer's reported version) remain open -- this lands the
correctness gate, not the full observability surface.

Refs #522
2026-08-15 10:34:46 +10:00
sam 8b21418e38 fix(build): install ripgrep where grep.go actually needs it on PATH
grepBinary() resolves rg from PATH since the embedded binaries were
dropped, but nothing installed it: not the GitHub Actions runner (CI
grep tests fell back to direct search and failed), and not the
archie-agent image (Dockerfile) that runs grep tool calls for sandboxed
tasks. Production was masked by carina's host already having ripgrep
installed system-wide for archied's own tool execution.

Dockerfile.archied is unused by the current deployment (docker-compose
builds only Dockerfile; archied runs on the host under systemd) --
corrected its stale "ripgrep is embedded" comment rather than adding
the package to an image nothing builds from.
2026-08-09 02:06:20 +10:00
sam 10775e5edf fix(docker): slim both images and repair unreachable Go tooling
archie-agent 3.92GB -> 1.43GB, archied 475MB -> 251MB.

- rm -rf /go/pkg/mod/cache cleared the wrong thing: it left the
  extracted module sources and the whole GOCACHE in the image, so that
  layer was 2.23GB to deliver 168MB of binaries.
- /go/bin was never on PATH, so golangci-lint, gofumpt, buf and dlv
  shipped as unreachable dead weight.
- Replace go install with pinned upstream release binaries. delve is
  dropped: it publishes no prebuilt binary and was the only thing
  forcing a compile step. go install it at runtime if needed.
- beads from its Go release rather than npm, and drop dolt entirely --
  bd runs Dolt embedded.
- uv manages Python; no apt Python, no deadsnakes, one version.
- debian:trixie-slim base, Node copied from node:24-trixie-slim.
- archied drops Node: the builtin tools cover what desktop-commander
  did, and archied registers MCP providers itself and hard-fails the
  process when one cannot start.

Add .dockerignore: the build context was shipping .git, docs/, bin/
and two host-built binaries into every COPY.
2026-07-31 01:13:02 +10:00
sam be4e9f596c fix(docker): install unzip and Node 24 so MCP servers can start
archied crash-looped on startup: mcp.desktop-commander failed with
"transport closed while waiting for response", which failed the whole
tool-provider family and exited the daemon.

The proximate cause was a missing unzip. desktop-commander depends on
puppeteer, whose postinstall extracts a downloaded browser and aborts
with "no zip archiver is available" without it, so npx exited before
writing a byte. Node also moves to 24 from nodesource, matching the
worker image: Ubuntu 24.04 ships Node 18 and several of the server's
transitive dependencies require >=20 or >=22.

Verified in the built image: npx now completes an MCP initialize
handshake and exits 0.
2026-07-30 22:42:16 +10:00
sam ec8534dfe2 feat(gateway): ship model controls, shell tools, and release tracking 2026-07-27 06:16:39 +10:00
sam 99b8d49c1e feat: add Docker Compose stack with NATS and agent containers 2026-07-22 09:46:54 +10:00