- Import creates placeholder principals (status imported, no keys or grants)
for author ids unknown to the target installation, inside the transaction.
- backup.asp repair [apply] (backup.cmd / ops.sh): lists foreign key
violations; apply creates placeholders and deletes orphaned verifications.
- Errors raised inside /api actions answer a JSON 500 (detail only in
Development) and are logged as action_error; open transactions roll back.
- GetAppSetting honours APPSETTING_<key> environment overrides; compose
passes APPSETTING_Environment.
- api_keys.last_used_at update is best-effort (a read-only db no longer
turns valid keys into 401).
- Docs: never open the WAL database from the host; repair procedure.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- POST /exports: canonical agent-memory-export document (schema_version 1,
sha256 digest over data), filtered by read permission; POST /imports keeps
ids, revisions, timestamps and provenance, rebuilds derived data, and is
all-or-nothing (409 conflict, 422 format/schema/integrity, 413 over 8 MiB)
- JsonLite: RegExp tokenizer; Api_Utf8Decode works on byte runs (builtins cost
time proportional to string length, per-character loops timed out)
- scripts/backup.cmd (VACUUM INTO + integrity/foreign key/row-count checks),
scripts/restore.cmd; restore drill into an isolated container
- Tests: phase3-portability.sh (44), backup-restore.sh (21); docs and OpenAPI
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>