Skip to content

Add JSON output for eval inventory#28058

Open
ved015 wants to merge 3 commits into
google-gemini:mainfrom
Gsoc26:eval-inventory-json
Open

Add JSON output for eval inventory#28058
ved015 wants to merge 3 commits into
google-gemini:mainfrom
Gsoc26:eval-inventory-json

Conversation

@ved015

@ved015 ved015 commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a JSON output option for the eval inventory command, making it easier to use in CI, scripts, and automated checks.

Details

  • Adds --json support for machine-readable inventory results.
  • Uses relative paths so output works across different machines.
  • Improves --root handling when the path is missing or looks like another flag.
  • Adds tests to keep the JSON output stable and reliable.

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • MacOS
      • npm run
      • npx
      • Docker
      • Podman
      • Seatbelt
    • Windows
      • npm run
      • npx
      • Docker
    • Linux
      • npm run
      • npx
      • Docker

@gundermanc pls have a look

ved015 added 3 commits June 20, 2026 07:56
- Text formatter 'By Policy' now renders policies not in POLICY_ORDER,
  preventing silent omissions when EvalPolicy gains new values
- Remove unused policyOrder alias in formatInventoryReport
- Thread repoRoot through InventoryResult so resolveRelativePath uses
  the correct base dir instead of process.cwd() for fallback paths
- collectInventory now validates evals/ dir exists with a helpful error
  message before globbing, instead of silently returning empty results
- CLI: detect --root passed with no value (last argument) and exit 1
- Tests: add repoRoot to all InventoryResult fixtures, align totalFiles
  with files.length, add makeEmptyResult() helper, add coverage for
  evals-dir error, unknown policy rendering, and repoRoot relativization
@ved015 ved015 requested review from a team as code owners June 20, 2026 06:03
@github-actions github-actions Bot added the size/l A large sized PR label Jun 20, 2026
@github-actions

Copy link
Copy Markdown

📊 PR Size: size/L

  • Lines changed: 782
  • Additions: +752
  • Deletions: -30
  • Files changed: 4

@ved015

ved015 commented Jun 20, 2026

Copy link
Copy Markdown
Contributor Author

@gemini-cli-robot pls review

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the summary. You can try again by commenting /gemini summary.

@gemini-cli gemini-cli Bot added the status/need-issue Pull requests that need to have an associated issue. label Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/l A large sized PR status/need-issue Pull requests that need to have an associated issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant