Skip to content

fix: accept --include descriptions in send-report as its help text says - #2401

Open
RaphaelFakhri wants to merge 1 commit into
elementary-data:masterfrom
RaphaelFakhri:fix/send-report-include-descriptions
Open

RaphaelFakhri wants to merge 1 commit into
elementary-data:masterfrom
RaphaelFakhri:fix/send-report-include-descriptions

Conversation

@RaphaelFakhri

@RaphaelFakhri RaphaelFakhri commented Oct 21, 2026 •

Copy link
Copy Markdown

Summary

The --include help text of edr send-report says "Currently only --include descriptions is supported", but the CLI only sets include_description when the value is exactly description. Running the command as documented sends the Slack summary without test descriptions, and nothing reports that the value was ignored.

Fix

send-report now enables descriptions for both descriptions (the documented value) and description (the value the code accepted so far), so existing commands keep working.

Tests

New tests/unit/cli/test_send_report_include.py invokes send-report through CliRunner with DataMonitoringReport mocked and checks the include_description argument for no --include, descriptions, description and an unknown value.

  • Before the fix: descriptions case fails (1 failed, 3 passed).
  • After the fix: 4 passed.
  • pre-commit run on the changed files passes (black, isort, flake8, mypy, typos).

Fixes #2400

Summary by CodeRabbit

  • Bug Fixes

    • The send-report command now recognizes both description and descriptions when including report descriptions.
    • This ensures the plural form works as expected while preserving existing behavior for omitted or unrelated values.
  • Tests

    • Added coverage for supported, omitted, and unrelated --include values.

@github-actions

Copy link
Copy Markdown
Contributor

👋 @RaphaelFakhri
Thank you for raising your pull request.
Please make sure to add tests and document all user-facing changes.
You can do this by editing the docs files in this pull request.

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 222f25b6-6e5c-405b-b6c5-ae9433c213df
📥 Commits

Reviewing files that changed from the base of the PR and between 9c13ec1 and 14cc2e7.

📒 Files selected for processing: 2
  • elementary/monitor/cli.py
  • tests/unit/cli/test_send_report_include.py

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

📝 Walkthrough

The send-report CLI now enables description inclusion for both description and descriptions. Unit tests cover these values, along with omitted and unrelated values.

Changes: Send-report include handling

Layer / File(s) Summary
Description include option
elementary/monitor/cli.py, tests/unit/cli/test_send_report_include.py
The CLI enables include_description for singular and plural description values. Parameterized tests check those values, omitted input, and unrelated values.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: guyeshdat

Merge Risk: ⚪ Minimal · up to 14cc2

Both description spellings are covered, with omitted and unrelated values remaining disabled. No actionable merge risk is identified beyond normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the main change: support for the plural --include descriptions value in send-report, matching the help text.
Linked Issues check Passed Issue #2400 requires --include descriptions to set include_description=True and requires --include description to remain supported. The whole-PR diff changes include_description to `include in…
Out of Scope Changes check Passed The PR changes one send-report condition and adds focused unit coverage for that condition. The test setup and mocked dependencies support the linked CLI behavior. No unrelated production behavior o…
Full details: Linked Issues check

Explanation

Issue #2400 requires --include descriptions to set include_description=True and requires --include description to remain supported. The whole-PR diff changes include_description to include in ("description", "descriptions"). The new CliRunner test covers descriptions, description, no value, and an unrelated value with DataMonitoringReport mocked.

Full details: Out of Scope Changes check

Explanation

The PR changes one send-report condition and adds focused unit coverage for that condition. The test setup and mocked dependencies support the linked CLI behavior. No unrelated production behavior or unrelated test scope appears in the whole-PR diff.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

This branch is waiting to be deployed

1 waiting deployment
elementary_test_env — 14cc2e79 Waiting Oct 21, 2026 by RaphaelFakhri via approve-fork #2726
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.

edr send-report --include descriptions does not add test descriptions to the Slack summary

1 participant