Skip to content
SprecherEast
Issue 360

Agent access: split agentTools test, add draft-by-id and admin-identity tests

Back to our plan
Open
cmstech-debtpriority: low

Problem

Three Minor follow-ups from re-review 5639734252 on #357 (agent access over MCP, #336):

  1. src/payload.config.agentTools.test.ts is 255 lines, over the repo's 250-line file limit.
  2. No committed test proves that findEvents (and findPosts) refuses the id of a draft for an agent key. The list cases are covered in agentAccess; the by-id case was only shown by the reviewer's uncommitted probe.
  3. No committed test proves an admin can still correct a run's identity (agentName, repoCommit, …) while the agent can't, and that agent stays 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/findPosts by a draft's id returns nothing.
  • A test: an admin (Local API, overrideAccess: false) can change agentName and repoCommit on a run; agent stays the same.

Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab