Cross-platform binaries, MSI, service mgmt, pure-Go SQLite, centralized logging #3

Merged
gsadmin merged 10 commits from development into main 2026-09-02 13:13:19 +00:00

10 Commits

Author SHA1 Message Date
Alphaeus Mote 164ea09f97 ci: build cross-platform binaries + MSI and attach to the release
Expand the release pipeline: run the pure-Go test gate, build the frontend once,
cross-compile all six targets (windows/macos/linux, amd64/arm64) with the UI
embedded and the Windows icon, build the x64 MSI with WiX v5, and attach every
archive + checksum + the MSI to the Gitea release. Container image build/push is
unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-02 09:11:07 -04:00
Alphaeus Mote d3e78c0f29 build: simplify build.ps1 for pure-Go and embed the Windows icon
Drop the obsolete CGO/mingw cross-compile machinery (all targets now build with
CGO off) and generate the Windows icon/version resource with goversioninfo before
building the windows/* binaries, so local builds match CI and finally embed the
icon the README advertises.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-02 09:11:06 -04:00
Alphaeus Mote 503b3f037c feat(installer): WiX MSI installing to Program Files with service
Add a WiX v5 installer that installs orchestrad.exe to Program Files\OrchestrAD
(x64) and registers + starts the Windows service via the binary's idempotent
initialize command; uninstall runs remove before deleting files, leaving no
orphaned service. Embeds the app icon in Add/Remove Programs. Validated end to
end on Windows: install -> service Running + healthy, uninstall -> clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-02 09:11:06 -04:00
Alphaeus Mote 47679269f7 assets: add OrchestrAD app icon and Windows version-info manifest
Add a purpose-drawn icon (indigo/violet badge with an orchestration hub-and-spoke
glyph) as .svg, a 256px .png, and a multi-resolution .ico (16-256). versioninfo.json
drives goversioninfo to embed the icon + metadata into the Windows binaries; the
generated .syso objects are build artifacts and gitignored.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-02 08:55:34 -04:00
Alphaeus Mote 491b5abe83 feat(cli): idempotent initialize/remove service commands
Add initialize (install + start) and remove (stop + uninstall) that are safe to
re-run: initialize skips reinstall/restart when already up, remove treats a
not-installed service as done. install/uninstall become aliases. Uses the
service status to branch. Verified idempotent on Windows (repeat runs exit 0).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-02 08:55:33 -04:00
Alphaeus Mote 0debf9ab33 feat(cli): real cross-platform service management
Implement install/uninstall/start/stop via kardianos/service (Windows SCM,
systemd/upstart/sysv, launchd). The run command now goes through service.Run so
foreground/container and service execution share one startup path; install also
starts the service and uninstall stops then removes it. Route CLI and main
command output/errors through the centralized logger. Verified end to end as a
real Windows service (install -> RUNNING -> uninstall).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-02 08:49:15 -04:00
Alphaeus Mote 25424322f1 refactor(db): switch to pure-Go modernc.org/sqlite, drop CGO
Replace mattn/go-sqlite3 (CGO) with modernc.org/sqlite and the modernc-based
golang-migrate driver, translating the DSN pragmas. This lets every target
(win/mac/linux, amd64/arm64) cross-compile from one runner with no C toolchain,
so the Docker build now sets CGO_ENABLED=0 and drops gcc/musl-dev. Verified:
DB opens (WAL + foreign keys), migrations run, bootstrap seeds admin.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-02 08:49:14 -04:00
Alphaeus Mote 114ba24e05 refactor(logging): add a centralized process-wide logger
Introduce logging.Init/Default plus package-level Info/Warn/Error/Debug so
code without an injected *Logger (main, the service wrapper) emits the same
[UTC] - [Component] - [Level] - Message format on the one shared writer and
rotation policy. Existing injected usage is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-02 08:49:14 -04:00
Alphaeus Mote 1a87030e42 fix(server): answer HEAD on /health so container probes pass
The Docker HEALTHCHECK uses 'wget --spider' (a HEAD request), but the health
routes were GET-only and chi returned 405, which would mark the container
unhealthy. Register HEAD alongside GET on /health and /api/health.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-02 08:36:52 -04:00
Alphaeus Mote 2aafbc406a build(docker): add .dockerignore to slim the build context
Exclude VCS metadata, frontend/node_modules, local build output (out, dist,
binaries, data) and Scratch so docker build ships only source to the stages.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-02 08:36:51 -04:00