v0.143.0 — guest RAM resize UI (R-24) — MinAgent: 0.90.0

The customer sees the guest's current memory + allowed range on the Rendszer settings
page and resizes it. The controller proxies + maps the agent's machine code to Hungarian;
the agent (felhom-agent v0.90.0) enforces every bound and applies live (no reboot).

agentapi: GuestMemory + ResizeMemory; ruled 412 -> *MemoryRefusedError (code+bounds);
pre-0.90 agent 404 -> typed *StatusError. Capability: FeatureGuestMemoryResize +
featureMinAgent 0.90.0 + a featureProbes row (type-asserts GuestMemory so the shared
SupportProber/netAgent are untouched).

UI (internal/web/system_memory_handlers.go, settings_system.html): "Szerver memoria (RAM)"
card + number input; POST /api/system/memory/resize -> capability gate -> agent -> flash.
JS confirm only on shrink. Code->Hungarian map; agent-outdated hides the control;
agent-unreachable falls back to the guest's /proc/meminfo. Agent English never shown raw.

Tests: agentapi (decode, 404, refusal-code, capability table) + web handler (success/
below_usage_floor/agent_outdated). Gates + go build/vet/test all pass.
This commit is contained in:
2026-07-17 19:10:00 +02:00
parent f900c83eed
commit 3286c7faaf
10 changed files with 688 additions and 1 deletions
+30
View File
@@ -1,5 +1,35 @@
## Changelog
### v0.143.0 — guest RAM resize UI (R-24) — MinAgent: 0.90.0 (2026-07-17)
The customer sees the guest's current memory + the allowed range on the **Rendszer** settings page and
resizes it. The controller only proxies + maps the agent's machine `code` to Hungarian — the AGENT
(felhom-agent v0.90.0) enforces every bound and applies the change live (no reboot). Memory only.
- **agentapi (`internal/agentapi/client.go`):** `GuestMemory(ctx)` (GET /guest/memory) and
`ResizeMemory(ctx, mb)` (POST /guest/memory). A ruled 412 refusal surfaces `*MemoryRefusedError`
carrying the machine code (below_min/above_max/below_usage_floor) + fresh bounds; a pre-0.90 agent
404s → the typed `*StatusError{404}` (the capability signal).
- **Capability (`internal/agentapi/features.go`):** `FeatureGuestMemoryResize` + `featureMinAgent`
**0.90.0** + a `featureProbes` row (GET /guest/memory is the probe; the probe type-asserts the one
method it needs, so the shared `SupportProber`/`netAgent` stay untouched). Per the publish-train
convention (this CHANGELOG declares MinAgent; the Supports gate sits at the handler entry point).
- **UI (`internal/web/system_memory_handlers.go`, new; `templates/settings_system.html`):** a "Szerver
memória (RAM)" card shows current/used memory + the `2048 MB {max} MB` range; a number input
(step 256) + "Átméretezés". `POST /api/system/memory/resize` → capability gate (SupportUnknown passes)
→ agent → POST-response flash. A JS confirm fires ONLY on a shrink. Code→Hungarian map: success
"A memória átméretezése megtörtént: X MB → Y MB."; below_usage_floor "…túl közel van a jelenlegi
felhasználáshoz (N MB). Állíts le néhány alkalmazást…"; below_min / above_max; agent-outdated → the
control is not offered + a "rendszerfrissítése szükséges" note; agent-unreachable → the value falls
back to the guest's own `/proc/meminfo`, control disabled, honest note (the page never 500s). The
agent's English message is never shown raw.
- **Ripple (no code):** lxcfs updates the guest `/proc/meminfo` live, so the deploy-page memory math
follows a resize automatically.
- **Tests:** agentapi (GuestMemory decode, 404-typed, ResizeMemory success + refusal-code, capability
table 0.89→No / 0.90→Yes / probe 404→No / probe ok→Yes) + web handler (success maps to Hungarian;
below_usage_floor maps + the agent English never leaks; agent_outdated gate refuses with ResizeMemory
never called). Gates: template_id + emoji OK; `go build/vet/test` all pass.
### v0.142.0 — offsite repo continuity: orphaned-repo guard (A) + run-status auto-refresh (C) (2026-07-17)
Closes the reinstall-orphaned-repo incident class (`memory` offbox-repo-orphaned-2026-07-17): a