Validator crashes on valid JSON with unexpected shapes
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
- 45/100
Rechercherichtung
Start by reading scripts/validate.py and trace how it handles parsed marketplace JSON, plugin entries, and manifest fields. Reproduce the crash with the top-level [] case, then check the listed shape and scalar cases. Done means each invalid input exits with status 1 and identifies the file or field without a traceback; the issue says regression coverage is needed, but tests are excluded by the intake policy.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Problem
python3 scripts/validate.py assumes that parsed JSON values and marketplace plugin entries are objects. Syntactically valid JSON with another shape can therefore terminate with an AttributeError or TypeError instead of reporting a validation error.
Examples include:
- a top-level array, string, number, or
nullinmarketplace.json; - a non-object entry inside
marketplace.json.plugins; - a top-level non-object value in a plugin manifest;
- non-string values for fields later passed to regex or path operations.
Expected behavior
The validator should exit with status 1 and identify the invalid file or field, without a Python traceback.
Reproduction
- Replace the top-level object in a checkout copy of
marketplace.jsonwith[]. - Run
python3 scripts/validate.py. - The validator reaches object-only operations on the parsed value and crashes.
A complete defensive implementation and regression coverage for arrays, strings, numbers, null, malformed plugin entries, and scalar field mismatches were prepared in #78. The external intake policy does not allow changes to scripts/ or tests/, so that PR is being closed and this issue records the reproducible maintainer-owned fix instead.
- Vorherrschende Sprache
- Python
- Sterne
- 95
- Forks
- 57
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine 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 zai-org/zcode-plugins
-
video-agent-kit (0.4.3): hooks invoke python3, which doesn't exist on Windows — SessionStart/UserPromptSubmit/Stop hooks fail on every triggerEvtl. vergeben @dvd233 hat das vor 21 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
zai-org/zcode-plugins#14 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
zai-org/zcode-plugins#88 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
zai-org/zcode-plugins#86 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 44/100
zai-org/zcode-plugins#84 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 43/100
zai-org/zcode-plugins#76 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in zai-org/zcode-plugins
Ähnliche Issues
-
customer-reported question
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Azure/azure-sdk-for-python#49548 · 1 Kommentar · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
btclib-org/btclib-wallet#409 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Phase 2 PSA Capability & Career Profile
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
bcgov/digital-journeys#2310 ·
-
bug good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
fastmachinelearning/hls4ml#1582 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
Sort modelsOffenenhancement good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag