Skip to content

VisualTestDisplayManager.set_scrolling_state() is missing frame_hold — check_plugin.py fails 8/8 sizes for ledmatrix-stocks #525

Description

@ChuckBuilds

Summary

VisualTestDisplayManager.set_scrolling_state() never picked up the frame_hold parameter that the real DisplayManager gained. Any plugin that passes it raises TypeError at render time, so scripts/check_plugin.py — and the visual/golden test path built on it — fails on every size for that plugin.

ledmatrix-stocks (v2.9.0) is currently the only plugin affected, and it therefore has no working visual regression coverage at all.

The divergence

src/display_manager.py:1341:

defset_scrolling_state(self, is_scrolling: bool, frame_hold: int=1):

src/plugin_system/testing/visual_display_manager.py:506:

defset_scrolling_state(self, is_scrolling: bool):
"""Set the current scrolling state (no-op for testing)."""

Reproduction

LEDMatrix v3.3.0-4-g0730d952, ledmatrix-stocks 2.9.0:

cd ~/LEDMatrix
python3 scripts/check_plugin.py -p ledmatrix-stocks -d ~/LEDMatrix/plugin-repos
[FAIL] 64x32 stocks error=TypeError("VisualTestDisplayManager.set_scrolling_state() got an unexpected keyword argument 'frame_hold'")
[FAIL] 128x32 stocks error=TypeError(...)
[FAIL] 64x64 stocks error=TypeError(...)
[FAIL] 96x48 stocks error=TypeError(...)
[FAIL] 128x64 stocks error=TypeError(...)
[FAIL] 256x32 stocks error=TypeError(...)
[FAIL] 128x96 stocks error=TypeError(...)
[FAIL] 256x128 stocks error=TypeError(...)

8/8 sizes, rc=1. Every other installed plugin on the rig renders; this one cannot be rendered by the harness at all.

Caller

ledmatrix-stocks/manager.py:193, and the comment there shows the call is deliberate and correct against the real core:

# Pass the frame hold every time scrolling starts, not once at# construction: plugins share one display manager, so a hold set at# init is wiped as soon as any other plugin finishes its scroll.self.display_manager.set_scrolling_state(
True, frame_hold=self._scroll_frame_hold())

The plugin already guards for one harness divergence two lines below (hasattr(self.display_manager, "process_deferred_updates")), so the shape of the problem is known — this one just wasn't covered.

Suggested fix

Match the signature in the test double:

defset_scrolling_state(self, is_scrolling: bool, frame_hold: int=1):
self._scrolling_state['is_scrolling'] =is_scrollingself._scrolling_state['frame_hold'] =frame_holdifis_scrolling:
self._scrolling_state['last_scroll_activity'] =time.time()

More generally: this class of drift is silent until a plugin happens to use the new argument. A test that asserts VisualTestDisplayManager's public methods are signature-compatible with DisplayManager's (via inspect.signature) would catch the next one at core-commit time rather than at plugin-render time.

Environment

256x64 rig, LEDMatrix v3.3.0-4-g0730d952. Found while rendering all 44 installed plugins through check_plugin.py.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions