Skip to content

evidence: concurrent recovery reports a replaced manifest as invalid #159

Closed

Description

@ElbertePlinio

Found while fixing #144. A recovery process inspects manifest.json before taking the run's journal lock. When a peer wins the lock and replaces the manifest with writeFileAtomic (temp file plus rename), the loser's already-open descriptor points at an unlinked inode; isSingletonRegularFile requires nlink === 1, sees nlink === 0, raises RunStorageAccessError, and the run is reported as skipped with reason invalid evidence manifest although it was recovered fine by the peer. Harmless but misleading.

  • Retry the manifest parse once when the opened inode has nlink === 0 (replaced by rename; a hostile hardlink shows nlink >= 2 and stays rejected), or inspect after taking the lock
  • Keep the path-safety checks intact and add a test for the replaced-inode case
  • Separate final reviewer

Refs #144, #110.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions