[AAASM-4846] π (examples): LOW cluster β JSON-parse invoke, send_email schema, InitAssembly doc drift#335
Merged
Conversation
.invoke() received the raw JSON string, binding '{"city": "London"}'
as the whole city arg. Parse with json.loads() like sibling examples so
the tool gets structured args; update the README expected output.
refs AAASM-4846
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The schema marked body required, but the mock impl and caller pass only (to, subject). Drop body from required so schema and impl agree. refs AAASM-4846 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
README showed InitAssembly("") but main.go passes "cli-runtime-demo".
Match the doc to the code.
refs AAASM-4846
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Contributor
Author
π€ Claude Code β PR reviewScope (AAASM-4846, LOW): β JSON-parse the langchain invoke input, send_email schema/impl consistent, InitAssembly doc drift fixed.
|
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.



What changed
Fixes a LOW-severity cluster of three small correctness/consistency defects across the examples gallery:
python/langchain-basic-agentβ_run_governed_callpassed the raw JSON string straight to.invoke(input_str), binding'{"city": "London"}'as the entirecityargument (visible in the README's odd expected output). Now parsed withjson.loads()like sibling examples (langchain-research-agent,openai-agents-sdk), so the tool receives structured args; the README expected output is updated toWeather in London.node/openai-node-tool-policyβ thesend_emailtool schema markedbodyas required, but the mock impl (sendEmail(to, subject)) and its caller pass onlyto/subject. Droppedbodyfromrequiredso schema and impl agree. Cosmetic (send_email is policy-denied before execution) but removes the mismatch.go/cli-runtime-integrationβ README step saidassembly.InitAssembly("")whilemain.go:53passes"cli-runtime-demo". Doc updated to match the code.Related ticket
Closes AAASM-4846
Jira: https://lightning-dust-mite.atlassian.net/browse/AAASM-4846
How to verify
python -m py_compile python/langchain-basic-agent/src/main.py(passes);json.loadsmirrors sibling examples.pnpm -C node/openai-node-tool-policy install && pnpm -C node/openai-node-tool-policy typecheck(tsc --noEmit passes clean).grep InitAssembly go/cli-runtime-integration/{README.md,main.go}β both now show"cli-runtime-demo".Checklist
[AAASM-XXXX] <GitEmoji> (<scope>): <summary>.envfiles committedREADME.mdwith prerequisites and run instructionsπ€ Generated with Claude Code