Review fix 3: every install deletes the off-site end record — one point, SaveAppConfig (D72)

A `.fab` import installed the app and its end record survived; the restore
that installs from a unit had the same hole. Only DeployStack deleted it.

- stacks.SaveAppConfig, the only writer of an installed app's app.yaml, calls
  noteAppInstalled when the record says deployed (a hook per stacks directory,
  registered by SetMigrationDeps). A source pin lists every place that sets
  Deployed or writes an app.yaml; a new writer fails it.
- The living check is stacks.Manager.IsLivingApp (wired in main.go): the
  protected list, the manager's list (deployed, being deployed, protected) and
  the app's record on disk — an installed app the manager does not list is
  living. Tested by behaviour.

Tests seen red before the fix; 8 mutations seen red (felhom.eu
documentation/audits/build-release-4-2026-11-15/A/redproof-review-3.txt).

Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
admin committed 2026-11-15 14:42:07 +01:00
1 parent 3928c3db28
commit c7e4ec9b5e
7 files changed
+312 -14

No files matched your search

+11
View File
@@ -2,6 +2,17 @@
**MinAgent: 0.158.1** (unchanged — nothing here asks the agent for anything)
- **Review fix 3 (2026-11-15): EVERY install deletes the off-site end record, not only a deploy.** A `.fab` import
(`SaveImportedAppConfig`) installed the app and the record survived; the restore that installs from a unit
(`PersistUnitRedeployConfigGate`) had the same hole. The rule now sits at ONE point: `stacks.SaveAppConfig`, the
only writer of an installed app's `app.yaml`, calls `noteAppInstalled` when the record says deployed (a hook per
stacks directory, registered by `SetMigrationDeps`). `TestD72_TheInstallWritersAreListed` lists every place that
sets `Deployed` or writes an `app.yaml`; a new writer fails it. **The living check is a method now**,
`stacks.Manager.IsLivingApp` (wired in `main.go`), and reads three places: the protected list, the manager's list
(deployed, being deployed, protected) and the app's record on disk — an installed app the manager does not list is
living. Tests `TestD72_AnImportDeletesTheEndRecord`, `TestD72_ARestoreIntoAnInstallDeletesTheEndRecord`,
`TestD72_ADriveFlipRecordWriteDeletesTheEndRecord`, `TestD72_SaveAppConfigIsTheOnePoint`, `TestD72_IsLivingApp` —
the first four seen red before the fix; 8 mutations seen red (felhom.eu `…/A/redproof-review-3.txt`).
- **Review fix 2 (2026-11-15): a take-back or an install DURING the clean-up window no longer loses the copies.** The
due records and the candidates were read once, before the hub was asked, and never again before the forget — so
„Mégis megtartom” (or an install) while the hub answered still deleted, after the page had said „kept”. The window