fix: correct audit list field documentation in --ai-help#284
Merged
Conversation
The --ai-help text for `audit list` listed fields (who, action, target, details) that don't exist in the API response, leading callers to write filters like `[].action` that silently return empty results. Replace with the actual response fields (ts, time, etype, ident, msg, oid, origin, entity, mtd). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Align the --ai-help field listing with the canonical CloudAudit struct in go-essentials (lc/message.go), which explicitly groups fields into "Audit Message" (V1) and "Audit V2 Fields". V2 added time/ident/entity/ mtd; origin is the legacy V1 actor field that ident supersedes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.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
--ai-helptext foraudit listdocumented fields (who,action,target,details) that do not exist in the actual API response.--filter \"[].action\"that silently return empty arrays.ts,time,etype,ident,msg,oid,origin,entity,mtd.Context
Spotted while reviewing an AI agent session that ran a weekly activity report. The model trusted the documented field names, got back
[], then had to dump raw output to discover the field is actuallyetype. Two wasted round-trips per ambiguous query.Test plan
python -m pytest tests/unit/test_debug_flag_integration.py -k audit(5 passed)get_explain(\"audit.list\")renders the corrected field list🤖 Generated with Claude Code