Skip to content

Separate torrent request reservations from peer dispatch - #203

Closed
linroid wants to merge 1 commit into
torrent-v2-08-interestfrom
torrent-v2-08-request-handoff
Closed

linroid wants to merge 1 commit into
torrent-v2-08-interestfrom
torrent-v2-08-request-handoff

Conversation

@linroid

@linroid linroid commented Sep 12, 2026

Copy link
Copy Markdown
Owner

A shared session scheduler currently waits for peer socket writes. This adds a reservation/acknowledgement path so per-peer actors can send independently while the session retains exclusive block assignments.

planNext reserves without I/O using session-owned availability. resolve checks exact plan identity and ticket issuer, preventing stale acknowledgements or another connection's ticket from displacing a reservation. Unsent requests release their reservation; detached peers release assignments after their actor has shut down. Peer actors must enqueue acknowledgements before forwarding responses. Existing synchronous adapters remain available.

Stacked on #202; part of #162. Full per-peer/session actor wiring and throughput gates remain outstanding.

Validation at 729497610059dcd07df58181aa036db060bf1272: 473 JVM and 452 executed iOS simulator tests, zero failures/errors/skips; both pinned v1 conformance scenarios and native dependency guard passed. New tests exercise no-write reservation, global deduplication, unsent rollback, stale acknowledgements, issuer mismatch, detach/replacement, and matching response delivery.

@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-12T19:14:29.092579Z 7294976 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

  677 files  ± 0    677 suites  ±0   4m 8s ⏱️ +3s
2 798 tests + 6  2 798 ✅ + 6  0 💤 ±0  0 ❌ ±0 
3 742 runs  +10  3 742 ✅ +10  0 💤 ±0  0 ❌ ±0 

Results for commit 7294976. ± Comparison against base commit cdcbe7a.

@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-request-handoff 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