fix(debug-sqllogger): document third swallowed call site (schema-update path) - #48
Conversation
…te path)
SQL Logger 2025.2.0 has a third swallowed logger.debug site: the
(ColumnsMissing, ColumnsChanged) schema-update retry handler in
_update_device_history ("Failed to update schema for ..."). In a
live 2026-07-15 debugging pass on jarvis it was the only site firing
— patching just the two documented sites produced no [DEBUG-PATCH]
output while the generic error kept repeating.
- Phase 2: add the schema-update path + before/after example, and a
completeness check (grep kErrorKeyDeviceHistoryError for unpromoted
debug neighbours) so future SQL Logger drift is caught in-pass
- Phase 3: troubleshooting note for the no-[DEBUG-PATCH] symptom
- Phase 6: revert list grows to four regions
- Command summary updated to match; version 2.1.0 -> 2.1.1
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe plugin metadata version is updated from 2.1.0 to 2.1.1. SQL Logger debugging documentation is expanded from two to three swallowed debug call sites, adding schema-update patching, completeness checks, failure handling, and reversion guidance. ChangesPlugin metadata version
SQL Logger debugging workflow
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@skills/debug-sqllogger/SKILL.md`:
- Around line 299-305: Update the abort-path safety rule in SKILL.md to require
reverting all three logger call sites: both _update_device_history calls and the
_create_table_for_dev call, restoring each to self.logger.debug(...) without the
[DEBUG-PATCH] prefix. Keep the existing instruction to remove the startup()
one-shot DROP block for option c.
- Around line 175-179: Update the diagnostic guidance around the `[DEBUG-PATCH]`
cycle to first verify that the active plugin was restarted successfully and the
expected log path is being observed; only after confirming the new code is
loaded should a missing marker trigger the Phase 2 completeness check for
unpromoted `logger.debug` calls near `kErrorKeyDeviceHistoryError`.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 79f30700-29f0-4792-97a2-2f122943cb35
📒 Files selected for processing (4)
.claude-plugin/marketplace.json.claude-plugin/plugin.jsoncommands/debug-sqllogger.mdskills/debug-sqllogger/SKILL.md
| Undo every patch. Up to four regions may need reverting: | ||
|
|
||
| 1. `_update_device_history` logger call — restore to | ||
| `self.logger.debug(...)`, remove `[DEBUG-PATCH]` prefix | ||
| 2. `_create_table_for_dev` logger call — same | ||
| 3. `startup()` one-shot DROP block (option c only) — delete the whole | ||
| 2. `_update_device_history` schema-update logger call — same | ||
| 3. `_create_table_for_dev` logger call — same | ||
| 4. `startup()` one-shot DROP block (option c only) — delete the whole |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Update the abort-path safety rule to revert all three logger call sites.
Phase 6 now correctly lists the schema-update region, but the Safety Rules below still says to “restore both logger.debug call sites.” Following that instruction can leave the schema-update call patched at error level after an abort, causing persistent error-log spam.
🧰 Tools
🪛 SkillSpector (2.3.11)
[warning] 381: [RA2] Session Persistence: Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
Remediation: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
(Rogue Agent (RA2))
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@skills/debug-sqllogger/SKILL.md` around lines 299 - 305, Update the
abort-path safety rule in SKILL.md to require reverting all three logger call
sites: both _update_device_history calls and the _create_table_for_dev call,
restoring each to self.logger.debug(...) without the [DEBUG-PATCH] prefix. Keep
the existing instruction to remove the startup() one-shot DROP block for option
c.
- Safety Rules abort path now says restore all three logger.debug call sites (was 'both' — stale after adding the schema-update site) - Phase 3 no-marker troubleshooting first rules out failed restart / wrong log file before concluding a call site was missed Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@skills/debug-sqllogger/SKILL.md`:
- Around line 175-181: Update the prose in the troubleshooting section around
the restart and log-file checks to capitalize Indigo plugin references as
“Plugin,” including “the Plugin” and “Plugin log,” while leaving unrelated uses
of lowercase “plugin” unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: a3b657f0-2298-4fb6-9f0e-0b0523de9e86
📒 Files selected for processing (1)
skills/debug-sqllogger/SKILL.md
| `[DEBUG-PATCH]`. If the generic error keeps repeating but **no** | ||
| `[DEBUG-PATCH]` line appears after a full cycle, first rule out the | ||
| mundane causes: confirm the plugin actually restarted after the | ||
| patch deployed (grep the plugin log for the restart banner, or check | ||
| the event log for "Started plugin") and that you're reading the | ||
| right log file (`ls -lt` the log directory; rotation can leave you | ||
| tailing yesterday's file). Only once the patched code is confirmed |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Use Plugin for Indigo plugin references.
These lines refer to the Indigo Plugin as lowercase “plugin” (the plugin, plugin log). Capitalize it as Plugin to distinguish Indigo Plugins from Claude Code plugin components.
As per coding guidelines: “Use 'Plugin' (capitalized) when referring to Indigo plugins.”
🧰 Tools
🪛 SkillSpector (2.3.11)
[warning] 387: [RA2] Session Persistence: Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
Remediation: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
(Rogue Agent (RA2))
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@skills/debug-sqllogger/SKILL.md` around lines 175 - 181, Update the prose in
the troubleshooting section around the restart and log-file checks to capitalize
Indigo plugin references as “Plugin,” including “the Plugin” and “Plugin log,”
while leaving unrelated uses of lowercase “plugin” unchanged.
Source: Coding guidelines
Summary
SQL Logger 2025.2.0 has a third swallowed
logger.debugsite the skill didn't document: the(ColumnsMissing, ColumnsChanged)schema-update retry handler in_update_device_history("Failed to update schema for ...", ~line 679).Found in a live debugging pass on jarvis (2026-07-15): it was the only site firing — patching just the two documented sites produced no
[DEBUG-PATCH]output while the generic error kept repeating every ~60s. The culprit turned out to be an INT4 overflow (SQLSTATE 22003) on a UniFi wireless-client byte counter, surfaced only after promoting this third site.Changes
kErrorKeyDeviceHistoryErrorand confirm every neighbouringlogger.debuggot promoted, so future SQL Logger drift is caught in-pass[DEBUG-PATCH]" symptomcommands/debug-sqllogger.md): two → three call sites.claude-plugin/plugin.jsonand.claude-plugin/marketplace.json🤖 Generated with Claude Code
Summary by CodeRabbit
Release
Documentation