Skip to content

Conversation

@j-rafique
Copy link
Contributor

@j-rafique j-rafique commented Dec 29, 2025

  1. Per-RPC Upload Task Tracking — Shared state caused races; now uses per-RPC uploadHandle for concurrency safety. supernode/supernode/transport/grpc/cascade/register.go:32,105,117

  2. Abort Work on Event Streaming Failures — Ignored send failures wasted work after client disconnect; now checks errors and stops immediately. supernode/supernode/cascade/task.go:21, register.go:62, download.go:51,106

  3. RQStore First-Batch Flag Key Consistency — Wrong key prevented worker pickup; now uses taskID for proper symbol replication/deletion. supernode/supernode/adaptors/p2p.go:67,137, pkg/storage/rqstore/store.go:136, p2p/kademlia/rq_symbols.go:36

  4. Unique Decode Workspace Per Download — Deterministic paths caused collisions; now uses <base>/downloads/<actionID>/<uuid> for isolation. supernode/pkg/codec/decode.go:55,60

  5. Guaranteed Download Workspace Cleanup — Failures leaked workspaces; handler now defers cleanup to prevent disk leaks. supernode/supernode/transport/grpc/cascade/download.go:31,55, cascade/download.go:92

  6. Zero-Copy Download Streaming — Per-chunk copies reduced throughput; now reuses buffer for higher performance. supernode/supernode/transport/grpc/cascade/download.go:90,94

  7. Upload Temp Dir Cleanup on Errors — Early returns leaked temp dirs; now defers os.RemoveAll(tempDir) after creation. supernode/supernode/transport/grpc/cascade/register.go:38,44, handler_test.go:42

  8. Reject Duplicate In-Flight Uploads — Concurrent calls doubled work; atomic tracker now fast-fails duplicates with AlreadyExists. supernode/pkg/task/task.go:33, handle.go:49, cascade/register.go:103,110

@roomote
Copy link

roomote bot commented Dec 29, 2025

Rooviewer Clock   See task on Roo Cloud

Review of changes since last review (5ca4a36...e8123cd):

The latest commit deletes supernode/adaptors/p2p_test.go, which was the test verifying that UpdateIsFirstBatchStored is called with taskID (not actionID). This removes test coverage for one of the key audit fixes in this PR. Consider keeping this test to prevent regressions.

  • Deleted test file supernode/adaptors/p2p_test.go removes coverage for the taskID vs actionID fix
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

roomote[bot]
roomote bot previously approved these changes Dec 29, 2025
@j-rafique j-rafique changed the title Audit fixes Supernode enhancements, fixes Dec 29, 2025
@mateeullahmalik mateeullahmalik self-requested a review December 30, 2025 13:52
@mateeullahmalik mateeullahmalik merged commit c2a7c0a into master Dec 30, 2025
12 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.

3 participants