Issue 360
Agent access: split agentTools test, add draft-by-id and admin-identity tests
Back to our planOpen
cmstech-debtpriority: low
Problem
Three Minor follow-ups from re-review 5639734252 on #357 (agent access over MCP, #336):
src/payload.config.agentTools.test.tsis 255 lines, over the repo's 250-line file limit.- No committed test proves that
findEvents(andfindPosts) refuses theidof a draft for an agent key. The list cases are covered inagentAccess; the by-id case was only shown by the reviewer's uncommitted probe. - No committed test proves an admin can still correct a run's identity (
agentName,repoCommit, …) while the agent can't, and thatagentstays unchanged either way.
Acceptance criteria
- The agentTools test file is under 250 lines (split or move a case into
agentProbes). - A test: an agent key's
findEvents/findPostsby a draft's id returns nothing. - A test: an admin (Local API,
overrideAccess: false) can changeagentNameandrepoCommiton a run;agentstays the same.
Generated by Claude Code, opens in a new tab