diff --git a/README.md b/README.md index 7662730c..5ff18607 100644 --- a/README.md +++ b/README.md @@ -501,7 +501,7 @@ To add your key: 2. Paste it into the **CivitAI API Key** field in the Integrations settings 3. Save and re-import to download any previously skipped images -The key is sent only over HTTPS to CivitAI's own hosts. CivitAI serves images through a redirect to its storage host; PromptManager follows such a redirect only over HTTPS to a `civitai.com` host, at most three hops, and never sends the key with it. When downloads fail, the import's status line says how many; when none could be downloaded, it starts with a warning. +The key is sent only over HTTPS to CivitAI's own hosts. CivitAI serves images through a redirect to its storage host; PromptManager follows such a redirect only over HTTPS to a host on CivitAI's own `civitai.com`, `civitai.red` or `civitai.green` domains, at most three hops, and never sends the key with it. When downloads fail, the import's status line says how many; when none could be downloaded, it starts with a warning. The server log has one warning per failed image with the reason (HTTP status, refused redirect, size cap, unreadable image, timeout or network error). > **Note:** Re-importing is safe — PromptManager skips LoRAs that were already imported. To do a fresh import, the previous `lora-manager` data is cleared automatically before re-scanning. diff --git a/TESTING.md b/TESTING.md index 60491a60..f3d3f900 100644 --- a/TESTING.md +++ b/TESTING.md @@ -2378,7 +2378,8 @@ paints nothing. Until it answers, the section shows "Loading the overview…"; a shows "The overview could not be loaded. Your saved data has not changed." and Retry, never zeros. The thumbnail row is a separate read of `/images/thumbnails/status` (a walk of every source), so the other values never wait for it: "Checking thumbnails…" -until it answers. The health check (`POST /prompt_manager/system/health`) is a `read` +until it answers. The Backup status row is likewise its own read of +`/prompt_manager/backup/status` (S9). The health check (`POST /prompt_manager/system/health`) is a `read` registry job of kind `health`: one at a time, beside a scan, not cancellable and with no file outcomes. The page tracks the started job in the Activity store (its event stream; the store marks it lost if the server stops listing it), never by polling. A press while one runs (another tab) waits @@ -2399,7 +2400,7 @@ the connection's `total_changes` is 0 at close and the data reads back unchanged `-shm` bytes are not compared: every WAL reader rewrites its read marks there, so no reader can keep it byte-identical (`test_health_check_never_writes`). -Recorded deviations (plan D60–D70, D74, D75, D79–D82 renumbered D92–D102, D106, D107 and D111–D114; D121–D131 assigned): +Recorded deviations (plan D60–D75, D79–D82 renumbered D92–D107 and D111–D114; D121–D131 assigned): - **D92** (shell): no "Sample configuration" chip. The Save status is truthful: "No unsaved changes.", "Unsaved changes.", "Saved in this browser." / "Saved to the server @@ -2416,7 +2417,10 @@ Recorded deviations (plan D60–D70, D74, D75, D79–D82 renumbered D92–D102, `needs_review.pending`) with the concept's line; its Review metadata action opens `#/review` (the concept's `go-review`). A count that is not an integer reads "Ambiguous image links" / "Not available yet." (Q6). - "Backup status" reads "No retained backup record." until verified backups exist (S8). + "Backup status" says what `GET /prompt_manager/backup/status` reports, in Backup & + export's own status line (D103, S9): "Checking backups…" until its own read answers, + then the session's last download and the newest safety backup, "No backup recorded." + or "The backup status could not be read.". The thumbnail row is "Checking thumbnails…" until its own read answers, then "No missing thumbnails", "N missing thumbnails" (the pending count of `/images/thumbnails/status`, followed by " · M outdated" when previews are in an @@ -2615,6 +2619,68 @@ Recorded deviations (plan D60–D70, D74, D75, D79–D82 renumbered D92–D102, is D93's style. `maintenance matches the concept` (both themes and sizes) maps only this row; `maintenance comparison detects mutations` proves it is the only difference and catches a removed row, a renamed operation, a lost danger mark and a swapped token. +- **D103** (Backup & export, S9): "Back up" (the concept's "Simulate backup") downloads + the verified copy of `GET /prompt_manager/backup` through the api client (the same + `downloadDatabaseBackup` as every backup box; a copy whose `X-PromptManager-Verify` is + not `ok` toasts "Database backup downloaded, but it did not pass verification: + "), then reads the status again. The `p.small#backup-status` under the + actions shows only what `GET /prompt_manager/backup/status` reports: "Downloaded + backup · · verified." (or "not verified") for this session's last + download and "Safety backup · · N on disk." for the newest + `.backup_*`, else "No backup recorded."; "Checking backups…" while read and "The + backup status could not be read." when it failed (never "no backup"). Portable + export's "Export JSON" (the concept's "Export sample JSON") downloads the Library + document (`/library/export`); a second `.row-actions.spaced` adds "Export all prompts + JSON" (`/export`, the legacy admin page's Export of every prompt) and "Export saved pairs JSON" + (`/pairs/export`), plain buttons as the concept's; a failed export toasts "The export + could not be downloaded. Nothing was saved to this device." "Import / inspect file" + opens the shared "Import & inspect" (D15, D55), as Images does. +- **D104** (Backup & export, S9, Q4): Recovery policy keeps the concept's "Proposed" chip. + "Create a safety backup before maintenance" is the server's `safety_backup` + (`maintenance.safety_backup`) policy. Its line says what it does ("Keep a verified copy + of the database on disk before maintenance, cleanups and LoRA imports change records. A + restore always keeps one."); the concept's "Preview a verified backup before applying + operations that change records." describes nothing the server does. It is drafted behind the Save row and saved with + `expected_revision` (a configuration changed elsewhere is the conflict status); it is + disabled with "Server settings could not be read." when the read failed. "Scheduled + database backups" offers Manual only; Daily and Weekly stay listed but disabled + (there is no scheduler), the row's line is "Daily and Weekly are not available yet: + back up with Back up whenever you choose." (the concept's proposal line is + prototype copy) and nothing is drafted for it. The warning note reads "Restores are + staged, migrated and validated before replacing live data." +- **D105** (Backup & export, S9): "Review restore…" picks a file (no type filter: the + safety backups `.backup_