Skip to content

Add apis for p2p data management#270

Merged
j-rafique merged 1 commit intomasterfrom
action-recovery
Feb 19, 2026
Merged

Add apis for p2p data management#270
j-rafique merged 1 commit intomasterfrom
action-recovery

Conversation

@j-rafique
Copy link
Contributor

No description provided.

@roomote
Copy link

roomote bot commented Feb 19, 2026

Rooviewer Summary

PR: Add apis for p2p data management
Branch: action-recovery -> master
Status: Approved with minor suggestions

Overview

This PR adds recovery/admin API endpoints for P2P cascade data management. The changes introduce:

  1. Recovery reseed logic (supernode/cascade/reseed.go) - Decodes an existing action, re-encodes the reconstructed file, regenerates RQ artefacts, and stores them via the register flow.
  2. Recovery admin HTTP endpoints (supernode/transport/gateway/recovery_admin.go) - Token-gated REST endpoints for health checks, reseeding actions, and checking action status/distribution across supernodes.
  3. Build/CI integration - Injects RECOVERY_ADMIN_TOKEN via ldflags at build time.
  4. Dependency cleanup - Removes unused dependencies from sn-manager/go.mod.

What Looks Good

  • Clean separation between cascade reseed logic and HTTP handler layer
  • Proper semaphore-based concurrency control (1 concurrent reseed, 1 concurrent status probe)
  • Good error handling with partial results returned even on failure
  • Token-based auth gating with proper header validation
  • Write deadline extension for long-running operations
  • Self-probe optimization avoiding HTTP roundtrip for local node
  • Comprehensive status endpoint with distribution visibility across all supernodes
  • ListSupernodes added to the LumeraClient interface cleanly
  • Test stubs updated to implement the new interface method

Issues Found

# Severity File Description
1 nit swagger.json:460 Tab vs space indentation inconsistency in recovery endpoint blocks
2 low swagger.json:555-561 Reseed and status response schemas are untyped (additionalProperties: true) unlike the health response

No blocking issues found. Both comments are minor documentation/style suggestions.

Copy link

@roomote roomote bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review from Rooviewer - minor suggestions, overall looks solid.

Copy link

@roomote roomote bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving - the recovery admin API implementation is well-structured with proper auth gating, concurrency control, and error handling. Only minor swagger documentation suggestions noted inline.

@j-rafique j-rafique merged commit 15202b2 into master Feb 19, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments