feat(audit): add callerName field to AuditToolCallRequest - #199
Merged
Conversation
audit_tool_call's tool_type field 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 callerName (wire: caller_name) alongside the existing toolType field, which is now a deprecated input fallback (not removed, not renamed). The server resolves caller_name if supplied, else the legacy tool_type, else a default. Adds unit coverage proving caller_name serializes standalone, tool_type still works standalone, and both together, plus a runtime-e2e test proving callerName reaches policy_details.caller_name against a live agent + orchestrator. Refs: getaxonflow/axonflow-enterprise#2912 (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:34
fa31b10 to
7fb2fb5
Compare
Contributor
Author
|
R3 review: wire-shape baseline claim independently verified accurate (cloned the pinned spec SHA, confirmed |
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. 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
AuditToolCallRequest.callerName(@JsonProperty("caller_name")) alongside the existingtoolTypefield, pergetaxonflow/axonflow-enterprise#2912(sub-issue of epic #2905).audit_tool_call'stool_typefield 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.toolTypeis now marked@Deprecated(getter, builder method, and the field itself) and kept as an input fallback only — it is NOT removed and NOT renamed.AxonFlow#auditToolCall/auditToolCallAsyncneeded no changes: they serialize the request POJO via Jackson, so the new field is forwarded automatically.getaxonflow/axonflow-enterprise#2953) adds the matchingcaller_namefield to the server'sAuditToolCallRequestand resolvescaller_nameif supplied → legacytool_typeif supplied → a default.#2953has since merged toaxonflow-enterprisemain and shipped in v9.11.0.#2903(change the no-input default from"claude_code"to"unknown") was folded into that same merge, so the current server default is"unknown", not"claude_code". Neither this PR's Java-side changes nor its tests assert a specific default value for the neither-supplied case, so no follow-up is needed here for that default change.Test plan
AuditToolCallTest(WireMock):caller_nameserializes standalone, legacytool_typestill serializes standalone, and both together (caller_name present, deprecated toolType still forwarded) — 3 new tests, all passing.runtime-e2e/caller_name_audit/CallerNameAuditTest.java: realAxonFlow#auditToolCall()against a live agent + orchestrator, reading the persisted row back viaGET /api/v1/audit/{id}— provescallerNamealone, legacytoolTypealone, and both together all resolve to the correctpolicy_details.caller_name, with the legacytool_typekey no longer written for new rows.RESULT: PASS (4/4). (Originally run against an unmergedaxonflow-enterprisebranch carrying #2953; re-verified after #2953 merged — see follow-up PR for the current confirmation run and a stale-README fix.)./mvnw verify— full suite: 1315 surefire tests + 12 failsafe tests, 0 failures, 0 errors.tests/fixtures/wire-shape-baseline.json— added aper_type_driftentry forAuditToolCallRequestmarkingcaller_nameas a knownsdk_onlyfield ahead of the pinned OpenAPI spec (getaxonflow/axonflow@f910aa3d6c...) catching up;scripts/wire_shape/validate.pyitself skips locally (noAXONFLOW_OPENAPI_SPECS_DIR) and only runs in the dedicated CI job.CHANGELOG.md— newAddedbullet under[Unreleased], alongside the existing entries.