Prove that disk and network peers obey the same Peer protocol
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 70/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- postgresql, python
- Lĩnh vực
- backend, testing-qa
Hướng nghiên cứu
Bắt đầu tại tests/testapp/tests/integration/test_peer_protocol_contract.py bằng cách đọc network subclass từ #372 và harness của server thứ hai trong tests/testapp/tests/integration/test_syncsession.py. Thêm disk subclass bằng cách sử dụng một đường dẫn tạm thời và archive alias, sau đó chạy python -O -m pytest tests/testapp/tests/integration/test_peer_protocol_contract.py -v trong môi trường postgres tox. Hoàn thành khi cả hai subclass đều vượt qua tất cả bảy contract case không thay đổi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Overview
The contract suite runs its cases against the disk connection, so that both connection types show the same Peer protocol behavior. This issue is part of milestone M7 (verification).
Background & Motivation
#372 wrote the contract suite and ran it against the network connection. The network connection is the reference implementation. The disk connection copies the order of the server stage steps, and that copy can drift from the server behavior over time.
A run of the same cases against the disk connection catches this drift early. If a case fails, the test identifies the exact protocol behavior that differs.
Design: spec. Plan: implementation plan, Task 24.
Description & Expected Outcomes
A disk subclass of the contract suite runs every contract case with a DiskSyncConnection on a temporary path. The subclass reads the peer records from the archive alias. The contract cases themselves do not change.
If a disk case fails, the fix goes into DiskSyncConnection. The contract case stays as the reference behavior.
Deliverables & Contracts
The feature delivers these capabilities:
- A disk subclass of
PeerProtocolContractin the contract suite. - All contract cases pass for the network subclass and the disk subclass.
Acceptance Criteria
-
DiskPeerProtocolTestCaseexists and runs all cases ofPeerProtocolContract. - All seven contract cases pass for both subclasses.
- No contract case changes in this issue.
- The contract suite passes in the
postgrestox environment.
Technical Pointers & Architecture
- Target Components / Context:
tests/testapp/tests/integration/test_peer_protocol_contract.py. - Related Patterns: The network subclass from #372 and the second-server harness in
tests/testapp/tests/integration/test_syncsession.py. - Data Model & Schema Considerations: None.
- Resilience & Failure Modes: Contract case 6 expects a rejection of records outside the filter. The network raises
requests.HTTPError, and the disk connection raisesValidationError.
Notes & Tradeoffs
- Dependencies: Blocked by: #372 (contract suite, network half), #384 (disk Peer protocol). Blocks: none.
- Testing Requirements: Integration tests. Run
python -O -m pytest tests/testapp/tests/integration/test_peer_protocol_contract.py -v. - Tradeoffs & Alternatives Considered: The parity test in #386 compares data outcomes. The contract suite compares protocol behavior. Both are necessary.
Metadata
- Complexity: Low
- 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
- 23
- Merge trung bình
- 1 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 4
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
-
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 ·
-
DEV: backend P0 - critical TAG: tech update / debt TAG: unit tests
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
learningequality/morango#364 ·
-
DEV: backend TAG: new feature
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
learningequality/morango#388 ·
-
DEV: backend TAG: unit tests
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
learningequality/morango#386 ·
-
DEV: backend P0 - critical TAG: new feature
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
learningequality/morango#384 ·
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 68/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
modelcontextprotocol/python-sdk#3648 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
docs good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
VenetoStato/giorgio#6 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Claiming namespace ddalusĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
EclipseFdn/open-vsx.org#13831 ·
Maintainer thường phản hồi trong vòng 1 ngày