Own-agent checks: reject the Actions bot id in admit.mjs and test the source label in pr-verify

オープン 初心者向け
#17,374 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
74/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
github-actions, javascript, node.js
領域
ci-cd, tooling

調査の方向性

.github/scripts/intake-triage/admit.mjs の 274 行目と 295-298 行目付近から始め、そこでは rules validator と ownAgentIds が正の整数を受け入れ、1101 行目の ACTIONS_BOT_ID と比較します。次に .github/scripts/pr-verify/resolve-pr.mjs の 1008 行目付近を読み、その source: ラベルチェックを admission の SOURCE_LABEL と babysit_verify_evidence.py と比較します。Actions bot id と不正な source: ラベルを拒否するテストを追加し、その後、関連する intake-triage と pr-verify のテストスイートを実行します。完了とは、出荷済みのルールが以前と同じ issue を admit し verify する一方で、両方のチェックが早期に失敗することを意味します。

索引モデルが issue の本文から書いたものです。

説明

Summary

Two checks that #16999 added for own-agent issues are looser in one place than in the others that read the same rule.

  1. .github/scripts/intake-triage/admit.mjs: the rules validator (line 274) and ownAgentIds (lines 295 to 298) accept any positive integer in own-agents.identities, including the GitHub Actions bot id (ACTIONS_BOT_ID, line 1101), which the rules file's description and the module's comment say must never be listed. The Python merge gate drops that id. No admission can come from it today: apply-verdict.mjs writes nothing for an author authorTrust refuses, and the shipped list is ["lanes-app"]. This is hardening.
  2. .github/scripts/pr-verify/resolve-pr.mjs line 1008 counts source: labels (sourceLabels(...).length === 1) but never tests the label against SOURCE_LABEL, which admission (admit.mjs) and the merge gate (babysit_verify_evidence.py) both do. A malformed source: label passes pr-verify and is refused at the merge gate, so the pull request stalls instead of failing early.

Evidence

  • Lines read at d55250ec; the files are unchanged on main since.
  • Found by a review of the byte-copied files in melodic-software/pr-pipeline-sandbox#387. Neither was seen in a live run.

Done when

  • The rules validator and ownAgentIds reject the Actions bot id, with a test for each.
  • pr-verify tests the single source: label against the same pattern admission uses, with a malformed-label test.
  • No change to which issues are admitted or verified under the shipped rules.
主要言語
Shell
スター
22
フォーク
2
平均マージ
1時間 47分
マージ済み PR(30日)
942

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

melodic-software/claude-code-plugins のほかの issue

melodic-software/claude-code-plugins の issue をすべて見る

似ている issue

Shell/Bash の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。