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

Open Beginner friendly
#17,374 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions, javascript, node.js
Domain
ci-cd, tooling

Research direction

Start with .github/scripts/intake-triage/admit.mjs around lines 274 and 295-298, where the rules validator and ownAgentIds accept positive integers, and compare against ACTIONS_BOT_ID at line 1101. Then read .github/scripts/pr-verify/resolve-pr.mjs around line 1008 and compare its source: label check with SOURCE_LABEL in admission and babysit_verify_evidence.py. Add tests for rejecting the Actions bot id and a malformed source: label, then run the relevant intake-triage and pr-verify test suites; done means both checks fail early while shipped rules admit and verify the same issues as before.

Written by the indexing model from the issue text.

Description

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.
Dominant language
Shell
Stars
22
Forks
2
Avg merge
1h 47m
Merged PRs (30d)
942

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from melodic-software/claude-code-plugins

All issues in melodic-software/claude-code-plugins

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.