Skip to content

fix(debug-sqllogger): document third swallowed call site (schema-update path) - #48

Merged
simons-plugins merged 2 commits into
mainfrom
fix/debug-sqllogger-third-call-site
Jul 15, 2026
Merged

fix(debug-sqllogger): document third swallowed call site (schema-update path)#48
simons-plugins merged 2 commits into
mainfrom
fix/debug-sqllogger-third-call-site

Conversation

@simons-plugins

@simons-plugins simons-plugins commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Summary

SQL Logger 2025.2.0 has a third swallowed logger.debug site 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

  • Phase 2: schema-update path added to the call-site list with before/after example; new completeness check — grep kErrorKeyDeviceHistoryError and confirm every neighbouring logger.debug got promoted, so future SQL Logger drift is caught in-pass
  • Phase 3: troubleshooting note for the "errors continue but no [DEBUG-PATCH]" symptom
  • Phase 6: revert checklist grows from three to four regions
  • Command summary (commands/debug-sqllogger.md): two → three call sites
  • Version 2.1.0 → 2.1.1 in both .claude-plugin/plugin.json and .claude-plugin/marketplace.json

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Release

    • Updated the Indigo plugin version to 2.1.1 across published metadata.
  • Documentation

    • Updated SQL Logger debugging guidance to reflect patching an additional swallowed debug/error site (including the schema-update path).
    • Expanded the troubleshooting workflow with completeness checks and improved failure detection.
    • Refined revert instructions to cover up to four patch regions, including restoration of the full set of promoted debug call sites.

…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>
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The 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.

Changes

Plugin metadata version

Layer / File(s) Summary
Bump plugin metadata version
.claude-plugin/marketplace.json, .claude-plugin/plugin.json
Both plugin metadata files change their version from 2.1.0 to 2.1.1.

SQL Logger debugging workflow

Layer / File(s) Summary
Expand SQL Logger patch workflow
commands/debug-sqllogger.md, skills/debug-sqllogger/SKILL.md
Documentation now covers three swallowed debug sites, including the schema-update path, with completeness checks, repeated-error handling, and revert instructions for up to four patch regions.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: documenting the third swallowed SQL Logger call site in the schema-update path.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/debug-sqllogger-third-call-site

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7b1edab and 05d66cc.

📒 Files selected for processing (4)
  • .claude-plugin/marketplace.json
  • .claude-plugin/plugin.json
  • commands/debug-sqllogger.md
  • skills/debug-sqllogger/SKILL.md

Comment thread skills/debug-sqllogger/SKILL.md
Comment on lines +299 to +305
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 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>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 05d66cc and 94f63e4.

📒 Files selected for processing (1)
  • skills/debug-sqllogger/SKILL.md

Comment on lines +175 to +181
`[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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 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

@simons-plugins
simons-plugins merged commit 3602f98 into main Jul 15, 2026
3 checks passed
@simons-plugins
simons-plugins deleted the fix/debug-sqllogger-third-call-site branch July 15, 2026 13:16
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