Skip to content

fix(application): Include items in run describe --format=json#437

Merged
olivermeyer merged 1 commit intomainfrom
fix/run_describe_format_json
Feb 19, 2026
Merged

fix(application): Include items in run describe --format=json#437
olivermeyer merged 1 commit intomainfrom
fix/run_describe_format_json

Conversation

@helmut-hoffer-von-ankershoffen
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds items to the JSON output format of the aignostics application run describe --format=json command, providing feature parity with the text format which already displays item details.

Changes:

  • Modified run_describe command to include items in JSON output by fetching and serializing all items from run.results()
  • Added comprehensive integration test to verify items are included in JSON output with proper structure

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/aignostics/application/_cli.py Modified run_describe function to fetch items via run.results() and include them in the JSON output dictionary
tests/aignostics/application/cli_test.py Added integration test test_cli_run_describe_json_includes_items that mocks run and item data to verify JSON output structure

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Files with missing lines Coverage Δ
src/aignostics/application/_cli.py 65.97% <100.00%> (-4.76%) ⬇️

... and 6 files with indirect coverage changes

@sonarqubecloud
Copy link
Copy Markdown

@olivermeyer olivermeyer added the claude Trigger Claude Code automation label Feb 19, 2026
@claude
Copy link
Copy Markdown

claude bot commented Feb 19, 2026

🔍 PR Review Summary - APPROVED

PR #437: fix(application): Include items in run describe --format=json
Author: @helmut-hoffer-von-ankershoffen
Reviewed by: Claude Code (Automated Review)


📊 Review Results - ALL CRITICAL CHECKS PASSED

Test Markers - All tests properly marked with @pytest.mark.integration
Test Coverage - Overall coverage maintained at ~23% (no regression)
Code Quality - All linting checks pass (ruff format, ruff check, pyright, mypy)
Conventional Commits - fix(application): Include items in run describe --format=json
Architecture Compliance - Changes isolated to CLI layer, proper service usage
CI/CD Pipeline - All workflows passing (lint, audit, tests on multiple platforms)
Breaking Changes - NONE (this is an additive fix - existing JSON fields unchanged)


🎯 What This PR Does

Problem Fixed: The aignostics application run describe --format=json command was missing the items array in its output, making it difficult to inspect run results programmatically.

Solution: Modified src/aignostics/application/_cli.py to include items by calling run.results() and serializing them to JSON.

Test Coverage: Added comprehensive integration test test_cli_run_describe_json_includes_items that verifies the items array is present and correctly formatted.


📝 Detailed Findings

✅ Strengths

  1. Excellent test design: The new integration test follows SDK best practices with proper mocking and comprehensive assertions
  2. Clean implementation: Minimal, surgical fix that addresses the bug without over-engineering
  3. Follows existing patterns: Consistent with how other CLI JSON outputs are handled in this module
  4. Proper commit message: Follows conventional commits format for automatic changelog generation

⚠️ Observations (Non-blocking)

  1. Memory usage on large runs: See inline comment on _cli.py:941 - the iterator consumption could be memory-intensive for runs with 1000+ items. This is acceptable for typical use cases but worth documenting for future enhancement.

  2. No documentation update: Consider adding a note to module-level docs about the enhanced JSON output format.


🧪 Verification Performed

Verified test markers: 0 tests collected without markers ✅
Ran linting: All checks passed ✅
Ran specific test: PASSED in 4.78s ✅
Ran all integration tests: 9 passed, 27 deselected ✅


🎓 SDK Architecture Notes

This PR correctly follows the Modulith Architecture principles:

  • Changes are isolated to the CLI presentation layer (_cli.py)
  • Uses the Service layer (Service().application_run()) for business logic
  • No cross-module dependencies introduced
  • Proper separation of concerns maintained

🚀 Recommendation

✅ APPROVED - Ready to Merge

This is a clean, well-tested bug fix that:

  • Solves a real user pain point (missing items in JSON output)
  • Maintains code quality standards
  • Adds appropriate test coverage
  • Follows SDK conventions

No changes required before merging.


This review was conducted following the comprehensive standards documented in CLAUDE.md and .github/CLAUDE.md. For questions about review criteria, see the root CLAUDE.md file.

@olivermeyer olivermeyer merged commit 4079702 into main Feb 19, 2026
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude Trigger Claude Code automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants