Skip to content

Own v2 frame readers and wake on response deadlines - #196

Closed
linroid wants to merge 1 commit into
torrent-v2-08-piece-assemblyfrom
torrent-v2-08-inbox
Closed

linroid wants to merge 1 commit into
torrent-v2-08-piece-assemblyfrom
torrent-v2-08-inbox

Conversation

@linroid

@linroid linroid commented Sep 12, 2026

Copy link
Copy Markdown
Owner

The v2 actor now has a bounded frame inbox that wakes on block/hash response deadlines while a child reader waits on the socket. Scope exit closes the connection, cancels and joins the reader, and reclaims queued or undelivered frame credit; dispatched frames remain consumer-owned. Block expiry tears down the stream, while hash expiry returns exact tickets without disconnecting a healthy peer.

Stacked on #195, including its full-size assembly review fix, under #162. This supplies reader ownership and idle deadline dispatch; scheduler commands, upload/hash serving and full runtime integration remain required. Long storage work still needs admitted workers so it cannot block the actor.

Validation at 3a0f0cd7:

  • 449 JVM tests and 428 actually executed iOS simulator tests; zero failures, errors or skips.
  • Both pinned v1 conformance scenarios and the native-runtime dependency guard pass.
  • Tests cover silent peers, exact expiry tickets, backward clocks, bounded queued/blocked frame ownership, reader joins on cancellation and malformed input, and retained dispatched credit.
  • The real TCP handshake/block/assembly/storage test now uses the inbox and commits after reader shutdown. The inherited 16 MiB piece regression passes under the default 32 MiB transfer budget.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-12T18:04:26.024962Z 3a0f0cd PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results

  657 files  + 5    657 suites  +5   4m 21s ⏱️ +4s
2 726 tests +15  2 726 ✅ +15  0 💤 ±0  0 ❌ ±0 
3 622 runs  +25  3 622 ✅ +25  0 💤 ±0  0 ❌ ±0 

Results for commit 3a0f0cd. ± Comparison against base commit 8013ac4.

@linroid

linroid commented Sep 20, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #236 (V2 scheduling and download execution) in the consolidated eight-PR stack for #162.

The replacement preserves this PR's code and subsequent fixes; its description links the original head and review discussions. The only additional consolidation fix is the CI-discovered listener cancellation regression, documented on the replacement. All eight replacements have passed their required CI checks.

Closing without merging. This branch and its discussions remain available for reference. Review index: #162 (comment)

@linroid linroid closed this Sep 20, 2026
@linroid
linroid deleted the torrent-v2-08-inbox branch September 20, 2026 11:13
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