You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 PeerProtocolContract in the contract suite.
All contract cases pass for the network subclass and the disk subclass.
Acceptance Criteria
DiskPeerProtocolTestCase exists and runs all cases of PeerProtocolContract.
All seven contract cases pass for both subclasses.
No contract case changes in this issue.
The contract suite passes in the postgres tox environment.
Resilience & Failure Modes: Contract case 6 expects a rejection of records outside the filter. The network raises requests.HTTPError, and the disk connection raises ValidationError.
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.
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
DiskSyncConnectionon 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:
PeerProtocolContractin the contract suite.Acceptance Criteria
DiskPeerProtocolTestCaseexists and runs all cases ofPeerProtocolContract.postgrestox environment.Technical Pointers & Architecture
tests/testapp/tests/integration/test_peer_protocol_contract.py.tests/testapp/tests/integration/test_syncsession.py.requests.HTTPError, and the disk connection raisesValidationError.Notes & Tradeoffs
python -O -m pytest tests/testapp/tests/integration/test_peer_protocol_contract.py -v.Metadata
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.xcodebase.