Archive location (Gitea issue 7): ARCHIVE_ROOT, Admin file-locations API, archive-copy job, doctor check

A filed packet's sealed data book, documents and a manifest are copied to the archive folder by the worker.
A failed copy never blocks filing: it is retried with backoff and raises the archive_failed condition.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-30 17:50:04 -06:00
co-authored by Claude Opus 5.5
parent 3fdf063b70
commit da31b0a87a
21 changed files with 1537 additions and 11 deletions
+5
View File
@@ -850,6 +850,11 @@ def _file(w: Write) -> None:
w.log_also("Data book filed", f"{pages} pages")
w.detail["seal_id"] = int(seal_id)
w.detail["databook_pages"] = pages
# The archive copy runs in the worker after this commits. A failed copy never blocks filing.
from . import archive
if archive.on_filed(w.conn, _settings(w), w.user_id, w.id):
w.detail["archive_requested"] = True
def _file_databook(w: Write, row: Mapping[str, Any], seal: dict[str, Any], seal_id: int) -> int: