Skip to content

Wire bounded scrape commands into active torrent sessions - #226

Open
linroid wants to merge 2 commits into
torrent-v2-11-source-privacyfrom
torrent-v2-11-session-scrape
Open

Wire bounded scrape commands into active torrent sessions#226
linroid wants to merge 2 commits into
torrent-v2-11-source-privacyfrom
torrent-v2-11-session-scrape

Conversation

@linroid

@linroid linroid commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Active torrent sessions can now request tracker scrape through their existing command owner. Requests contact only the current announce tracker, share bounded manual admission and serialized lifecycle ownership, and apply a 60-second cooldown even after failure or cancellation. Tracker estimates appear in credential-free status snapshots and never affect local progress or peer authorization.

The engine reserves response-decoding workspace before I/O, and session admission covers the added estimates and cooldown state. Missing results clear estimates; tracker replacement requires a new successful announce.

Stacked on #225 for #162. Validation: full JVM and executed iOS simulator suites, native-runtime guard, two existing Transmission v1 conformance scenarios, live engine scrape routing, failure/cancellation cooldowns, replacement, and shared command cleanup. Public controller/remote commands and durable throttling across restarts remain roadmap work.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 62ed289742

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +366 to +367
val lease = exchangeBudgets.metadata.reserve(64 * 1024 * 17)
?: return@scrape false

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Size scrape reservations for valid metadata budgets

When TorrentConfig.maxMetadataBytes is below 208 KiB (for example, a valid 64 KiB limit), the metadata partition has only maxMetadataBytes * 4 + 256 KiB, so this fixed 1,114,112-byte reservation can never succeed. Consequently every scrapeTracker() call silently returns false for those supported configurations without issuing I/O; either guarantee enough metadata-pool capacity in configuration validation or derive the scrape reservation so it fits the independently bounded 64 KiB response.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 584e0cc. The metadata exchange partition now has a shared scrape-workspace floor independent of maxMetadataBytes, and aggregate configuration validation includes that floor. The live session regression now uses a valid 64 KiB metadata limit: it failed before the fix and passes afterward. The combined child stack passes 605 JVM tests, 584 executed iOS simulator tests, the native-runtime guard, and both existing v1 conformance scenarios.

@chatgpt-codex-connector

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-13T00:20:25.951978Z 62ed289 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

  762 files  + 5    762 suites  +5   4m 20s ⏱️ +4s
3 179 tests +12  3 179 ✅ +12  0 💤 ±0  0 ❌ ±0 
4 377 runs  +20  4 377 ✅ +20  0 💤 ±0  0 ❌ ±0 

Results for commit 584e0cc. ± Comparison against base commit 66d004f.

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