Files
felhom-controller/REPORT.md
T

65 lines
4.8 KiB
Markdown

# REPORT — v0.123.0: polish batch (F-15 instant reset codes, F-11 inline confirms, "Távoli mentés" rename, zero-toggle honesty)
**Date:** 2026-07-13 · **Version:** controller v0.123.0 (from v0.122.0) · **MinAgent:** 0.81.0 (UNCHANGED) · **Companion:** hub v0.52.0 (F-15 response; old hub = clean no-op) · **Floor:** 0.122 UNCHANGED (no raise in this task)
## What shipped (commits `b4e0a19`, `40b5304`, `8987ce0`, `a00afcc`, `b482860`)
1. **F-15 — reset code works the moment the email lands** (`internal/web/claim.go`). The
reset-request POST now reads the hub's response (`claim {code_hash, generation, issued_at}`,
hub ≥0.52.0) and applies it through the SAME generation-guarded consumer as the report ACK
(`report.ClaimSync.Reconcile` — one consumer, two feeds). Replayed/older generations can never
downgrade the active hash; a legacy hub's bare `{"status":"ok"}` is a no-op.
2. **F-11 — inline confirms** (`layout.html` helper + 7 call sites). `felhomConfirm(el, q, onYes)`
swaps the trigger IN PLACE to "kérdés + Igen/Mégse"; form buttons opt in with `data-confirm`
(delegated listener + `requestSubmit`). Zero native `confirm()`/`prompt()` remain —
enforced by the new committed gate `controller/scripts/native_confirm_gate.py`. The deploy
stale-data delete keeps its double acknowledgement (two chained inline steps).
3. **Tier-3 rename** — customer-facing "NAS-mentés" → **"Távoli mentés"** across `backups.html`,
`offbox_handlers.go` flashes, and the `backup/offbox.go` quota copy; the manual-target form is
generalized to any SFTP target. Executed as a count-guarded python sweep (multibyte rule);
enforced by `controller/scripts/offbox_rename_gate.py`. "Hálózati tárhely" (NAS network
storage) is a different feature and was deliberately untouched.
4. **Zero-toggle honesty** — configured+escrowed offbox with no app selected: muted hint
"Nincs távoli mentésre jelölt alkalmazás — jelölj ki legalább egyet." + the run reports
"Sikeres — nincs mentésre jelölt alkalmazás" (LastWarning; status stays ok).
5. **Dev-box green-gate fix** (`backup.go` `atomicPromoteTar`): fsync via O_RDWR — read-only
fsync is refused on Windows; the two F7 atomic-dump tests were permanently red on the dev box
since CAMPAIGN-3 (Linux unchanged).
## Tests + red-proofs (all run → FAIL → restored)
- `TestResetRequest_ResponseHashAppliedImmediately` (+ generation-guard + legacy-hub no-op
tests). **Red-proof:** response handling disabled → FAIL `gen=1 hash-is-new=false`.
- `native_confirm_gate.py` **red-proof:** one `onsubmit="return confirm('redproof')"`
reintroduced → exit 1; restored → 0.
- `offbox_rename_gate.py` **red-proof:** one 'A NAS-mentés…' flash reintroduced → exit 1.
- `TestOffbox_ZeroToggledRunReportsEmptiness` (+ covered-run negative). **Red-proof:** emptiness
branch disabled → FAIL `LastWarning = ""`.
- Full green gate (build+vet+test, all packages) + template_id/emoji/native_confirm/offbox_rename
gates green before every commit.
## Live validation (drill box qm300/guest 9201 + demo 9201, controller 0.123.0 both, healthy)
- **F-15 exact-failure-path re-run:** "Visszaállító kód kérése" on felhom.enkisfelhom.hu/claim →
controller log `claim-sync: hub claim code cached (generation 3)` **1 second** after the POST →
Viktor entered the emailed code: **accepted immediately, first try** (take-two failure closed).
- **F-11 automation-completes proof:** offbox restore-to-verify driven END-TO-END by browser
automation — inline strip rendered, Igen → restore ran ("A távoli visszaállítás elindult…",
banner "Távoli visszaállítás folyamatban: actualbudget…"), zero freezing.
- **Rename:** /backups renders with ZERO 'NAS-mentés' strings (screenshots in session record);
only the allowlisted "saját NAS vagy Felhom offsite tárhely" intro mention remains.
- **Zero-toggle:** untoggled ActualBudget → hint appeared → run → "Sikeres — nincs mentésre
jelölt alkalmazás" + status Rendben → re-toggled (box left as found).
## Observations
- The queued **customer-target coexistence** task (`managed_by` on OffboxTarget) remains a
SEPARATE task with a pending operator fork — not started, per spec.
- NAS-string inventory beyond backups.html: the two customer-facing quota strings in
`internal/backup/offbox.go` (renamed here); everything else is the distinct "Hálózati tárhely"
feature or English comments/tests (untouched by design).
- Windows-only pre-existing failure found+fixed: read-only-handle fsync in `atomicPromoteTar`
(the F7 tests were red on the dev box, green on Linux — a silent hole in the local green gate).
- Browser-automation note: `find`-ref clicks on plain submit buttons focused but did not submit
(coordinate clicks did); the data-confirm buttons worked via refs. Cosmetic, tooling-side.