Give archive metadata a typed, immutable form
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
- 70/100
Rechercherichtung
Start with the planned new module morango/sync/archive.py and the ArchiveManifestEntry model from #376, then compare peer-info construction with MorangoInfoViewSet at morango/api/viewsets.py:491. Run the unit tests in tests/testapp/tests/sync/test_archive.py; done means round-trip equality, peer-info keys, unknown-key preservation, immutable fields, and replace() behavior.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Overview
An ArchiveManifest value object gives the archive metadata typed fields, and it converts to and from the stored rows. This work is part of milestone M5.
Background & Motivation
The metadata rows hold JSON strings. Callers must not parse these strings themselves. A typed value object keeps the parsing in one place. It also gives the disk connection its peer info, in the same shape that a morango server gives.
Design: spec. Plan: implementation plan, Task 16.
Description & Expected Outcomes
ArchiveManifest has one field for each metadata key in spec §3.4. It converts to a list of ArchiveManifestEntry rows and back. If the rows contain a key that the reader does not know, the manifest keeps it. This lets metadata from a newer writer survive a read.
The manifest gives a peer info dict with the same shape as the morango info endpoint. A replace method returns a changed copy and does not change the original.
Deliverables & Contracts
The value object delivers these capabilities:
- Conversion to and from
ArchiveManifestEntryrows, with JSON values. to_peer_info(), with the keysinstance_id,instance_hash,version, andcapabilities, plus the keys ofinstance_info.replace(**changes), which returns a new manifest.- Immutable fields.
Acceptance Criteria
- A manifest converted to rows and back is equal to the original.
-
to_peer_info()contains the four keys and the mergedinstance_infokeys. - An unknown row key survives the conversion to a manifest and back to rows.
-
replace(filter="x")returns a new manifest, and the original is not changed.
Technical Pointers & Architecture
- Target Components / Context: New module
morango/sync/archive.py. - Related Patterns: The peer info shape comes from
MorangoInfoViewSetatmorango/api/viewsets.py:491. - Data Model & Schema Considerations: Uses the
ArchiveManifestEntrymodel from #376. The code must work on Python 3.6, sodataclassesis not available. - Resilience & Failure Modes: None.
Notes & Tradeoffs
- Dependencies: Blocked by: #376 (
ArchiveManifestEntrymodel). Blocks: #378, #382. - Testing Requirements: Unit tests in
tests/testapp/tests/sync/test_archive.py. - Tradeoffs & Alternatives Considered: The spec keeps the table as key and value rows, and it gives callers only the typed form.
- Compatibility & Migrations: Unknown keys survive, so an older reader does not lose data from a newer writer.
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