Skip to content

Admit outbound v2 peer frames before encoding and writing - #193

Closed
linroid wants to merge 1 commit into
torrent-v2-08-request-rejectfrom
torrent-v2-08-outbound
Closed

linroid wants to merge 1 commit into
torrent-v2-08-request-rejectfrom
torrent-v2-08-outbound

Conversation

@linroid

@linroid linroid commented Sep 12, 2026

Copy link
Copy Markdown
Owner

The v2 transport could request and receive hashes but could not admit ordinary payload/control writes or hash replies. Add typed outbound paths that reserve encoder scratch before copying a payload and hold it through the write. Validation or admission failure emits no bytes; cancellation, timeout, or a partial write closes the stream and releases pending hash requests.

Stacked on #192, under #162. This enables the outbound side of the upcoming v2 peer actor; proof generation, incoming request ownership, seeding policy, block deadlines and runtime integration remain unfinished.

Validation at 7e7c32e57175b845c6df0b0a0189dc41f3697a22:

  • 430 JVM tests and 409 actually executed iOS simulator tests; zero failures, errors or skips.
  • Both pinned v1 conformance scenarios and the native-runtime dependency guard pass.
  • Tests cover frame admission before writes, retained credit during backpressure, cancellation/partial-write cleanup, the one-million-piece bitfield, and bidirectional hash exchange over TCP using the new reply path.

@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-12T17:35:06.872550Z 7e7c32e 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

  642 files  + 5    642 suites  +5   3m 59s ⏱️ +2s
2 669 tests +15  2 669 ✅ +15  0 💤 ±0  0 ❌ ±0 
3 527 runs  +25  3 527 ✅ +25  0 💤 ±0  0 ❌ ±0 

Results for commit 7e7c32e. ± Comparison against base commit 76cb3cc.

@linroid

linroid commented Sep 20, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #235 (V2 handshake, hash exchange and bounded transport) 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-outbound 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