Skip to content

Cover Syslog database loader paths - #427

Merged
TheWitness merged 3 commits into
developfrom
copilot/fix-coverage-ci-failures-pr-425
Oct 16, 2026
Merged

TheWitness merged 3 commits into
developfrom
copilot/fix-coverage-ci-failures-pr-425

Conversation

Copilot AI commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

PR #425’s Syslog library loader changes lacked coverage for the changed lines, failing the CI coverage gate. Add focused tests for both supported library locations and the missing-library log path in each affected function.

  • Coverage: Exercise plugin_syslog_trend, plugin_syslog_levels_trend, plugin_syslog_devices, and plugin_syslog_devices_detail with:
    plugins/syslog/database.php
    plugins/syslog/includes/database.php
    no database library (logs an error)
    
  • Test setup: Add a configurable plugin-enabled stub and restore modified test state after each case.
Original prompt

Create a follow-up pull request against Cacti/plugin_intropage:develop that fixes the coverage/CI failures associated with PR #425 (#425). The existing PR changes four Syslog panel functions in panellib/syslog.php to load the Syslog database library from either plugins/syslog/database.php or plugins/syslog/includes/database.php and log when neither exists. All PHP 8.2, 8.3, and 8.4 integration jobs pass the Pest tests but fail the changed-line coverage gate: 0.00% (0/20 lines), with uncovered statements in the four include-loader blocks. Preserve the intended Syslog path compatibility fix and add focused Pest tests that exercise both supported path branches and the missing-library logging branch in every affected function, with stubs/fixtures as needed. Keep changes surgical, ensure the changed production statements are all measured by Clover and covered, and run the relevant tests/CI checks. Do not include the unrelated executable-mode change to locales/build_gettext.sh from PR #425.

Copilot AI and others added 2 commits October 16, 2026 12:57
Co-authored-by: TheWitness <1439914+TheWitness@users.noreply.github.com>
Co-authored-by: TheWitness <1439914+TheWitness@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix coverage and CI failures related to PR #425 Cover Syslog database loader paths Oct 16, 2026
Copilot AI requested a review from TheWitness October 16, 2026 12:59
@TheWitness
TheWitness requested a balanced review from Copilot October 16, 2026 13:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Pest execution and Clover coverage of the targeted loader statements remain unverified.

0 open findings

What changed in this PR

Adds focused tests for the Syslog database loader compatibility changes from PR #425 without modifying production code.

Changes:

  • Exercises both supported library paths and missing-library logging in all four affected functions.
  • Adds configurable plugin-enabled behavior and restores modified test state.
File Description
tests/​Unit/​SyslogDatabaseLoaderTest.php Tests library loading and error logging across four Syslog callbacks.
tests/​bootstrap-unit.php Adds a configurable plugin-enabled stub.

🧠 Review effort: Balanced


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

@TheWitness
TheWitness marked this pull request as ready for review October 16, 2026 13:21
@TheWitness
TheWitness merged commit 27f160e into develop Oct 16, 2026
6 checks passed
@TheWitness
TheWitness deleted the copilot/fix-coverage-ci-failures-pr-425 branch October 16, 2026 13:21
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.

4 participants