镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix(display): routine rotation log lines are DEBUG (30% fewer journal lines) - #693

Merged
ChuckBuilds merged 4 commits into
mainfrom
claude/quieter-rotation-logs
Oct 1, 2026
Merged

ChuckBuilds merged 4 commits into
mainfrom
claude/quieter-rotation-logs

Conversation

@ChuckBuilds

Copy link
Copy Markdown
Owner

What

Every rotation logged each mode twice ("Switching to mode", then "Processing mode"). A mode with nothing to show added "display() returned False" and "No content to display", which say the same thing. Those three repeats are now DEBUG. "Switching to mode" stays INFO, and --debug still shows everything.

Why: tracing SD-card writes on ledpi (Pi 4)

The cache-dedup PR (#675) made no difference to the card's write rate. So I traced where the writes on ledpi actually go.

  • Device rate: about 1.3–1.5 MB/min on /proc/diskstats.
  • Cache files are a small share: LEDMatrix's cache writes are a few KB/min.
  • Filesystem metadata is small too: ext4 commits about 10 times a minute.
  • Runtime state on tmpfs made no difference: moving the display's live state to /run (branch claude/volatile-state-on-tmpfs) measured within noise. Dropped.
  • The display's total share: stopping it lowered writes from ~1.3 MB/min to ~0.8 MB/min.
  • What its logging costs: one A/B, 5-minute phases in alternating order, run inside one SSH session:
Phase SD writes ledmatrix journal lines / 5 min
main 1480 KiB/min 108
this branch 1360 KiB/min 75
main, log level WARNING 1252 KiB/min 2
main 1405 KiB/min 101
this branch 1432 KiB/min 74

Conclusion: the persistent journal costs about 9 KB of card writes per stored line. Silencing INFO entirely saves about 190 KiB/min (~13%). This change cuts the display's journal lines by about 30%, and its write saving (~50 KiB/min) is within noise.

It is a small, low-risk improvement, and the log reads better without the duplicates. It is not a big wear fix.

The rest of the display's roughly 300 KiB/min comes from something other than logs or runtime state. Attributing it needs root tracing (fatrace or blktrace). Most of ledpi's remaining writes are not from LEDMatrix at all: something SSHes into the rig every 30–40 s, and each login adds about 30 journal lines.

Tests

Display-controller tests pass (261), and no test depended on these messages.

🤖 Generated with Claude Code

ChuckBuilds and others added 3 commits September 30, 2026 10:40
Each rotation logged the mode twice ("Switching to mode", then "Processing
mode"), and an empty mode added "display() returned False" and "No content
to display". The three repeats are now DEBUG; "Switching to mode" stays
INFO. With the installer's persistent journal each log line becomes several
scattered page writes; on ledpi the display's ~21 lines/min accounted for
about 500 KiB/min of card writes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 28 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 6b6cfd57-ef7e-49f7-a7bd-94d0153b239d

📥 Commits

Reviewing files that changed from the base of the PR and between 3ad0438 and 69ccdc5.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • src/display_controller.py
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@ChuckBuilds
ChuckBuilds merged commit 74696d2 into main Oct 1, 2026
13 checks passed
@ChuckBuilds
ChuckBuilds deleted the claude/quieter-rotation-logs branch October 1, 2026 14:21
ChuckBuilds added a commit that referenced this pull request Oct 1, 2026
#703, #705, #706 and #693 merged after this branch was cut; their CHANGELOG
entries now sit under 3.8.0. The summary and New modules list name them
(sports consolidation stage 4's four modules, src/ipc, field_model), stage
4's section says to floor on 3.8.0, and src/common/README.md marks its four
modules 3.8.0 instead of Unreleased.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ChuckBuilds added a commit that referenced this pull request Oct 1, 2026
* chore(deprecation): remove the 35 APIs deprecated for 3.8.0

The usage scan (docs/DEPRECATIONS_3.8.md, regenerated 2026-10-01 and
committed here) finds no call or override of any of them in the 46
monorepo plugins or the 8 third-party plugins plugins.json lists; the
only core callers were other deprecated methods removed alongside.

- CacheManager: 13 methods, plus the private helpers only
  has_data_changed used (_has_*_changed, _is_market_open).
- DisplayManager: 7 methods, plus WEATHER_COLORS and the private
  _draw_sun/_cloud/_rain/_snow/_storm helpers only the icon methods used.
- FontManager: 14 methods, plus size_tokens, _save_overrides and
  _clear_plugin_font_cache. font_overrides and _load_overrides stay:
  resolve_font() still applies config/font_overrides.json.
  performance_stats stays: get_font() keeps it and tests read it.
- PluginManager.get_enabled_plugins.

test_deprecation.py pins only the two 3.9.0 markers now; the scanner
tests run against a stand-in core instead of the real markers. The
memory-tier tests read stats through log_memory_cache_stats() and the
component, and the test of the removed _clear_plugin_font_cache goes.
Docs drop the removed methods' reference entries; the Deprecated APIs
table becomes "Removed in 3.8.0". CHANGELOG gains a Removed section.

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

* chore(deprecation): drop the test harness's copies of the removed icon methods

VisualTestDisplayManager still drew weather icons that DisplayManager no
longer has, so a plugin's visual tests could pass on calls that raise
AttributeError on the real display. Its draw_sun/draw_cloud/draw_rain/
draw_snow/draw_weather_icon/draw_text_with_icons, WEATHER_COLORS and the
private helpers go, with the tests that exercised them. The CHANGELOG's
Deprecations entries no longer say nothing is removed.

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

* chore: prepare the 3.8.0 release

Bumps src.__version__ to 3.8.0 and turns Unreleased into ## 3.8.0, with a
summary and a New modules list (vegas_elements, testing.vegas, sports_vegas;
display_watchdog, plugin_catalog, plugin_runtime) for plugins flooring on
3.8.0. Adds the CHANGELOG line #701's second commit lacked (blocks laid out
off the render thread).

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

* chore: 3.8.0 also ships what landed on main since the prep

#703, #705, #706 and #693 merged after this branch was cut; their CHANGELOG
entries now sit under 3.8.0. The summary and New modules list name them
(sports consolidation stage 4's four modules, src/ipc, field_model), stage
4's section says to floor on 3.8.0, and src/common/README.md marks its four
modules 3.8.0 instead of Unreleased.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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