Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Validator crashes on valid JSON with unexpected shapes

Aberta
#80 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
45/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
python
Domínio
testing, tooling

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Python
Estrelas
103
Forks
78
Métricas de merge de PRs
Nenhum PR com merge em 30d

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de zai-org/zcode-plugins

Todas as issues de zai-org/zcode-plugins

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.