# Signature collection integration and preserved-preview upgrade

Completed 2026-11-14 UTC, with the owner's approval to proceed. Integration is
uncommitted in `feat/feature-first-roadmap` at
`/tmp/signet-roadmap-20261112/integration` (base `9876b79`). The feature source
also remains in `feat/signature-collections`; no commit or remote publication.
The original dirty checkout, its auth experiments and skill deletions were not
changed.

## Review and integration

Reviewed the uncommitted feature against `9876b79`, AGENTS, CONTEXT, ADRs 0001/2
and the owner's collection requirements. No blocking correctness/spec mismatch
found: typed owned/enrolled references, immutable queued decisions, legacy
NULL-reference behaviour, worker-only original reads, and configured roles are
retained. The verified feature files were copied into the previously clean
integration worktree, without unrelated original-checkout changes. Existing full
build/E2E/render/browser/migration evidence is in `signature-collections.md`.
Subagents were unavailable; review was performed directly, not delegated.

## Backup and rehearsal

Private durable backup (0700 directory, sensitive files 0600):
`/Users/saikrupa/.local/var/signet-preview-upgrades/20261114T045733Z/`.
It contains pre/post database dumps, pre/post installed runtime archives, private
signature/document/DAM/config backup, Redis RDB/AOF, container metadata,
original-field row fingerprints for every public table, all application asset
hashes, package comparisons, installed-product hashes, private browser evidence
and rehearsal logs. Never commit these private backup contents.

The actual backup was restored into `signet-signatures-upgrade-rehearsal`.
Migration 002 applied twice preserved every original column in every table and
all asset bytes. The restored data booted and survived three graceful restarts
in the same no-`--init` topology as the user's container. Rollback was also
rehearsed there: restored old-schema dump plus original runtime booted, and all
original records/assets matched. The rehearsal is stopped; its localhost:18091
is no longer serving a second copy of the user's data.

## In-place upgrade

The existing `signet-jpeg-loopback` container was not recreated or reinitialised.
Its web process was frozen and APIs/worker stopped before the consistent dump
and filesystem backup. Applied migration as DB owner with writers stopped;
original-column fingerprints matched immediately. PostgreSQL and Redis were
cleanly shut down before the container was stopped and runtime replaced.

Installed API/worker and three UI files matched the previously verified product
image `6009232559c7ca6082c66bff36aa70086e4d5c135021c9c7c298f005e91865f2`
byte-for-byte; package inventories matched. Updated source/startup scripts were
staged too. Booted initially on an internal-only maintenance port, verified all
original data/config/file hashes and Redis logical contents (including key types
and expiration times), then restored the exact original web config and reopened
http://127.0.0.1:18087. The container's original image ID is unchanged because
this is an in-place filesystem upgrade, not a newly committed user-data image.

Read-only browser checks on :18087 passed for manager/management: signer nav,
My signatures, existing pending inbox/document, default signature picker and DOM
placement. No sign-off, upload, default change or other mutation was performed
on user records. No page errors. Three graceful restarts and a full controlled
same-container restart passed. After browser and restart checks, all original
public-table fields, all document/signature/DAM/config bytes, all new collection
IDs/metadata and complete Redis logical data still matched their baselines.
Only the intended new schema/metadata was added; no old decision was backfilled.

## Scope and remaining gates

:18087 is now the upgraded preserved preview; :18090 remains the clean synthetic
preview. The :8080 stack, unrelated PHP :8087, maa-1 and shared services were not
modified. No host/VM clock or sysctl was changed. Native OpenRC, proxy trust/DAM
writer policy, resource/concurrency/coexistence and production backup acceptance
remain ticket14 / tracker9. This local restore rehearsal is not a production
certificate. Publication/commits remain pending.

Rollback snapshots are point-in-time. Once the user resumes editing/signing,
never blindly restore the pre-upgrade dump: doing so would lose subsequent
entries. Preserve current state and reconcile any later changes first. Removing
or recreating the container is not persistence; retain its data and backups.
