fix(telegram): route polling diagnostics away from errors#82958
Conversation
|
Codex review: needs real behavior proof before merge. Summary Reproducibility: yes. from source inspection: current main wires the monitor logger to Real behavior proof Next step before merge Security Review detailsBest possible solution: Land the narrow monitor logger-boundary fix after maintainer review and real runtime log evidence, keeping normal polling diagnostics on Do we have a high-confidence way to reproduce the issue? Yes from source inspection: current main wires the monitor logger to Is this the best way to solve the issue? Yes for the code shape: the monitor boundary owns the severity decision because What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 58f1db1bc8eb. |
|
Drive-by
Closing my parallel PR. Thanks for picking this up. |
|
Codex review: blocking finding before merge. This fixes a real Telegram logging bug, but the implementation moves too much output off the error channel. It changes the shared monitor logger, not just the startup diagnostic path. Finding
Context Bug fixed: #82957, Telegram polling startup diagnostics incorrectly rendered as error output. Affected surface: Telegram plugin polling monitor, Provenance: likely introduced by the existing monitor/polling logger seam; current Verification: source-reviewed against fetched |
a6fabe4 to
979c6f3
Compare
|
Verification before merge:
|
Summary
[telegram][diag]monitor/polling diagnostics now useruntime.log, while non-diag[telegram]warnings/errors and offset persistence/delete failures stay onruntime.error.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Real behavior proof (required for external PRs)
[telegram][diag] polling cycle started ...diagnostic through the normal log channel instead of the error channel, while non-diag[telegram]warnings/errors remain on the error channel.node scripts/run-vitest.mjs extensions/telegram/src/monitor.test.tsruntime.error:logs polling startup diagnostics without using the error channelpasses, the regression testkeeps polling restart warnings on the error channelpreserves non-diag warning output onruntime.error, and the full Telegram monitor test file reports34 passed (34).Root Cause (if applicable)
monitorTelegramProvidercollapsed all polling monitor output toopts.runtime?.error ?? console.error, andTelegramPollingSessionsends normal lifecycle diagnostics through the injected logger.Regression Test Plan (if applicable)
extensions/telegram/src/monitor.test.tspolling cycle startedviaruntime.logand does not callruntime.error, while non-diag polling restart warnings still callruntime.error.User-visible / Behavior Changes
Normal Telegram
[telegram][diag]polling startup diagnostics no longer appear as error-level console output. Non-diag Telegram warnings/errors remain error-level output.Diagram (if applicable)
Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation: N/ARepro + Verification
Environment
Steps
Expected
polling cycle startedis logged throughruntime.log.runtime.erroris not called for normal[telegram][diag]startup diagnostics.[telegram]warnings/errors remain onruntime.error.Actual
runtime.error.[telegram][diag]lines toruntime.log; the regression tests confirmruntime.erroris untouched for startup diagnostics and still receives non-diag restart warnings.Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
logError/runtime.error;[telegram][diag]diagnostics useruntime.log; non-diag[telegram]warnings/errors remain onruntime.error.Review Conversations
If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoRisks and Mitigations
[telegram][diag]Telegram monitor diagnostics become less visually prominent.runtime.error; the changed startup line is explicitly a normal lifecycle diagnostic.