Skip to content

Mutmut killing - #2402

Merged
amilcarlucas merged 1 commit into
masterfrom
mutmut_killing
Nov 22, 2026
Merged

amilcarlucas merged 1 commit into
masterfrom
mutmut_killing

Conversation

@amilcarlucas

Copy link
Copy Markdown
Collaborator

Description

Mutmut killing of mutation survivors.

Checklist

  • Run pre-commit checks locally
  • Verified by a human programmer
  • All commits are signed off (use git commit --signoff)
  • Code follows our coding standards
  • Documentation updated if needed
  • No breaking changes or properly documented

Testing

Describe how you tested these changes:

  • Unit tests pass
  • Integration tests pass
  • Manual testing performed
  • Tested on flight controller hardware

Copilot AI balanced review requested due to automatic review settings November 19, 2026 11:58

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.

🟡 Changes recommended

Layout-dependent assertions fail on headless macOS because the fixture suppresses geometry updates, and the rendering tests are omitted from mutation-test selection.

5 open issues
What changed in this PR

This PR strengthens ArduPilot Methodic Configurator’s regression tests to catch surviving Mutmut mutations, alongside a small telemetry adjustment and acceptance-test setup changes.

Changes:

  • Expand boundary, error-handling, state-reset, and GUI assertions across models, plugins, and log analysis.
  • Capture the previous radio baseline before counter-reset handling.
  • Prepare exact-release metadata caches before offline template-import acceptance tests.
File Description
tests/​unit_data_model_vehicle_components_json_schema.py Verify schema logging and optional-field state.
tests/​unit_data_model_vehicle_components_import.py Expand import fallback, precedence, and diagnostic checks.
tests/​unit_data_model_vehicle_components_display.py Check nested schema paths and optional guidance.
tests/​unit_data_model_vehicle_components_base.py Assert initial model state and schema.
tests/​test_frontend_tkinter_parameter_editor_table.py Check add-parameter dialog controls and guidance.
tests/​test_frontend_tkinter_mavlink_inspector.py Assert window layout, table configuration, and tooltips.
tests/​test_frontend_tkinter_log_analysis_rendering.py Add focused report-rendering tests.
tests/​test_frontend_tkinter_file_browser.py Expand widget and download-preflight assertions.
tests/​test_esc_telemetry.py Check mask defaults, offsets, and connection clearing.
tests/​test_data_model_vehicle_components_validation.py Expand validation and firmware-choice coverage.
tests/​test_data_model_vehicle_components_templates.py Verify schema-directed conversions and diagnostics.
tests/​test_data_model_vehicle_components_import.py Strengthen component and battery import assertions.
tests/​test_data_model_vehicle_components_display.py Verify visibility, descriptions, and translation handling.
tests/​test_data_model_vehicle_components_base.py Cover initialization, casting, and persistence behavior.
tests/​test_data_model_transfer_progress.py Add negative-counter coverage.
tests/​test_data_model_parameter_upgrade.py Check unmapped stream-rate results.
tests/​test_data_model_par_dict.py Expand encoding, parsing, formatting, and error checks.
tests/​test_data_model_mavlink_inspector.py Assert initial sorting state.
tests/​test_data_model_firmware_upload.py Verify exact transition-error messages.
tests/​test_data_model_file_upload.py Assert upload-state cleanup.
tests/​test_data_model_fc_diagnostics.py Cover device boundaries and status-text source isolation.
tests/​test_data_model_configuration_step.py Check rename feedback and transient-state handling.
tests/​test_data_model_ardupilot_parameter.py Expand validation and manual-override coverage.
tests/​test_backend_data_telemetry.py Add rate, reset, and baseline assertions.
tests/​plugins/​unit_data_model_compass_calibration.py Verify active compass IDs are deduplicated.
tests/​plugins/​unit_data_model_battery_monitor.py Check monitoring-stop state and logging.
tests/​plugins/​test_gnss.py Cover missing target-system fallback.
tests/​plugins/​test_data_model_servo_out.py Expand assignment and future-step fallback checks.
tests/​plugins/​test_data_model_rc_receiver.py Assert receiver initialization and clearing behavior.
tests/​plugins/​test_data_model_motor_test.py Expand settings, layout, diagnostics, and connection checks.
tests/​plugins/​test_data_model_esc_rpm_scale.py Verify product normalization and script encoding.
tests/​plugins/​test_data_model_ahrs_orientation.py Cover orientation boundaries and degenerate inputs.
tests/​plugins/​test_data_model_accelerometer_calibration.py Assert IMU stream-state resets.
tests/​log_analysis/​test_data_model_log_availability_check.py Expand performance-monitor summary and health checks.
tests/​log_analysis/​test_data_model_imu_analysis.py Cover calibration recommendations and temperature boundaries.
tests/​log_analysis/​test_data_model_gnss_analysis.py Verify status coverage, ordering, and guidance.
tests/​acceptance_template_import_from_params.py Prepare and validate exact-release metadata caches.
ardupilot_methodic_configurator/​data_model_data_telemetry.py Move radio-baseline capture before reset handling.

Review effort: Balanced

Comment on lines +145 to +165
expected_geometry = inspector.calculate_scaled_geometry(750, 650).split("+", maxsplit=1)[0]
assert inspector.root.geometry().split("+", maxsplit=1)[0] == expected_geometry
assert inspector._state == TelemetryState()
assert inspector._closed is False
assert inspector._hovered_cell is None
assert inspector._timer_id is None
assert inspector._minimum_section_height == round(60 * inspector.dpi_scaling_factor)
assert inspector.root.protocol("WM_DELETE_WINDOW")
assert inspector.root.bind("<Destroy>")
assert inspector.status.cget("text") == _("No current MAVLink messages. Check the telemetry connection.")
assert int(inspector.status.cget("wraplength")) == max(1, inspector.main_frame.winfo_width() - 16)
assert int(inspector.status.cget("width")) == 1
assert inspector.status.master is inspector.main_frame
assert inspector.status.pack_info()["fill"] == "x"
assert int(inspector.status.pack_info()["padx"]) == 8
assert int(inspector.status.pack_info()["pady"]) == 8
assert inspector.connection_note.cget("text") == _(
"A USB connection measures USB traffic, not the telemetry radio link. "
"Connect through the telemetry link you want to test."
)
assert int(inspector.connection_note.cget("wraplength")) == max(1, inspector.main_frame.winfo_width() - 16)
Comment on lines +63 to +64
class TestFocusedReportRendering:
"""Check user visible report header, legend, and subsystem details."""
Comment on lines +90 to +95
"""Given a negative prior counter, clamp the next snapshot to zero bytes."""
batch = TransferBatchAccounting.from_sizes([100])
file = batch.start_file(100)
file.transferred = -1

assert file.update(-2, 100) == TransferProgress(0, 100)
Comment thread tests/test_esc_telemetry.py Outdated
Comment on lines +286 to +306
def test_missing_bdshot_mask_uses_a_zero_default(link: SimpleNamespace, monkeypatch: pytest.MonkeyPatch) -> None:
"""Treat an absent output mask as disabled while preserving the explicit zero fallback."""

class TrackingParameters(dict[str, float]):
"""Record the fallback passed for a missing flight-controller parameter."""

mask_default: object = None

def tracking_get(parameters: TrackingParameters, key: object, default: object = None) -> object:
if key == "SERVO_BLH_BDMASK":
parameters.mask_default = default
return dict.get(parameters, key, default)

monkeypatch.setattr(TrackingParameters, "get", tracking_get)

parameters = TrackingParameters({"ESC_TLM_MAV_OFS": 0.0})
link.controller.fc_parameters = parameters
model = EscTelemetryDataModel(link.controller)

assert model._configured_bdshot_output(0) is False
assert parameters.mask_default == 0
Comment thread tests/test_esc_telemetry.py Outdated
Comment on lines +309 to +314
def test_bdshot_mask_rejects_an_offset_past_the_output_range(link: SimpleNamespace) -> None:
"""Reject even a matching mask bit when the MAVLink offset is out of range."""
link.controller.fc_parameters = {"SERVO_BLH_BDMASK": float(1 << 31), "ESC_TLM_MAV_OFS": 32.0}
model = EscTelemetryDataModel(link.controller)

assert model._configured_bdshot_output(-1) is False
@amilcarlucas amilcarlucas added the AIReview Request an automated AI review; picked up by the reviewprs sweep label Nov 19, 2026
@AP-Review

AP-Review commented Nov 19, 2026 •

Copy link
Copy Markdown

Deprecated — see below for the updated review.

Previous review (2026-11-19)

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: REQUEST CHANGES

Reviewed at head 70751383c7.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/ardupilot/methodicconfigurator/2402/1.html#prMethodicConfigurator-2402

Two new or changed MAVLink inspector tests fail on both macOS CI legs, and a few mutation-test additions conflict with CONTRIBUTING.md.

Blocking

  1. tests/test_frontend_tkinter_mavlink_inspector.py:146: the geometry assertion ('1x1' == '750x650') and the <Configure> wraplength assertion at line 407 (700 == 384) fail on macos-15 and macos-26, because the darwin fixture suppresses layout. Guard them with skipif(sys.platform == "darwin") like the neighbouring geometry tests, or call _resize_notices() directly, and keep the other checks cross-platform.

Should fix

Minor (2)

@coveralls

coveralls commented Nov 20, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 44969576713

Coverage increased (+0.1%) to 96.186%

Details

  • Coverage increased (+0.1%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 7 coverage regressions across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

7 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
backend_flightcontroller_connection.py 7 98.35%

Coverage Stats

Coverage Status
Relevant Lines: 31775
Covered Lines: 30563
Line Coverage: 96.19%
Relevant Branches: 9642
Covered Branches: 8804
Branch Coverage: 91.31%
Branches in Coverage %: No
Coverage Strength: 2.87 hits per line

💛 - Coveralls

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

☂️ Code Coverage

current status: ✅

Overall Coverage

Statements Covered Coverage Threshold Status
31775 30553 96% 89% 🟢

New Files

No new covered files...

Modified Files

No covered modified files...

updated for commit: 83fd63a by action🐍

@AP-Review

AP-Review commented Nov 20, 2026 •

Copy link
Copy Markdown

Deprecated — see below for the updated review.

Previous review (2026-11-20)

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: COMMENT

Reviewed at head 62f5b5bf20.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/ardupilot/methodicconfigurator/2402/2.html#prMethodicConfigurator-2402

No blocking issues remain at 62f5b5b; two small test-hygiene points are left.
Since the previous review at 7075138, the macOS inspector failures, the mutmut selection gap and all the CONTRIBUTING-equivalent tests have been fixed.

Should fix

  • tests/test_backend_flightcontroller_connection.py:1120: removing TestFakeSerialForTests leaves FakeSerialForTests (backend_flightcontroller_connection.py:111) unused but still in mutmut only_mutate, so its read()/inWaiting() mutants now survive. Delete the class and its ARCHITECTURE_2_flight_controller_communication.md:121 entry, or keep the tests.
Minor (1)

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

     5 files  ±    0       5 suites  ±0   57m 59s ⏱️ - 1m 20s
10 685 tests +  211  10 619 ✅ +  211   4 💤 ±0  62 ❌ ±0 
53 116 runs  +1 055  52 919 ✅ +1 055  98 💤 ±0  99 ❌ ±0 

For more details on these failures, see this check.

Results for commit ddbb345. ± Comparison against base commit 4393038.

This pull request removes 39 and adds 250 tests. Note that renamed tests count towards both.
tests.test_backend_flightcontroller_connection.TestFakeSerialForTests ‑ test_close_does_not_raise
tests.test_backend_flightcontroller_connection.TestFakeSerialForTests ‑ test_device_attribute_is_stored
tests.test_backend_flightcontroller_connection.TestFakeSerialForTests ‑ test_in_waiting_returns_zero
tests.test_backend_flightcontroller_connection.TestFakeSerialForTests ‑ test_read_returns_empty_string
tests.test_backend_flightcontroller_connection.TestFakeSerialForTests ‑ test_write_always_raises_exception
tests.test_data_model_vehicle_components_base.TestComponentDataModelBase ‑ test_system_detects_when_model_has_components
tests.test_data_model_vehicle_components_base.TestComponentDataModelBase ‑ test_system_provides_multiple_component_access_methods
tests.test_data_model_vehicle_components_base.TestComponentDataModelBase ‑ test_system_validates_component_data_structure
tests.test_data_model_vehicle_components_base.TestComponentDataModelBase ‑ test_user_can_access_realistic_vehicle_components
tests.test_data_model_vehicle_components_base.TestComponentDataModelBase ‑ test_user_can_initialize_empty_model
…
tests.acceptance_template_import_from_params ‑ test_template_setup_prepares_exact_release_metadata[4.6.0-ArduCopter-4.6.3]
tests.acceptance_template_import_from_params ‑ test_template_setup_prepares_exact_release_metadata[4.6.0-ArduPlane-4.7.2]
tests.acceptance_template_import_from_params ‑ test_template_setup_prepares_exact_release_metadata[4.6.3-ArduCopter-4.6.3]
tests.acceptance_template_import_from_params ‑ test_template_setup_prepares_exact_release_metadata[4.6.3-ArduPlane-4.7.2]
tests.acceptance_template_import_from_params ‑ test_template_setup_prepares_exact_release_metadata[4.6.30-ArduCopter-4.6.3]
tests.acceptance_template_import_from_params ‑ test_template_setup_prepares_exact_release_metadata[4.6.30-ArduPlane-4.7.2]
tests.acceptance_template_import_from_params ‑ test_template_setup_prepares_exact_release_metadata[4.7.2-ArduCopter-4.6.3]
tests.acceptance_template_import_from_params ‑ test_template_setup_prepares_exact_release_metadata[4.7.2-ArduPlane-4.7.2]
tests.acceptance_template_import_from_params ‑ test_template_setup_prepares_exact_release_metadata[None-ArduCopter-4.6.3]
tests.acceptance_template_import_from_params ‑ test_template_setup_prepares_exact_release_metadata[None-ArduPlane-4.7.2]
…

♻️ This comment has been updated with latest results.

@AP-Review

AP-Review commented Nov 20, 2026 •

Copy link
Copy Markdown

Deprecated — see below for the updated review.

Previous review (2026-11-20)

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: COMMENT

Reviewed at head ebc64bf76f.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/ardupilot/methodicconfigurator/2402/3.html#prMethodicConfigurator-2402

No blocking issues at ebc64bf; two small test-hygiene points remain.
Since the previous review at 62f5b5b, the dead FakeSerialForTests class and the equivalent _got_imu_stream identity asserts have been removed.

Should fix

  • tests/test_data_model_fc_diagnostics.py:140: the mocked (None, None) return can't come from decode_device_id(), so this test only kills the redundant decoded is None guard that CONTRIBUTING.md treats as equivalent. Drop it, or feed device_rows a real out-of-range ID followed by a valid one.
  • tests/test_data_model_parameter_upgrade.py:216: comparing the whole tuple pins the unused empty new_name placeholder, another equivalent survivor in CONTRIBUTING.md. Assert only is_sr_param and new_par, or check the result through upgrade_file_parameters_47().
Minor (1)

Not fully reviewed: the Ubuntu and Windows pytest, pylint, ruff, Docker and pyright 3.15.2 CI legs were still queued at ebc64bf; native GUI rendering, live metadata/SITL and a full mutmut run were not exercised.

@AP-Review

AP-Review commented Nov 20, 2026 •

Copy link
Copy Markdown

Deprecated — see below for the updated review.

Previous review (2026-11-20)

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: COMMENT

Reviewed at head f0d02715ae.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/ardupilot/methodicconfigurator/2402/4.html#prMethodicConfigurator-2402

One low-severity test-hygiene point remains at f0d0271, and nothing blocks.
Since the previous review at ebc64bf, the diagnostics and SR-parameter tests have stopped pinning equivalent mutants, and the redundant battery assert is gone.

Should fix

  • tests/plugins/test_data_model_ahrs_orientation.py:447: test_estimate_preserves_a_match_score_below_one_percent fakes a 0.5% best preset score that real estimates can't reach. Every fitted rotation scores at least 1/3 against the 24 cube presets, and the custom cap is at least 85%. So it only kills the equivalent max(0.0, ...) -> max(1.0, ...) floor mutants. Drop it, or exercise the confidence path with real captured poses.
Minor (1)
  • tests/test_data_model_fc_diagnostics.py:138: the new invalid-then-valid test largely overlaps the existing parametrized test_invalid_device_and_priority_entries_do_not_hide_later_valid_compasses[0x1000000] case. It's harmless and follows our earlier suggestion; no change needed.

Not fully reviewed: the Ubuntu and macos-26 pytest, pylint, ruff, pyright, Docker, build_windows and REUSE CI legs were still queued at f0d0271. Native GUI rendering, live metadata/SITL and a full mutmut run were not exercised.

@AP-Review

AP-Review commented Nov 20, 2026 •

Copy link
Copy Markdown

Deprecated — see below for the updated review.

Previous review (2026-11-20)

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: COMMENT

Reviewed at head 2e3367bcc8.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/ardupilot/methodicconfigurator/2402/5.html#prMethodicConfigurator-2402

Three low-severity test-hygiene points, missed in earlier rounds, remain at 2e3367b (an amend of f0d0271). Nothing blocks.
Since the previous review, the author has dropped test_estimate_preserves_a_match_score_below_one_percent, so the equivalent AHRS floor mutant now survives.

Should fix

  • tests/test_data_model_vehicle_components_import.py:2854: test_cell_estimation_accepts_a_positive_recommended_voltage_below_one_volt monkeypatches a 0.5 V per-cell recommendation, but every real value is 1.05 V or more. It only kills the equivalent volt_per_cell <= 0 -> <= 1 guard mutant. Drop it, or use a real chemistry/spec value.
  • tests/plugins/test_data_model_ahrs_orientation.py:388: test_capture_alignment_keeps_zero_vectors_unaligned feeds all-zero samples straight to _capture_alignment(). estimate_orientation() never gets there unless every sample normalizes, so the or (0.0, 0.0, 0.0) fallbacks can't be reached. Drop it, or go through record_sample()/estimate_orientation().
  • tests/plugins/unit_data_model_battery_monitor.py:327: the initial _battery_status_interval_microseconds is None assert only pins the None vs empty-string unset sentinel, which CONTRIBUTING.md lists as equivalent. Drop that line and keep the interval, stop and logging checks.
Minor (1)

Not fully reviewed: 24 of 26 CI checks were still queued at 2e3367b. Native GUI rendering on Windows and macOS, live metadata downloads and SITL, and a full mutmut run were not exercised.

@AP-Review

AP-Review commented Nov 21, 2026 •

Copy link
Copy Markdown

Deprecated — see below for the updated review.

Previous review (2026-11-21)

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: COMMENT

Reviewed at head 4dfafb4163.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/ardupilot/methodicconfigurator/2402/6.html#prMethodicConfigurator-2402

Three more low-severity test-hygiene points, present since the first reviewed head and missed in earlier rounds, remain at 4dfafb4 (an amend of 2e3367b). Nothing blocks.
Since the previous review, the author has dropped the 0.5 V cell-voltage test, the all-zero AHRS alignment test and the initial battery-interval is None assert, and the three equivalent mutants they pinned now survive.

Should fix

  • tests/test_data_model_vehicle_components_base.py:105: test_failed_custom_cast_logs_the_fallback_type_name uses a metaclass that hides __name__ to reach the repr(datatype) fallback. Schema datatypes are always built-in types with __name__, so this only pins an equivalent mutant. Drop it, or test a real schema type with an invalid value.
  • tests/test_data_model_configuration_step.py:387: test_connection_renaming_reports_exact_duplicate_and_rename_feedback patches the planner to return duplicates. calculate_connection_rename_operations() never returns any, and CONTRIBUTING.md calls this branch unreachable. Drop the duplicate-removal expectation and keep the rename-message checks with real inputs.
  • tests/test_data_model_configuration_step.py:461: test_processor_keeps_transient_evaluation_variables_out_of_step_state injects fc_parameters and new_connection_prefix that get_eval_variables() never returns. The constructor pops are redundant with the per-step context, which CONTRIBUTING.md notes. Drop it, or check consecutive steps with real filesystem contexts.

Not fully reviewed: 24 of 26 CI checks were still queued at 4dfafb4. Native GUI rendering on Windows and macOS, live metadata downloads and SITL, and a full mutmut run were not exercised.

@AP-Review

AP-Review commented Nov 21, 2026 •

Copy link
Copy Markdown

Deprecated — see below for the updated review.

Previous review (2026-11-21)

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: COMMENT

Reviewed at head 0a339f298c.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/ardupilot/methodicconfigurator/2402/7.html#prMethodicConfigurator-2402

Two low-severity test-hygiene points remain at 0a339f2 (an amend of 4dfafb4). Nothing blocks, and CI is green apart from macOS pytest failures that match the merge-base exactly.
Since the previous review, the metaclass, patched-duplicate and injected transient-variable tests are gone, and their equivalent mutants now survive. The rename-message check now lives in the real-input test.

Should fix

  • tests/test_data_model_configuration_step.py:805: the leak test writes new_connection_prefix into processor.variables, which no production path does. get_eval_variables() never returns it, and the editor only writes it into copies. The line only makes the test pin the redundant per-step pop(). Drop the assignment; the test still catches a real leak without it.
  • tests/plugins/test_data_model_motor_test.py:366: test_unconfigured_model_starts_with_empty_configuration_state patches out _get_test_settings_from_disk() and then asserts the 0.0 throttle, 0.0 duration and False acknowledgement placeholders. The real constructor always overwrites the first two, and the flag is only truth-tested, so these asserts pin equivalent mutants. Drop lines 366-368.

Not fully reviewed: native GUI rendering on Windows and macOS, live metadata downloads, SITL and a full mutmut run were not exercised.

@AP-Review

AP-Review commented Nov 22, 2026 •

Copy link
Copy Markdown

Deprecated — see below for the updated review.

Previous review (2026-11-22)

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: COMMENT

Reviewed at head 0ddffc9307.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/ardupilot/methodicconfigurator/2402/8.html#prMethodicConfigurator-2402

Three low-severity test-hygiene points remain at 0ddffc9 (an amend of 0a339f2). Nothing blocks, and CI fails only on macOS legs that match the merge-base apart from one runner timeout.
Since the previous review, the injected new_connection_prefix write and the motor placeholder asserts are gone, and their equivalent mutants now survive.

Should fix

  • tests/test_data_model_vehicle_components_validation.py:2589: several new tests patch get_esc_connection_sub_dict to {}, or use scalar types, tuple protocols, a missing ESC_to_FC or a bare same_as_FC_to_ESC value. The shipped ESC tables never contain these, so the tests only kill equivalent mutants (the ("None",) CAN fallbacks, the tuple filter, protocol[0], the mirror filter, the ESC_to_FC default, the "" firmware default). The same goes for the incomplete-project chemistry test, the lowercase device-type test, the zero-dot AHRS case and the failsafe is False pin. CONTRIBUTING.md asks contributors not to construct inputs like these. Drop those cases (keep the order/dedup asserts), or drive them through real data.
  • tests/unit_data_model_vehicle_components_import.py:726 and tests/test_data_model_vehicle_components_import.py:2711: both tests make get_component_value() return None, which it never does, then spy on the "" lookup key. "" and any other unknown name select the same ArduCopter table. Drop them, or clear the firmware through real model data and assert the imported result.
Minor (1)

Not fully reviewed: native GUI rendering on Windows and macOS, live metadata downloads, SITL and a full mutmut run were not exercised.

@AP-Review

AP-Review commented Nov 22, 2026 •

Copy link
Copy Markdown

Deprecated — see below for the updated review.

Previous review (2026-11-22)

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: COMMENT

Reviewed at head ddbb3459ac.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/ardupilot/methodicconfigurator/2402/9.html#prMethodicConfigurator-2402

One low-severity test-hygiene point remains at ddbb345, a squashed rebase of 0ddffc9 onto the new master. Nothing blocks, and CI at this head has not run yet.
Since the previous review, the unsupported ESC-table, chemistry, device-type, AHRS and failsafe cases and both empty-firmware import spies have been removed, and the IMU test wording now matches its assert.

Should fix

  • tests/unit_data_model_vehicle_components_import.py:674: test_set_battery_type_uses_documented_defaults_when_metadata_fields_are_missing patches BATT_MONITOR_CONNECTION to {"4": {}}. Every shipped entry has both type and protocol, so the "None"/"Disabled" fallbacks can't be reached, and this test is the only one that kills those equivalent mutants. That is the same CONTRIBUTING.md point as the ESC cases already removed, so drop it too.

Not fully reviewed: CI at ddbb345 (all checks still queued), native GUI rendering on Windows and macOS, live metadata downloads, SITL and a full mutmut run were not exercised.

Add focused coverage for component imports, telemetry, log analysis and user workflows, with related maintenance and test fixture updates.

Signed-off-by: Dr.-Ing. Amilcar do Carmo Lucas <amilcar.lucas@iav.de>
@AP-Review

Copy link
Copy Markdown

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: ACCEPT

Reviewed at head 83fd63a3ed.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/ardupilot/methodicconfigurator/2402/10.html#prMethodicConfigurator-2402

No open findings remain at 83fd63a, an amend of ddbb345 whose only change deletes one test.
Since the previous review, the battery-monitor test that patched BATT_MONITOR_CONNECTION to {"4": {}} to kill equivalent fallback mutants has been removed, as CONTRIBUTING.md asks.

Not fully reviewed: CI at 83fd63a (all checks still queued), native GUI rendering on Windows and macOS, live metadata downloads, SITL and a full mutmut run were not exercised.

@amilcarlucas
amilcarlucas merged commit 30e9df9 into master Nov 22, 2026
25 of 29 checks passed
@amilcarlucas
amilcarlucas deleted the mutmut_killing branch November 22, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AIReview Request an automated AI review; picked up by the reviewprs sweep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants