fix(FunctionResult): emit execute_swml transfer beside the SWML document - #87
Closed
grandcamel wants to merge 1 commit into
Closed
fix(FunctionResult): emit execute_swml transfer beside the SWML document#87grandcamel wants to merge 1 commit into
grandcamel wants to merge 1 commit into
Conversation
execute_swml(transfer=True) wrote the flag INSIDE the SWML document —
{"SWML": {..., "transfer": "true"}} — where it is not a SWML key, so
the document executed but the call never exited the agent. The platform
documents transfer as a sibling of the SWML key in the action object,
which is exactly the shape the live-proven connect() and
swml_transfer() helpers already emit. The action is now
{"SWML": <doc>, "transfer": "true"}; transfer=False still omits the
key, and the caller's dict is still never mutated.
The three tests that pinned the inside placement now pin the sibling
placement, one of them asserting shape-parity with connect()'s action
so the two paths cannot drift apart again.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MgA3KeCEPMKMJVvroZY1wV
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
execute_swml(swml_content, transfer=True)wrote thetransferflag inside the SWML document:{"SWML": {"version": "1.0.0", "sections": {...}, "transfer": "true"}}The platform documents
transferas a sibling of theSWMLkey in the action object (SWAIG function reference:transfer"boolean | object", used "alongside a siblingaction[].SWMLpayload"):{"SWML": {"version": "1.0.0", "sections": {...}}, "transfer": "true"}The sibling form is exactly what
connect()andswml_transfer()in the same class already emit — the live-proven paths. Atransferkey inside a SWML document is not part of the document schema, soexecute_swml(..., transfer=True)executed the SWML but the call never exited the agent.Fix
execute_swmlnow appends{"SWML": <doc>, "transfer": "true"}(sibling), matchingconnect()/swml_transfer()and the platform docs.transfer=Falsestill omits the key. The string"true"form is kept for consistency with the two live-proven helpers.The three tests that pinned the inside-the-document placement now pin the sibling placement (one also asserts shape-parity with
connect()'s action); the copy-safety test still verifies the caller's dict is never mutated.🤖 Generated with Claude Code
https://claude.ai/code/session_01MgA3KeCEPMKMJVvroZY1wV