Skip to content

Fix PR #180's main-side CI regressions (Octave + MATLAB E-I)#181

Merged
HanSur94 merged 2 commits into
mainfrom
claude/octave-notification-center-fix
Jun 2, 2026
Merged

Fix PR #180's main-side CI regressions (Octave + MATLAB E-I)#181
HanSur94 merged 2 commits into
mainfrom
claude/octave-notification-center-fix

Conversation

@HanSur94

@HanSur94 HanSur94 commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Problem

PR #180 (Phase 1040: Companion Notification Center) merged to main and turned two CI checks red — on main itself and on every open PR that merges with main (e.g. #178). Confirmed it's a main regression, not PR-specific:

This PR fixes both. (Originally split as #181 + #182, but each half alone left the other check red — neither was independently green — so they're consolidated here into one mergeable PR.)

Fix 1 — Octave Tests (NotificationCenterPane.m)

#180's new class uses MATLAB-only classdef syntax; Octave can't load it, so test_notification_center_pane errors and takes the suite down.

Pattern Why Octave breaks Fix
IsAttached logical = false no inline property type-validation plain default
Event.empty (defaults + assignments) no ClassName.empty [] (identical under isempty/numel/indexing/concat)
[events.Severity], [events.StartTime] no comma-list expansion over classdef object arrays explicit index loops
arrayfun(@(e) e.Id, events, …) no arrayfun over classdef object arrays explicit index loop

Loops mirror the pane's existing text-filter loop. Also drops Event.empty from StubEventStore and the test's empty-case assertion.

Fix 2 — MATLAB Tests (E-I) (TestFastSenseCompanionPlantLogToolbar.m)

#180 added the notification bell to the companion toolbar, growing it 1×9 → 1×10 (bell @ col 8; spacer 8→9; gear 9→10, documented in FastSenseCompanion.m). #180 updated TestFastSenseCompanion/TestCompanionEventViewer but missed TestFastSenseCompanionPlantLogToolbar, whose findToolbarGrid_ matched only 9 columns (grid never found → verifyNotEmpty failed) and whose gear-column assertion expected col 9.

Updates the test to the shipped 1×10 layout {110,110,110,130,70,90,70,70,'1x',36}. Test-only; matches the intentional implementation.

Verification (local)

  • Octave 7+: test_notification_center_pane18/18 (was: class wouldn't load). CI Octave Tests already confirmed PASS on this branch.
  • MATLAB R2020b+: test_notification_center_pane 18/18; TestFastSenseCompanionPlantLogToolbar 11/11 (the two previously-failing methods now green).
  • mlint / Code Analyzer: clean on both files.

Not addressed (pre-existing flake, unrelated)

MATLAB Tests (Q-Z) can show TestTagPerfRegression/testConsumerMigrationTickGate erroring — a wall-clock perf gate (bench_consumer_migration_tick: 17.5% > 10%, 648.9ms vs 762.2ms). It's timing-sensitive CI-load flake, touches nothing in this PR, and passes on re-run. Left alone.

🤖 Generated with Claude Code

PR #180 introduced MATLAB-only classdef syntax that breaks the Octave
test suite: the class fails to load, taking test_notification_center_pane
down with it.

- Property type-constraint `IsAttached logical = false` (Octave classdef
  has no inline type validation) -> plain default + comment.
- `Event.empty` property defaults and method assignments (no
  ClassName.empty in Octave) -> `[]`, which behaves identically under
  isempty / numel / indexing / concatenation in every use here.
- Comma-list expansion over classdef object arrays ([events.Severity],
  [events.StartTime]) and arrayfun over them (Octave supports neither)
  -> explicit index loops, matching the pane's existing text-filter loop.

Also drops Event.empty from the test double (StubEventStore) and the
test's empty-case assertion. Verified 18/18 pass in both Octave 7+
(octave-cli) and MATLAB R2020b+; mlint clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

PR #180 (Phase 1040: Companion Notification Center) added a notification
bell to the FastSenseCompanion toolbar, growing it from a 1x9 to a 1x10
grid: the bell was inserted at col 8, pushing the flex spacer 8->9 and the
gear 9->10 (all documented in FastSenseCompanion.m). #180 updated
TestFastSenseCompanion and TestCompanionEventViewer but missed
TestFastSenseCompanionPlantLogToolbar, whose findToolbarGrid_ still matched
a 9-column grid and whose assertions still expected the gear at col 9. The
grid was never found (verifyNotEmpty failed) and the gear-column check
failed, turning MATLAB Tests (E-I) red on main and on every PR that merges
with main.

Updates the test to the shipped 1x10 layout
{110,110,110,130,70,90,70,70,'1x',36}: col 8 = bell (70), col 9 = flex
spacer, col 10 = gear (36).

Test-only change matching the intentional, self-consistent implementation.
Verified 11/11 pass in MATLAB R2020b+ (the two previously-failing methods
testToolbarGridIs1x5 + testSettingsButtonMovedToCol5 now green); mlint clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@HanSur94 HanSur94 changed the title Fix Octave compatibility in Companion NotificationCenterPane Fix PR #180's main-side CI regressions (Octave + MATLAB E-I) Jun 2, 2026
@HanSur94 HanSur94 merged commit be70d4b into main Jun 2, 2026
20 checks passed
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.

1 participant