Network connection speaks the transport-neutral Peer protocol
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- python
- Lĩnh vực
- backend, networking
Hướng nghiên cứu
Start in morango/sync/syncsession.py at the private HTTP methods around lines 457-517, then compare request data with NetworkOperation.create_transfer_session in morango/sync/operations.py:1209-1217. Add the six Peer methods while preserving request behavior, convert returned state through PeerTransferSession, unwrap pull results, and verify the characterization and full test suites pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Overview
NetworkSyncConnection implements the six methods of the Peer protocol. This work is part of milestone M3 (connection seam refactor).
Background & Motivation
Today the network operations call private HTTP methods on the connection and read raw JSON. The Peer protocol gives operations one interface for transfer sessions, and the network connection becomes one adapter for it. A second adapter for the archive comes later.
This task changes no behavior. The network connection sends the same HTTP requests as before.
Design: spec. Plan: implementation plan, Task 10.
Description & Expected Outcomes
NetworkSyncConnection gets these public methods:
create_transfer_sessionget_transfer_sessionupdate_transfer_sessionclose_transfer_sessionpush_record_chunkpull_record_chunk
Each method sends the same request as the private _… method that it replaces. Methods that return transfer session state return a PeerTransferSession value, not raw JSON. The pull method returns a list of records, and it removes the pagination wrapper when the server sends one.
Deliverables & Contracts
The connection delivers these capabilities:
- The six Peer protocol methods exist on
NetworkSyncConnectionwith the signatures in spec §3.2. - Each method sends the same HTTP method, URL, and body as its private counterpart.
- The private
_…methods keep their names, retries, gzip behavior, andignore_404behavior. - A 404 response on close does not raise an error.
Acceptance Criteria
- For each of the six methods, a test with a mocked
SessionWrapper.requestshows the same method, URL, and body as the private counterpart. - Each method that returns state returns a
PeerTransferSessionequal toPeerTransferSession.from_api_jsonof the response. -
pull_record_chunkreturns the inner list when the response is{"results": [...]}. -
close_transfer_sessiondoes not raise on a 404 response. - The characterization suite passes without edits.
- The full test suite passes.
Technical Pointers & Architecture
- Target Components / Context:
morango/sync/syncsession.py, private HTTP methods at:457-517. - Related Patterns: The request data for create comes from
NetworkOperation.create_transfer_sessionatmorango/sync/operations.py:1209-1217. - Data Model & Schema Considerations: None. The methods use
PeerTransferSessionfrom #369. - Resilience & Failure Modes: HTTP retries and error behavior stay the same as today.
Notes & Tradeoffs
- Dependencies: Blocked by: #369 (
PeerTransferSessionvalue object), #370 (Connectioninterface). Blocks: #372, #374, #384. - Testing Requirements: This is a refactor task. The characterization suite from #363 and #364 must pass without edits.
- Tradeoffs & Alternatives Considered: The spec rejects a disk connection that copies the HTTP method shapes. The Peer protocol uses transfer session values so that both adapters fit it.
- Compatibility & Migrations: No change to the wire format or to public methods that exist today.
Metadata
- Complexity: Medium
- Target Branch: release-v0.9.x
AI Usage
Drafted with Claude (Claude Code) from the approved design spec and implementation plan. The author reviewed the requirements, and the code references were checked against the release-v0.9.x codebase.
- Ngôn ngữ chính
- Python
- Star
- 15
- Fork
- 27
- Merge trung bình
- 6 ngày 44 phút
- Pull request đã merge (30 ngày)
- 13
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của learningequality/morango
-
Document disk export and deprecations in the changelogCó thể làm lại được @ArpitaSamanta10 đã nhận 14 ngày trước và không có pull request nào đang mở. Đang mởDEV: dev-ops DEV: distributions DOCS: developer
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
learningequality/morango#387 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DEV: backend DEV: dev-ops TAG: unit tests
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
learningequality/morango#385 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 54/100
learningequality/morango#425 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 1/100
learningequality/morango#424 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DEV: backend P2 - normal
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
learningequality/morango#416 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của learningequality/morango
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
hermes hooks doctor smoke test never checks the hook exit code — a crashing hook (exit=1) renders ✓ "ran clean" and "All shell hooks look healthy"Có thể đã có người làm @cestercian đã nhận hôm nay. Đang mởcomp/cli P2 type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
NousResearch/hermes-agent#162259 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
AOSSIE-Org/PictoPy#1802 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
community-request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
NVIDIA-NeMo/Run#727 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bot-triaged module: higher order operators module: pickle module: pt2-dispatcher oncall: pt2 triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
pytorch/pytorch#207247 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày