Use folded `description: >-` instead of `|` so WORKFLOW_DESCRIPTION reaches threat detection as one line
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 65/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- github-actions, javascript
- Lĩnh vực
- ci-cd
Hướng nghiên cứu
Bắt đầu từ các nguồn workflow dùng description: |, chẳng hạn issue-triage.md, và khóa description trong frontmatter của chúng. Đọc cách WORKFLOW_DESCRIPTION được điền trong setup_threat_detection.cjs và mục trong threat_detection.md. Hoàn thành khi các mô tả dạng literal block được đổi thành >-, các workflow được biên dịch lại bằng gh aw compile, và prompt threat detection hiển thị mô tả trên một dòng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Most workflows here write their frontmatter description as a literal block (description: |): 20 of them, against 3 that use > and the rest that use a plain string. The descriptions are prose wrapped at about 80 columns, so | keeps that source wrapping as real newlines in the value. Switching them to >- (folded, no trailing newline) would give the sentence as written.
Where the description ends up
gh aw compile copies description into two places in the lock file:
-
The header comment at the top of
*.lock.yml. -
WORKFLOW_DESCRIPTION, an env var on the threat-detection job.setup_threat_detection.cjssubstitutes it into the detector's prompt, where the template puts it inside a bullet:- Workflow name: {WORKFLOW_NAME} - Workflow description: {WORKFLOW_DESCRIPTION} - Full workflow instructions and context in the prompt file
The second one is what the description is for at runtime: it tells the detector what the workflow is meant to do, so it can judge whether the agent's output fits.
What | does to it
With issue-triage.md as it is today, the compiled value is:
WORKFLOW_DESCRIPTION: "Triages new and reopened issues by assessing completeness, setting issue type\nand priority labels, finding duplicates, and posting a concise maintainer-facing\nreport with actionable next steps."
so the detector receives:
- Workflow description: Triages new and reopened issues by assessing completeness, setting issue type
and priority labels, finding duplicates, and posting a concise maintainer-facing
report with actionable next steps.
The line breaks come from the editor's wrap column, not from the meaning, and they break the bullet the template sets up. A model will most likely still read it correctly, so this is a tidiness fix, not a bug. But the value is going into a prompt, and >- gives exactly the one-line string the template expects:
- Workflow description: Triages new and reopened issues by assessing completeness, setting issue type and priority labels, finding duplicates, and posting a concise maintainer-facing report with actionable next steps.
Cost
The source .md looks the same: same indentation, same wrapping, one changed indicator. When compiled with gh-aw v0.89.21, the only other lock-file changes are frontmatter_hash and the header comment, which becomes one long line instead of three wrapped ones. Nobody needs to read that comment closely, since the .md is right there.
I made this change to a copy of issue-triage.md in my own repo: shbernal/pptx-ts#276.
Suggestion
Change description: | to description: >- in the workflows that use it and recompile. The three that use > could become >- too, which drops the trailing newline (the compiler already trims it, so in practice they produce the same output). If you'd take a PR for this, I'm happy to send one.
- Ngôn ngữ chính
- Python
- Star
- 1.1k
- Fork
- 163
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của githubnext/agentics
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
githubnext/agentics#420 ·
-
agentic-workflows automated documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 1/100
githubnext/agentics#419 ·
-
FrontendĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 1/100
githubnext/agentics#418 ·
-
[aw] Detection RunsĐang mởagentic-workflows
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 8/100
githubnext/agentics#415 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
githubnext/agentics#412 ·
Tất cả issue của githubnext/agentics
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
bad-antics/lateralus-lang#1489 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 69/100
anderspitman/awesome-tunneling#330 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
scikit-hep/coffea#1668 ·