Skip to content

fix(acp): fallback unknown turn end reasons#939

Draft
tt-a1i wants to merge 1 commit into
MoonshotAI:mainfrom
tt-a1i:fix/acp-stop-reason-fallback
Draft

fix(acp): fallback unknown turn end reasons#939
tt-a1i wants to merge 1 commit into
MoonshotAI:mainfrom
tt-a1i:fix/acp-stop-reason-fallback

Conversation

@tt-a1i

@tt-a1i tt-a1i commented Jun 20, 2026

Copy link
Copy Markdown

Summary

  • return end_turn for unexpected runtime turn-end reasons instead of falling through to undefined
  • add focused coverage for known reasons and the unknown fallback path

Related Issue

Addresses #837 finding 6.

Tests

  • pnpm --filter @moonshot-ai/acp-adapter exec vitest run test/events-map.test.ts
  • pnpm --filter @moonshot-ai/acp-adapter run test
  • pnpm --filter @moonshot-ai/acp-adapter run typecheck
  • pnpm --filter @moonshot-ai/acp-adapter run build
  • pnpm --filter @moonshot-ai/kimi-code run typecheck
  • pnpm exec oxlint --type-aware packages/acp-adapter/src/events-map.ts packages/acp-adapter/test/events-map.test.ts --quiet
  • git diff --check

AI Assistance Disclosure

I used Codex to review the changes, sanity-check the implementation against existing patterns, and help spot potential edge cases.

@changeset-bot

changeset-bot Bot commented Jun 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 48178d4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

1 participant