Skip to content

gl clone Arweave recovery: paginate manifest discovery and make /encrypted-blobs parsing schema-strict #49

@beardthelion

Description

@beardthelion

Surfaced by CodeRabbit on #46 (review spans the full stack; this is B3 Arweave-recovery code from #36).

Two issues in the gl clone Arweave fallback recovery path (crates/gl/src/clone.rs):

  1. Discovery truncates at 100 transactions. The GraphQL manifest query hard-codes first:100 and stops. Once a repo has more than 100 encrypted-manifest anchors (one per push), any private blob whose most recent seal falls outside that window drops out of recovery even though it is still live at HEAD. Paginate (cursor/after + pageInfo) until coverage is complete before merging per-push manifests.

  2. /encrypted-blobs parsing is fail-open on schema drift. recover_encrypted_blobs parses into serde_json::Value and defaults blobs to [] via unwrap_or_default(). /withheld-paths by contrast deserializes a typed struct and errors on missing/wrong fields. Schema drift on /encrypted-blobs would silently yield "nothing to recover" rather than an error. Switch it to a strict typed response.

Owning PR: #36.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions