Skip to content

Add chalk-plan-cache plugin for debugging query plan cache misses - #4

Merged
AndyMoreland merged 1 commit into
mainfrom
add-plan-cache-plugin
Jul 1, 2026
Merged

AndyMoreland merged 1 commit into
mainfrom
add-plan-cache-plugin

Conversation

@AndyMoreland

Copy link
Copy Markdown
Contributor

What

New chalk-plan-cache plugin with a single skill, debug-plan-cache-misses, that finds and debugs Chalk query plan cache misses from engine logs via the chalk logs CLI.

Why

When a query keeps replanning on every request (an Ad-hoc query request ... missed the plan cache warning, latency from repeated planning), the cause is that some field in the normalized BatchQuery — most often the given_features set — is varying between calls. This skill turns that investigation into a repeatable procedure.

What the skill does

  • Searches the two miss-related log lines:
    • message:"missed the plan cache" (ad-hoc miss warning)
    • message:"Computed plan for" (every plan computation — the useful one for diffing)
  • Documents the chalk logs query syntax (field:value, quoting, time flags, --aggregate, --follow).
  • Explains the cache key = the whole normalized BatchQuery (planner options resolved to effective values, so unset == default never causes a spurious miss).
  • Debugging workflow: diff consecutive Computed plan for … given … lines field-by-field, given set first, to pinpoint the differing field.

Files

  • plugins/chalk-plan-cache/.claude-plugin/plugin.json + .codex-plugin/plugin.json
  • plugins/chalk-plan-cache/skills/debug-plan-cache-misses/SKILL.md
  • plugins/chalk-plan-cache/README.md
  • Registered in both .claude-plugin/marketplace.json and .agents/plugins/marketplace.json

Notes

  • Uses chalk as the CLI binary throughout (not chalkadmin --plane <p> cli <env>).
  • Version is 0.1.0 — initial release of a new plugin, consistent with the other plugins' initial versions (no prior release to bump from).
  • claude plugin validate . passes.

Claude session: 754768b0-0140-45fa-821e-23b08105942d

New plugin with the debug-plan-cache-misses skill: finds plan cache
miss log lines ("missed the plan cache" / "Computed plan for ...")
via the chalk logs CLI and diffs consecutive plan computations to
pinpoint which BatchQuery field (usually the given_features set) forces
the miss. Registered in both the Claude Code and Codex marketplace
catalogs.

Claude session: 754768b0-0140-45fa-821e-23b08105942d
Copilot AI review requested due to automatic review settings July 1, 2026 03:14

Copilot AI 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.

Pull request overview

Adds a new internal plugin, chalk-plan-cache, to help investigate Chalk query plan cache misses by guiding users through searching and diffing relevant engine log lines via the chalk logs CLI.

Changes:

  • Introduces the debug-plan-cache-misses skill with a step-by-step workflow for locating miss signals and diffing consecutive Computed plan for … log entries.
  • Adds plugin metadata for both Claude and Codex plugin formats (name/version/description/author, plus Codex skill + interface wiring).
  • Registers the plugin in both internal marketplaces (.claude-plugin/marketplace.json and .agents/plugins/marketplace.json).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
plugins/chalk-plan-cache/skills/debug-plan-cache-misses/SKILL.md New skill documentation describing how to find and debug plan-cache misses from logs.
plugins/chalk-plan-cache/README.md Plugin-level overview and basic usage examples for the skill.
plugins/chalk-plan-cache/.codex-plugin/plugin.json Codex plugin metadata including skill directory and UI-facing interface fields.
plugins/chalk-plan-cache/.claude-plugin/plugin.json Claude plugin metadata for marketplace consumption.
.claude-plugin/marketplace.json Adds chalk-plan-cache to the internal Claude Code marketplace list.
.agents/plugins/marketplace.json Adds chalk-plan-cache to the agents plugin marketplace list with git-subdir source.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AndyMoreland
AndyMoreland merged commit eb96b42 into main Jul 1, 2026
2 checks passed
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.

2 participants