Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#7,331 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
54/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
awk, github-actions, python, shell
Lĩnh vực
build-system, testing

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Shell
Star
22
Fork
2
Merge trung bình
8 giờ 27 phút
Pull request đã merge (30 ngày)
957

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của melodic-software/claude-code-plugins

Tất cả issue của melodic-software/claude-code-plugins

Issue tương tự

Thêm issue về Shell/Bash

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.