Skip to content

Improve ci logs - #13

Merged
timweri merged 3 commits into
mainfrom
improve-ci-logs
Sep 19, 2026
Merged

timweri merged 3 commits into
mainfrom
improve-ci-logs

Conversation

@timweri

@timweri timweri commented Sep 19, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Diagnostics (warnings/errors) handling and JSON warning duplication need adjustment to better match the intended CI stream separation and avoid redundant report content.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 Medium severity

Open (2)
What changed in this PR

This PR modernizes cargo-oxidate’s CI-facing output by introducing structured reporting (including JSON), adding verbosity controls, and making suggestion generation/reporting more robust and machine-consumable.

Changes:

  • Add --quiet / --verbose progress controls and --format text|json final-output mode.
  • Introduce a structured RunReport (policy/summary/diagnostics/suggestions) and a JSON schema v1 renderer.
  • Improve suggestion generation outcomes (new Unavailable variant) and convert cache failures into non-fatal warnings.
File Description
tests/​suggest_fix_cli.rs Updates assertions to match new suggestion/outcome messaging.
tests/​ci_output_cli.rs Adds integration coverage for stdout vs stderr behavior across verbosity modes.
tests/​ci_json_cli.rs Adds integration coverage for JSON schema output and error behavior.
src/​suggest/​tests/​generate_suggestions_tests.rs Updates tests for Outcome::Unavailable and progress callback plumbing.
src/​suggest/​tests.rs Adapts suggestion test helper to new generate_suggestions signature.
src/​suggest.rs Adds Outcome::Unavailable and an on_progress callback for suggestion checks.
src/​report/​json.rs Implements JSON report schema v1 + unit tests.
src/​report.rs Refactors text reporting into RunReport-driven rendering with policy/summary sections.
src/​policy.rs Normalizes exemptions and replaces Unknown with MissingPublishDate { reason }.
src/​main/​tests.rs Adds unit tests for CLI parsing and report/exit-code behavior.
src/​main.rs Wires verbosity/format flags, structured reporting, diagnostics, and suggestion progress.
src/​cache.rs Converts cache load/save failures into structured warnings.
src/​api.rs Plumbs cache warnings through the client lifecycle and returns non-fatal save warnings.
README.md Documents new flags, CI stream semantics, JSON output contract, and exit codes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/report.rs Outdated
Comment thread src/report/json.rs
@timweri
timweri marked this pull request as ready for review September 19, 2026 01:14
@timweri
timweri merged commit 786f7bb into main Sep 19, 2026
5 checks passed
@timweri
timweri deleted the improve-ci-logs branch September 19, 2026 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants