Session contexts support network and disk peers
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 55/100
- Issue-Typ
- Refactoring
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- python
- Bereich
- backend, distributed-systems
Rechercherichtung
Read morango/sync/context.py, especially NetworkSessionContext at lines 311-351, and the NetworkSessionContextTestCase in tests/testapp/tests/sync/test_context.py. Run the existing context and characterization tests first. Done means both subclasses meet the stated stage, state-update, inheritance, and backoff requirements, with the characterization and full suites passing unchanged.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Overview
A PeerSessionContext base class holds the peer side of a sync, with one subclass for each connection type. This work is part of milestone M4 (shared operations refactor).
Background & Motivation
Operations select the context that they handle by its type. Today only NetworkSessionContext represents a peer. A shared base class lets one operation handle both network and disk peers. The subclasses let an operation handle one connection type only, when that is necessary.
This task changes no behavior for network syncs.
Design: spec. Plan: implementation plan, Task 12.
Description & Expected Outcomes
PeerSessionContext gets the body of the current NetworkSessionContext. It holds the connection and keeps the stage state in memory. NetworkSessionContext and a new DiskSessionContext become subclasses of it. DiskSessionContext uses a maximum backoff interval of 1 second.
Deliverables & Contracts
The contexts deliver these capabilities:
NetworkSessionContextis a subclass ofPeerSessionContext, and its behavior does not change.DiskSessionContextis a subclass ofPeerSessionContext, withmax_backoff_intervalequal to 1.- Both subclasses start at stage
initializingand update their state in the same way.
Acceptance Criteria
-
issubclass(NetworkSessionContext, PeerSessionContext)is true. -
DiskSessionContext(connection).stageequalstransfer_stages.INITIALIZING. - The
update_statetests forNetworkSessionContextalso pass forDiskSessionContext. - The characterization suite passes without edits.
- The full test suite passes.
Technical Pointers & Architecture
- Target Components / Context:
morango/sync/context.py,NetworkSessionContextat:311-351. - Related Patterns:
NetworkSessionContextTestCaseattests/testapp/tests/sync/test_context.py:252. - Data Model & Schema Considerations: None.
- Resilience & Failure Modes: None.
Notes & Tradeoffs
- Dependencies: Blocked by: #370 (
Connectioninterface). Blocks: #374, #383. - Testing Requirements: This is a refactor task. The characterization suite from #363 and #364 must pass without edits.
- Tradeoffs & Alternatives Considered: One context class for all peers makes connection-specific operations impossible. The subclasses keep that option.
- Compatibility & Migrations:
NetworkSessionContextkeeps its name, so code that checks for it still works.
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.
- Vorherrschende Sprache
- Python
- Sterne
- 15
- Forks
- 27
- Ø Merge
- 6 T. 44 Min.
- Gemergte PRs (30 T.)
- 13
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus learningequality/morango
-
Document disk export and deprecations in the changelogEvtl. wieder frei @ArpitaSamanta10 hat das vor 14 Tagen übernommen, und es ist kein Pull Request offen. OffenDEV: dev-ops DEV: distributions DOCS: developer
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 78/100
learningequality/morango#387 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
DEV: backend DEV: dev-ops TAG: unit tests
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
learningequality/morango#385 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 54/100
learningequality/morango#425 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 1/100
learningequality/morango#424 ·
Maintainer antworten meist innerhalb von 1 Tag
-
DEV: backend P2 - normal
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
learningequality/morango#416 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in learningequality/morango
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
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"Evtl. vergeben @cestercian hat das heute übernommen. Offencomp/cli P2 type/bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
NousResearch/hermes-agent#162259 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug enhancement
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
AOSSIE-Org/PictoPy#1802 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 3 Tagen
-
community-request
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
NVIDIA-NeMo/Run#727 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bot-triaged module: higher order operators module: pickle module: pt2-dispatcher oncall: pt2 triaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
pytorch/pytorch#207247 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag