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

lib/yaml-subset.awk keeps the first duplicate key where the CI parser rejects the file

Aberta
#7,331 1 comentário 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
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
54/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
awk, github-actions, python, shell
Domínio
build-system, testing

Direção de pesquisa

Read lib/yaml-subset.awk and trace how --strict is passed by parse-concern-value.sh; inspect scripts/shared-copies.txt and the consumers of non-strict mode. Add duplicate-key rejection for keys in the same mapping in strict mode, propagate the canonical change with bash scripts/sync-shared-copies.sh, and check that non-strict consumers retain their current behavior. Done means strict mode rejects the duplicate case while existing non-strict behavior is preserved.

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

Descrição

priority: medium

Problem

When a mapping repeats a key, the shared awk YAML reader lib/yaml-subset.awk keeps the first value. The CI config parser rejects the same file. So a local reader and CI can disagree about one config.

Concrete case: babysit_merge_policy.py reads docs/conventions/pr-pipeline.yaml through this reader (via parse-concern-value.sh --strict) to decide the unattended merge rung. If the merge: block contained a key twice, CI would reject the file but the local reader would act on the first value. The CI rejection keeps the bad config off main, so this is latent today.

Expected

--strict mode treats a duplicate key in the same mapping as a parse error, the same as the CI parser.

Scope

  • Canonical source: lib/yaml-subset.awk.
  • Copies registered in scripts/shared-copies.txt (16 files on main); propagate with bash scripts/sync-shared-copies.sh.
  • Check each consumer of the non-strict mode keeps its current behavior, or opt it in.

Related

  • #6699: the Python yaml_subset.py reports the wrong line for a duplicate key in a sequence item. It is a separate reader.
  • #6202: auto-merge-safe-prs. Found by the Phase 8 security review on #7324.

🤖 Generated with Claude Code

Linguagem predominante
Shell
Estrelas
22
Forks
2
Merge médio
8h 27min
PRs com merge (30d)
957

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 melodic-software/claude-code-plugins

Todas as issues de melodic-software/claude-code-plugins

Issues semelhantes

Mais issues de Shell/Bash

Receba novas issues na sua caixa de entrada

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