Repository navigation
feat(connect_tcp): unify bidirectional transfer control and per-object resume - #17
Merged
Merged
Conversation
|
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Summary
<What this PR does and which problem it solves, in two or three sentences.>
Change type
Checklist
pytest)ruff check)# noqa/# type: ignore)Documentation impact
Design decisions
Design note summary (if any)
<Fill this in when "implicit assumptions to record" is ticked; or link the
docs/source/changes/PR-*.mdnote.>