Skip to content

fix(cli): project turn.stop inputs to protocol fields - #4305

Open
jsiu93 wants to merge 1 commit into
apache:mainfrom
jsiu93:fix/run-turn-stop-protocol-input
Open

fix(cli): project turn.stop inputs to protocol fields#4305
jsiu93 wants to merge 1 commit into
apache:mainfrom
jsiu93:fix/run-turn-stop-protocol-input

Conversation

@jsiu93

@jsiu93 jsiu93 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Send turn.stop with a fresh object containing only sessionId, turnId, and runId. The active Turn's local outcome classifier stays outside the protocol payload, so timeout and SIGINT requests reach the Host and abort the foreground tool.

Add strict fixture validation to the existing stop-before-start test. The fixture rejects every extra turn.stop field and records the exact accepted payload. Scope is limited to the #stopTurn projection and strictTurnStopInput fixture.

Fixes #4304

Verification

mise exec node@24.19.0 -- npx -y npm@11.19.0 --workspace maka-agent run build
mise exec node@24.19.0 -- node --test --test-name-pattern "stops a Turn that starts after cancellation was requested" packages/cli/dist/__tests__/runtime-host-run-command.test.js
Before fix: 0 pass, 1 fail, exit 1
After fix: 1 pass, 0 fail, exit 0

Before the fix, the strict fixture rejected outcome as an unknown turn.stop input field.

mise exec node@24.19.0 -- node --test packages/cli/dist/__tests__/runtime-host-run-command.test.js
35 pass, 0 fail, exit 0

A live maka run --yolo --timeout 10 returned 1 in 10.949 seconds. The marker was absent at return and remained absent after 45 seconds.

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: pi (gpt-5.6-sol), human-reviewed

Checklist

  • Tests cover the change, with a red test recorded before the fix
  • The CLI build and affected test file pass locally

Does this PR entail a change in behavior?

  • Yes, described under Summary above
  • No

Send turn.stop with a fresh protocol-shaped identity object.
Add a strict fixture for the stop-before-start path.

Generated-by: pi (gpt-5.6-sol)
@github-actions github-actions Bot added the effort/S Under 100 readable lines label Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/S Under 100 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(cli): maka run stop requests fail protocol validation

1 participant