Skip to content

feat: add blob-store integrity auditing #32

Description

@zerosnacks

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions