Skip to content

Schedule admitted v2 pieces across peer pipelines and commit workers - #199

Closed
linroid wants to merge 2 commits into
torrent-v2-08-commit-ownershipfrom
torrent-v2-08-piece-scheduler
Closed

linroid wants to merge 2 commits into
torrent-v2-08-commit-ownershipfrom
torrent-v2-08-piece-scheduler

Conversation

@linroid

@linroid linroid commented Sep 12, 2026 •

Copy link
Copy Markdown
Owner

The admitted v2 piece ledger now connects peer block pipelines to assembly and commit workers. It bounds active pieces including submitted commits, assigns each canonical block once across peers, and reclaims unanswered assignments when a peer leaves. Late callbacks must match both peer identity and request ticket. Complete assemblies survive commit queue pressure, and only known completion tickets can update scheduler verification or make a rejected piece retryable.

Stacked on #198, under #162. Automatic piece-selection policy, transport/session wiring, generation barriers, upload/hash serving and the remaining production capabilities/gates are still required.

Validation at 25196bfb07a2348e505dc245e4e7c2b0efcdb07a:

  • 458 JVM tests and 437 actually executed iOS simulator tests; zero failures, errors or skips.
  • Both pinned v1 conformance scenarios and the native-runtime dependency guard pass.
  • Tests connect two peer pipelines to one assembly and the real store/worker, and cover peer replacement, stale callbacks, selected files, state/payload admission, commit queue pressure and corrupt-piece retry.
  • The two-peer fixture reserves enough credit for assembly, pending response and decoded frame simultaneously; production limits are unchanged.

Scheduler recovery follow-up at d94e32463b39d7d7bf77ea41ca1da6c2c0ae795b: a failed request write now removes the peer’s earlier unanswered assignments before propagating the error. A regression injects failure on the second request and proves a replacement peer can request the first abandoned block. Full validation passes: 459 JVM tests, 438 actually executed iOS simulator tests, zero failures/errors/skips, both pinned v1 conformance scenarios and the native-runtime guard.

@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:31:19.563384Z 25196bf 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

  667 files  + 5    667 suites  +5   4m 27s ⏱️ +20s
2 756 tests +15  2 756 ✅ +15  0 💤 ±0  0 ❌ ±0 
3 672 runs  +25  3 672 ✅ +25  0 💤 ±0  0 ❌ ±0 

Results for commit d94e324. ± Comparison against base commit 8ec7742.

@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-piece-scheduler 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