Skip to content

Add responses messages main-chain tests#1071

Open
YueZh127 wants to merge 1 commit into
auto-refact-devfrom
test/2026-05-25_issue-668-responses-messages-main-chain-auto-refact
Open

Add responses messages main-chain tests#1071
YueZh127 wants to merge 1 commit into
auto-refact-devfrom
test/2026-05-25_issue-668-responses-messages-main-chain-auto-refact

Conversation

@YueZh127
Copy link
Copy Markdown
Collaborator

Problem

Closes #668.

Responses / Messages now have several durable main-chain edge cases around previous_response_id, tool result submission, caller scope/origin boundaries, and the Path B messages facade. This PR adds targeted regression tests for those gaps against auto-refact-dev.

Solution

  • Add structured-error assertions for invalid /v1/responses tool output submission, including no durable tool-result/session side effects and no secret leakage.
  • Tighten existing previous_response_id error-path tests to assert structured error codes instead of string-only body checks.
  • Add caller-scope owner drift coverage for previous_response_id reuse under the same scope id but a different owner subject.
  • Add cancel boundary tests for foreign scope/origin rejection without status mutation.
  • Add /v1/messages tool-result contract tests proving invalid assistant-side tool results are rejected and valid user-side tool results remain a stateless Path B facade.

Impact Path

  • test/Aevatar.Hosting.Tests/MainnetResponsesEndpointsTests.cs
  • test/Aevatar.Hosting.Tests/MainnetMessagesEndpointsTests.cs

This is test-only. No production API, protocol, projection, or runtime behavior is changed.

Auto-Refact Integration

This branch is based on origin/auto-refact-dev. During cherry-pick from the original feature/router-based #668 branch, the only conflict was in MainnetMessagesEndpointsTests.cs; the resolution keeps auto-refact-dev completion recording and preserves the new #668 tool-result recording assertions.

Validation

  • git diff --check HEAD~1..HEAD passed.
  • bash tools/ci/test_stability_guards.sh passed.
  • Targeted Aevatar.Hosting.Tests execution is currently blocked locally during build by the existing system protoc version (libprotoc 3.11.4) rejecting existing proto3 optional fields. The failure occurs before these tests execute and is not caused by this PR.

@loning loning force-pushed the auto-refact-dev branch 2 times, most recently from 7e34006 to 0e6cc59 Compare June 3, 2026 06:02
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