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

Aberta Para iniciantes
#17,374 2 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
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
74/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
github-actions, javascript, node.js
Domínio
ci-cd, tooling

Direção de pesquisa

Comece com .github/scripts/intake-triage/admit.mjs por volta das linhas 274 e 295-298, onde o validador de regras e ownAgentIds aceitam inteiros positivos, e compare com ACTIONS_BOT_ID na linha 1101. Depois leia .github/scripts/pr-verify/resolve-pr.mjs por volta da linha 1008 e compare sua verificação do label source: com SOURCE_LABEL em admission e babysit_verify_evidence.py. Adicione testes para rejeitar o id do bot do Actions e um label source: malformado, depois execute as suítes de teste relevantes de intake-triage e pr-verify; concluído significa que ambas as verificações falham cedo enquanto as regras enviadas admitem e verificam os mesmos issues de antes.

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

Descrição

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.
Linguagem predominante
Shell
Estrelas
22
Forks
2
Merge médio
1h 47min
PRs com merge (30d)
942

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.