Prove that disk and network peers obey the same Peer protocol
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 70/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- postgresql, python
- Área
- backend, testing-qa
Línea de trabajo
Empieza en tests/testapp/tests/integration/test_peer_protocol_contract.py leyendo la subclase de red de #372 y el harness del segundo servidor en tests/testapp/tests/integration/test_syncsession.py. Añade la subclase de disco usando una ruta temporal y un alias de archivo, y luego ejecuta python -O -m pytest tests/testapp/tests/integration/test_peer_protocol_contract.py -v en el entorno postgres tox. Se considera terminado cuando ambas subclases superen los siete casos de contrato sin cambios.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 15
- Forks
- 23
- Merge medio
- 1 d 11 h
- PR fusionados (30 d)
- 4
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de learningequality/morango
-
DEV: dev-ops DEV: distributions DOCS: developer
Dificultad 1/5 1-3 horas Aptitud para principiantes 78/100
learningequality/morango#387 ·
-
DEV: backend P0 - critical TAG: tech update / debt TAG: unit tests
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
learningequality/morango#364 ·
-
DEV: backend TAG: new feature
Dificultad 5/5 Más de una semana Aptitud para principiantes 10/100
learningequality/morango#388 ·
-
DEV: backend TAG: unit tests
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
learningequality/morango#386 ·
-
DEV: backend P0 - critical TAG: new feature
Dificultad 4/5 3-5 días Aptitud para principiantes 38/100
learningequality/morango#384 ·
Todos los issues de learningequality/morango
Issues similares
-
area/install reliability
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
FluidNumerics/fluid-walk-blocker#191 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
TransformerLensOrg/TransformerLens#1868 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
climate-analytics-lab/jax-gcm#1057 ·
Los mantenedores suelen responder en 1 día