Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Validator crashes on valid JSON with unexpected shapes

Aperta
#80 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
testing, tooling

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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 null in marketplace.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

  1. Replace the top-level object in a checkout copy of marketplace.json with [].
  2. Run python3 scripts/validate.py.
  3. 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.

Lingua principale
Python
Stelle
95
Fork
57
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di zai-org/zcode-plugins

Tutte le issue di zai-org/zcode-plugins

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.