Skip to content

fix: stub isReadOnly on ACP queued-tools test mock - #2

Merged
AryanNandanwar merged 1 commit into
agent-action-timeline-undofrom
cursor/fix-acp-queued-tools-tests-6a78
Aug 17, 2026
Merged

fix: stub isReadOnly on ACP queued-tools test mock#2
AryanNandanwar merged 1 commit into
agent-action-timeline-undofrom
cursor/fix-acp-queued-tools-tests-6a78

Conversation

@AryanNandanwar

Copy link
Copy Markdown
Owner

Description

Fixes the Unit Tests & Coverage Analysis failure on Nano-Collective/nanocoder#887.

Timeline capture in runAcpConversation now calls toolManager.isReadOnly() before executing a tool. The acp-queued-tools spec mock did not implement that method, so four tests rejected with:

TypeError: toolManager.isReadOnly is not a function

  • runAcpConversation - abort marks announced-but-unrun calls failed
  • runAcpConversation - an announced call is never sent as tool_call twice
  • runAcpConversation - a single tool call is still announced as tool_call
  • runAcpConversation - the queued announcement carries no content

The mock now matches acp-conversation.spec.ts: write_file and execute_bash are treated as mutating; everything else is read-only.

Merge this into agent-action-timeline-undo to re-run CI on Nano-Collective#887.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Changeset

  • Docs-only / test-only change; no changeset needed.

Testing

Automated Tests

  • The previously failing source/acp/acp-queued-tools.spec.ts tests now pass
  • Related ACP specs pass (acp-conversation, acp-timeline, acp-agent) — 82 tests
  • All existing tests pass (pnpm test:all completes successfully)

Manual Testing

  • Tested with Ollama
  • Tested with OpenRouter
  • Tested with OpenAI-compatible API
  • Tested MCP integration (if applicable)

Checklist

  • If this was for an open issue, I was assigned to it
  • Code follows project style guidelines
  • Self-review completed
  • Documentation updated (if needed)
  • No breaking changes (or clearly documented)
Open in Web Open in Cursor 

Timeline capture now calls toolManager.isReadOnly() during tool execution.
The queued-tools spec mock omitted that method, so four tests failed in CI
with "isReadOnly is not a function".
@AryanNandanwar
AryanNandanwar marked this pull request as ready for review August 17, 2026 20:56
@AryanNandanwar
AryanNandanwar merged commit 17761f3 into agent-action-timeline-undo Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants