diff --git a/REPORT.md b/REPORT.md index 51280fa..481e99f 100644 --- a/REPORT.md +++ b/REPORT.md @@ -4,81 +4,80 @@ --- -# REPORT — appliance CPU/RAM cap passthrough (`--cores` / `--memory`) (host-install v1.4.0) +# REPORT — Day-0 artifact manifest: version dropdowns + auto-derived sha (hub v0.29.0) -**Date:** 2026-07-01 · **Repo:** `felhom.eu` (`scripts/` only) +**Date:** 2026-07-01 · **Repo:** `felhom.eu` (`hub/` + `manifests/`) -Colleague-safety batch **#3** (host-install half; the cap mechanism is agent **v0.52.0**, a separate -repo/task). Adds optional `--cores`/`--memory` passthrough so an operator can cap the provisioned -appliance guest and keep it from pressuring a colleague's existing guests on a shared production host. +Removes the hand-copied sha256 from the Day-0 artifact manifest UI. The operator now **picks a version** +from a dropdown of what's actually in Gitea, and the hub **reads that version's sha256 from Gitea itself** +— no transcription, no stale checksums — while keeping the deliberate human "which version is approved" +gate (never auto-promotes "latest") and the hub as the checksum trust root. -## 1. Confirmed baseline +## 1. Baseline → target -| Repo | `main` @ commit | Current | → Target | -|------|-----------------|---------|----------| -| felhom.eu (`scripts/felhom-host-install.sh`) | `710afb0` | script **v1.3.0** | **v1.4.0** | +hub `v0.28.0` @ `ce26c9d` → **`v0.29.0`**. (Follow-up to the colleague-safety batch; motivated by the +manual manifest-bump toil flagged in the prior task.) -## 2. Files changed + commit +## 2. Feasibility verified against live Gitea (before coding) -- `scripts/felhom-host-install.sh` (v1.3.0 → **v1.4.0**). -- `scripts/CHANGELOG.md` — v1.4.0 entry. -- `REPORT.md` — this file (overwritten). -- Commit **`f7905b7`** on `main` (parent `710afb0`). +- **List versions:** `GET /api/v1/packages/admin?type=generic&q=` returns name+version — reflects + what's actually present (pruned olders gone). Live: felhom-agent `[0.52.0, 0.43.0]`, felhom-golden `[0.85.1]`. +- **sha without downloading:** `GET /api/v1/packages/admin/generic///files` returns `sha256` + in metadata (agent `5bfc690c…`, golden file `golden.tar.zst` `f87031cc…`) — so the ~GB golden is + never fetched just to hash it. -## 3. What was implemented +## 3. Files changed + commits (on `main`) -- **`--cores N` / `--memory M` (MiB)** — new vars `CPU_CORES`/`MEM_MIB`; arg-parse entries; `usage()` - header gains an "Appliance cap (optional)" group (needs agent ≥ v0.52.0; `0`/unset = golden default). -- **Conditional passthrough** — `step_provision` builds a `cap_args` array (`-cores`/`-memory` appended - only when set) and passes it to BOTH the dry-run log and the real agent `--selftest=provision` call. - Never sent unset, so an agent < v0.52.0 never sees an unknown flag. -- **Pre-flight sanity WARN (soft, provision only)** — if `--cores` > host `nproc` or `--memory` > host - `MemTotal`, `log_warn`; never `die`. +- `hub/internal/gitea/gitea.go` (new) — read-only Gitea packages client: `ListVersions` (semver-desc), + `FileSHA256` (metadata, no download). `hub/internal/gitea/gitea_test.go` — httptest unit tests. +- `hub/internal/web/server.go` — `gitea` field + `SetGiteaClient`; `artifactChoices` helper; pkg/file + consts; `handleConfiguration` passes `AgentChoices`/`GoldenChoices`. +- `hub/internal/web/configs.go` — `handleSetArtifacts` reworked to derive the sha from Gitea + authoritatively (`resolveArtifactSHA`); refuses the save on a lookup failure. +- `hub/internal/web/templates/configuration.html` — version `