Skip to content

fix: correct audit list field documentation in --ai-help#284

Merged
maximelb merged 2 commits into
cli-v2from
fix/audit-list-explain-field-names
May 2, 2026
Merged

fix: correct audit list field documentation in --ai-help#284
maximelb merged 2 commits into
cli-v2from
fix/audit-list-explain-field-names

Conversation

@maximelb
Copy link
Copy Markdown
Contributor

@maximelb maximelb commented May 2, 2026

Summary

  • The --ai-help text for audit list documented fields (who, action, target, details) that do not exist in the actual API response.
  • This caused LLM-driven callers (and humans) to construct filters like --filter \"[].action\" that silently return empty arrays.
  • Replaced with the real response fields: 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 actually etype. Two wasted round-trips per ambiguous query.

Test plan

  • python -m pytest tests/unit/test_debug_flag_integration.py -k audit (5 passed)
  • Verified get_explain(\"audit.list\") renders the corrected field list

🤖 Generated with Claude Code

maximelb and others added 2 commits May 2, 2026 07:55
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>
@maximelb maximelb requested a review from dzimine-lc May 2, 2026 15:43
@maximelb maximelb marked this pull request as ready for review May 2, 2026 15:43
@maximelb maximelb merged commit 05d060c into cli-v2 May 2, 2026
7 checks passed
@maximelb maximelb deleted the fix/audit-list-explain-field-names branch May 2, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant