feat(client): add caller_name to audit_tool_call (#2912)#218
Merged
Conversation
gzak
force-pushed
the
feat/2912-caller-name-audit
branch
from
July 17, 2026 18:38
044b460 to
628f22e
Compare
tool_type on AuditToolCallRequest was misleadingly named -- every real caller (claude_code/codex/cursor/openclaw) used it to identify which client made the call, not any property of the tool. Add caller_name as the correctly-named field; tool_type stays as a deprecated input fallback (not removed) during the deprecation window, mirroring the platform-side resolution added in getaxonflow/axonflow-enterprise#2953 (caller_name if supplied -> legacy tool_type if supplied -> default). Implements getaxonflow/axonflow-enterprise#2912, sub-issue of epic #2905. Signed-off-by: Gregory Zak <gzak@getaxonflow.com>
gzak
force-pushed
the
feat/2912-caller-name-audit
branch
from
July 17, 2026 18:45
628f22e to
b15924e
Compare
Contributor
Author
|
R3 review passed cleanly, but the final CI run on the pushed commit surfaced 3 real, fixable failures (final sweep before considering this done):
Full suite now green: 1051 passed, 29 skipped, 82.29% coverage. |
A pre-#2953 platform silently drops caller_name, so a caller who sets only caller_name on an older platform gets the default with no in-IDE attribution hint. Add the platform-floor caveat (requires v9.11.0+; set tool_type as a fallback on older platforms) to the caller_name field doc comment. Also add the "platform support not yet on main" prerequisite section to the runtime-e2e README, matching the TS/Java SDKs. getaxonflow/axonflow-enterprise#2912 Signed-off-by: Saurabh Jain <saurabh.jain@getaxonflow.com>
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
caller_nametoAuditToolCallRequest(axonflow/types.py) — the correctly-named replacement fortool_type, which every real caller (claude_code/codex/cursor/openclaw) actually used to identify which client made the call, not any property of the tool.tool_typeis kept as a deprecated input fallback, not removed — backward compatible for existing callers during the deprecation window.client.audit_tool_call(axonflow/client.py) forwardscaller_namethe same waytool_typeis forwarded today; docstring example and debug logging updated accordingly.caller_nameif supplied -> legacytool_typeif supplied -> a default. This SDK change is additive and safe to merge independently, but shouldn't be relied on in production until #2953 lands.Implements getaxonflow/axonflow-enterprise#2912, sub-issue of epic #2905.
Test plan
tests/test_audit_tool_call.py— new unit tests:caller_namesent alone,tool_typealone (backward compat), both supplied together, plus a type-levelmodel_validatetest withcaller_name.runtime-e2e/caller_name_audit/test.py— real-stack proof (no mocks) driving the actual SDK'saudit_tool_callagainst a live agent+orchestrator, pollingGET /api/v1/audit/tenant/{tenant_id}and assertingcaller_name(and the legacytool_typefallback) reachpolicy_details.caller_nameon the persisted audit row.1051 passed, 29 skipped(coverage 82.29%, threshold 75%).scripts/lint-no-mocks-in-runtime-e2e.sh— clean.ruff check— clean on all touched files.CHANGELOG.md[Unreleased]updated.