Skip to content

feat(connect_tcp): unify bidirectional transfer control and per-object resume - #17

Merged
F18-Maverick merged 19 commits into
F18-Maverick:mainfrom
F18-Ray:fix_pause_start_trans
Nov 21, 2026
Merged

F18-Maverick merged 19 commits into
F18-Maverick:mainfrom
F18-Ray:fix_pause_start_trans

Conversation

@F18-Ray

@F18-Ray F18-Ray commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Pull Request

Summary

<What this PR does and which problem it solves, in two or three sentences.>

Change type

  • New feature (Added)
  • Behaviour change (Changed)
  • Feature deprecated (Deprecated)
  • Feature removed (Removed)
  • Bug fix (Fixed)
  • Security fix (Security)
  • Docs / refactor (no user-visible change)

Checklist

  • Local tests pass (pytest)
  • Ruff passes (ruff check)
  • Related docs updated (docstring / .rst / README)
  • Changelog updated (if there is a user-visible change)
  • No new linter suppressions (# noqa / # type: ignore)

Documentation impact

  • No user-visible change
  • Updated docs/source/...
  • Changelog only
  • Needs a follow-up issue #___

Design decisions

  • No significant design decision in this change
  • Added a design note: docs/source/design/___
  • Implicit assumptions to record (explained below)

Design note summary (if any)

<Fill this in when "implicit assumptions to record" is ticked; or link the docs/source/changes/PR-*.md note.>

@codecov-commenter

codecov-commenter commented Nov 17, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

- Reuse the existing completed fid route for explicit Source EOF reconfirmation; validate the current session, original target, complete header, and exact EOF without reopening Targets.
- Preserve route and shared upload state on failed ACK writes; clean only owning records after the real final ACK, and limit scoped receive-owner conflicts to the current route targets.
- Add real-socket regressions for repeated ACK failure, offline Targets, malformed headers, finalizing owners, independent recovery, and same-FID reuse across different Targets.
- Migrate the obsolete automatic pause/start backpressure test after explicit user approval; retain actual reader gating, queue bounds, contents, and final ACK checks.
- Verification: final targeted combination 58 passed; eight standalone transport scenarios passed. The one full run had 984 passed, 1 failed, 1 skipped before the approved legacy-test migration; no second full run. Typecheck retains 37 diagnostics outside the changed production ranges.
- Record C4 paths, runtime evidence, review findings, and limitations in transfer-control-lifecycle-report.md. No public signature, wire, persistence schema, CI, dependency, merge, or push changes.
- Filter self targets in the shared Client forwarding entry before allocating a FID, creating upload state, or negotiating listeners; use the filtered peers consistently for progress and wire targets.
- Identify self from the captured control socket. Accept configured host aliases only when they resolve to its actual local IP, preserving different-IP/same-port targets after no bind or source-port fallback.
- Cover console files, nested folders, mixed targets, retained-row rejection, wildcard/hostname binds, unbound clients, and real bind-conflict fallback with consumer-visible socket regressions.
- Verification: final full pytest 994 passed, 1 skipped; final self-target regressions 8 passed; V5 66 passed and resume subset 32 passed before the final alias refinement; three standalone transport/Web scenarios passed with zero remaining workers.
- Typecheck retains 37 diagnostics outside changed production ranges. Record runtime evidence, the resolved Spec P2, platform limits, and unchanged Web asynchronous registration behavior in the lifecycle report.
- No public signature, wire, persistence schema, Source sending algorithm, CI, dependency, merge, or push changes; C6 remains unimplemented.
- Record the single affected-scope V6 run: 692 passed, 1 skipped on Linux/Python 3.10.20.
- Map P01-P20 to actual socket/content/ACK/owner evidence; retain five partial-coverage paths and explicit platform/protocol limits.
- Reconcile requirements, plan, current report and change note; record observer corrections and both read-only reviews.
- Acceptance documents only: no production, tests, wire/schema, dependencies or CI changes; no merge or push.
- Claim a fresh upstream receive slot before publishing a new relay. Check reservation identity at publication and release only that claim if registration fails. Leave existing-route recovery and the wire format unchanged.
- Cover listener-first and relay-first admission, competing relays, and a real interrupted ordinary upload that resumes from its 22-byte prefix through the final ACK.
- Verification: test_fid_routes.py (48 passed); test_tcp_transfer_resume.py -k "fid_collision or resume" (78 passed).
- Treat /resume_trans as a secure transfer control on both Client and Server. Reject it before plaintext fallback and keep the existing raw handshake/coordination exceptions unchanged.
- Regress missing/non-secure channels and a framing change at the final write lock. Exercise ordinary and relay recovery on encrypted sockets, confirm decoded FID/offset, ciphertext-only wire and final ACK; verify resume writes fail during real rekey.
- Verification: test_transfer_handshakes.py (23 passed); test_tcp_transfer_control.py and test_tcp_transfer_resume.py -k "encrypted or rekey or resume" (144 passed, 1 skipped, 27 deselected).
- Enforce the numeric resume contract at format_resume_line: accept only a nonnegative integer, including zero, and raise ValueError before rendering any wire command for invalid offsets.
- Cover None, query marker, numeric text, negative, boolean and float inputs; preserve existing valid zero/positive round trips. Document that parser, wire identities and persistence remain unchanged.
- Verification: .venv/bin/python -m pytest -q test/unit/network_api/test_resume_matching.py (44 passed). Ruff was unavailable at .venv/bin/ruff; the targeted pytest suite passed.
@F18-Ray F18-Ray changed the title feat(connect_tcp)!: unify bidirectional transfer control and per-object resume feat(connect_tcp): unify bidirectional transfer control and per-object resume Nov 21, 2026
@F18-Maverick
F18-Maverick merged commit ddb71c9 into F18-Maverick:main Nov 21, 2026
14 checks passed
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.

3 participants