feat(sdk): return authoritative turn settlement results - #2525
Open
limityan wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AgentTurnSettlementResultfrom the Rust Runtime SDK with the authoritative terminal status, final response, and finish reason.Scope
Adversarial review
The review covered persistence failure, cold persisted sessions, transient sessions, recovery generations, rollback/delete/unload invalidation, bounded-cache refresh, timeout priority, unknown-outcome classification, and Host output/cancellation races. The resulting regressions are covered by focused tests.
Validation
cargo test --locked -p bitfun-runtime-ports --features agent-api— 51 passedcargo test --locked -p bitfun-agent-runtime --features agent-runtime --test agent_session_contracts— 67 passedcargo test --locked -p bitfun-sdk-host— 66 passed across unit/lifecycle/protocol suitesbitfun-coresettlement, persistence, recovery, projection, and fork/rollback tests — passedcargo check --locked -p bitfun-cli --all-targets— passedpnpm --dir sdk/typescript test— 66 passed, 1 Unix-only test skipped on Windowspnpm run check:core-boundaries— passedgit diff --check— passedKnown target-branch issue:
lightweight_client_negotiates_with_the_production_serverfails withmissing advertised method session/reloadContexton exact base21283e2d8as well as the feature branch. Its lightweight fixture does not register the context-reload port while the assertion requires that dynamically advertised capability; this PR does not alter capability registration.cargo fmt --checklikewise reports only five pre-existing formatting diffs outside this PR's changed files.Implementation and adversarial review used AI assistance. All validation listed above was executed locally.