Commit Graph

4 Commits

Author SHA1 Message Date
Jon Chery 1ad6780df1 fix(release): install.sh asset matching + SHA256SUMS + Dockerfile 1.25.12
install.sh:
- find_asset_url now matches by asset NAME (python3 JSON parse), not
  URL path — Gitea attachment URLs are opaque UUIDs that don't contain
  the tarball name. This was the root cause of the v0.12.18 install
  failure (asset existed but install.sh couldn't find it).
- find_asset_in_releases walks recent releases by asset name and
  returns both URL + version for the fallback walk.
- Handles 404 (tag without release) gracefully via fallback walk.

Dockerfile:
- golang:1.25 -> golang:1.25.12 (go.mod requires 1.25.12; the Docker
  image was using patch 0, causing `go mod download` to fail with
  "go.mod requires go >= 1.25.12 (running go 1.25.10)")

coreci.yml:
- All golang:1.25 images -> golang:1.25.12
- Release pipeline: add SHA256SUMS generation (sha256sum tarball)
- Release pipeline: attach SHA256SUMS alongside tarball
- Release pipeline: verify assets are actually attached after
  tea releases create (REQ-097 gate C-21); auto-attach via API if
  tea failed silently

release.sh:
- Add SHA256SUMS generation (sha256sum tarball > SHA256SUMS)

---ci---
project: orca
milestone: v0.12.18
phase: release-fix
status: complete
---/ci---
2026-08-10 16:54:11 +00:00
Jon Chery b765cca0ed fix(P17): install.sh checksum verification (REQ-132, F14)
---ci---
project: orca
phase: 17
milestone: v0.12
status: execute
---/ci---

install.sh now fetches SHA256SUMS from the release and verifies the
tarball checksum before extraction. Fail closed on mismatch. Warns
if SHA256SUMS is absent (insecure). Build green.
2026-08-07 11:26:35 +00:00
Jon Chery eadd28fac0 fix(P01): release.sh cross-build amd64 + asset verification; install.sh fallback walk + --check
P01 — release/install pipeline fix (REQ-097, REQ-098; gate C-21).

release.sh (REQ-097):
- Cross-build linux-amd64 regardless of host arch (GOOS=linux GOARCH=amd64
  go build, CGO_ENABLED=0). D-193: the host-arch build produced the wrong
  tarball when cut from arm64 — root cause of the v0.8.x asset-less
  releases.
- Hardcode tarball name to orca-${VERSION}-linux-amd64.tar.gz (not
  host-arch-dependent).
- Post-create asset verification (C-21): after tea releases create, query
  the Gitea API and assert the tarball appears in attachments. Retry once
  via tea release edit if missing. Fail loudly if still missing. This
  catches the tea CLI bug where create exits 0 without attaching the asset.

install.sh (REQ-098):
- Asset fallback walk: if the resolved release (latest or --version) lacks
  the matching tarball, query /releases?limit=50, extract all
  browser_download_urls from the list response (assets are inline), find
  the newest release with a matching orca-*-linux-amd64.tar.gz asset, print
  a WARNING, and use that release. Fixes the v0.4.5 install incident where
  v0.8.15 had no asset and install.sh errored out with no fallback.
- --check dry-run mode (D-194): prints version + asset URL + install path
  + current version without writing anything.

Tests (scripts/tests/):
- install_test.bash: 5 tests (--help, --check happy path, --check fallback
  walk, unknown arg rejection, --system root check).
- release_test.bash: 5 tests (script exists, syntax valid, cross-build
  command present, amd64 tarball name hardcoded, asset verification present).

All 30 bats tests pass. make lint clean (no new warnings).

---ci---
project: orca
phase: 1
milestone: v0.10
status: execute
---/ci---
2026-08-05 20:52:25 +00:00
Jon Chery 85963dc320 feat(P02): install.sh 1-liner + in-place update + README quickstart
REQ-043: install.sh pulls release binary from public Gitea URL.
  User-level default (~/.local/bin/orca), --system for system-level
  (/usr/local/bin/orca). Defaults to latest release; --version pins.
  Env-overridable GITEA_URL/OWNER/REPO for testability.

REQ-044: in-place update detects existing binary, reads version via
  'orca version --json', prints update message, overwrites binary,
  preserves namespace dir (config/db/certs). Idempotent re-install.

REQ-016 (completion): README quickstart now documents the 1-liner
  install + --system variant + update-in-place pattern.

Tests: 8/8 pass in scripts/install_test.sh (real public Gitea releases,
  no mock server; timeout-guarded to prevent hangs).

Docs: docs/install.md covers user/system install, version pinning,
  in-place update, uninstall, troubleshooting.

---ci---
project: orca
phase: 2
milestone: v0.5
status: verify
---/ci---
2026-08-03 18:49:50 +00:00