Describe the feature
Add administrative tooling to audit attachment references in PostgreSQL against the configured blob store.
This should build on the shared blob-store abstraction introduced by the AWS S3 / Google Cloud Storage support (#26) and work across supported backends.
Add:
kivald admin blobs audit
with optional digest verification:
kivald admin blobs audit --verify
The audit should detect and report:
- referenced blobs missing from storage;
- referenced blobs whose contents do not match their digest when verification is requested;
- stored blobs that are not referenced by any attachment row;
- backend-specific integrity problems where applicable.
The command should be read-only. Missing or corrupt referenced blobs should produce a non-zero exit status. Orphaned blobs should be reported without being deleted.
The implementation should account for concurrent uploads so that normal server activity does not produce misleading audit results.
Additional context
This issue should follow the AWS S3 / GCS blob-store work so the audit is designed against the common storage abstraction rather than only the local filesystem backend.
Automatic deletion or repair is out of scope. A later issue can add explicit orphan purging with appropriate safeguards.
Describe the feature
Add administrative tooling to audit attachment references in PostgreSQL against the configured blob store.
This should build on the shared blob-store abstraction introduced by the AWS S3 / Google Cloud Storage support (#26) and work across supported backends.
Add:
kivald admin blobs auditwith optional digest verification:
kivald admin blobs audit --verifyThe audit should detect and report:
The command should be read-only. Missing or corrupt referenced blobs should produce a non-zero exit status. Orphaned blobs should be reported without being deleted.
The implementation should account for concurrent uploads so that normal server activity does not produce misleading audit results.
Additional context
This issue should follow the AWS S3 / GCS blob-store work so the audit is designed against the common storage abstraction rather than only the local filesystem backend.
Automatic deletion or repair is out of scope. A later issue can add explicit orphan purging with appropriate safeguards.