Skip to content

[AAASM-4846] πŸ› (examples): LOW cluster β€” JSON-parse invoke, send_email schema, InitAssembly doc drift#335

Merged
Chisanan232 merged 3 commits into
masterfrom
v0.0.1/AAASM-4846/examples_low
Jul 18, 2026
Merged

[AAASM-4846] πŸ› (examples): LOW cluster β€” JSON-parse invoke, send_email schema, InitAssembly doc drift#335
Chisanan232 merged 3 commits into
masterfrom
v0.0.1/AAASM-4846/examples_low

Conversation

@Chisanan232

Copy link
Copy Markdown
Contributor

What changed

Fixes a LOW-severity cluster of three small correctness/consistency defects across the examples gallery:

  1. python/langchain-basic-agent β€” _run_governed_call passed the raw JSON string straight to .invoke(input_str), binding '{"city": "London"}' as the entire city argument (visible in the README's odd expected output). Now parsed with json.loads() like sibling examples (langchain-research-agent, openai-agents-sdk), so the tool receives structured args; the README expected output is updated to Weather in London.
  2. node/openai-node-tool-policy β€” the send_email tool schema marked body as required, but the mock impl (sendEmail(to, subject)) and its caller pass only to/subject. Dropped body from required so schema and impl agree. Cosmetic (send_email is policy-denied before execution) but removes the mismatch.
  3. go/cli-runtime-integration β€” README step said assembly.InitAssembly("") while main.go:53 passes "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: python -m py_compile python/langchain-basic-agent/src/main.py (passes); json.loads mirrors sibling examples.
  • Node: pnpm -C node/openai-node-tool-policy install && pnpm -C node/openai-node-tool-policy typecheck (tsc --noEmit passes clean).
  • Go: grep InitAssembly go/cli-runtime-integration/{README.md,main.go} β€” both now show "cli-runtime-demo".

Checklist

  • PR title follows [AAASM-XXXX] <GitEmoji> (<scope>): <summary>
  • No secrets, API keys, or .env files committed
  • Example sub-projects include their own README.md with prerequisites and run instructions
  • SDK/runtime version dependencies are documented or pinned

πŸ€– Generated with Claude Code

Chisanan232 and others added 3 commits July 18, 2026 16:09
.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>
@sonarqubecloud

Copy link
Copy Markdown

@Chisanan232

Copy link
Copy Markdown
Contributor Author

πŸ€– Claude Code β€” PR review

Scope (AAASM-4846, LOW): βœ… JSON-parse the langchain invoke input, send_email schema/impl consistent, InitAssembly doc drift fixed.

  1. CI βœ… green (36); typecheck clean. 2. Scope βœ… 3 files, avoided custom-tool-policy README (4836). 3. Side effects none. 4. FE n/a. Verdict: ready to merge pending Pioneer approval.

@Chisanan232
Chisanan232 merged commit 7f85168 into master Jul 18, 2026
36 checks passed
@Chisanan232
Chisanan232 deleted the v0.0.1/AAASM-4846/examples_low branch July 18, 2026 09:12
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