Skip to content

Turn the summarizer off, not diffr, when it has no API key - #91

Merged
ketan0 merged 1 commit into
mainfrom
summarizer-off-without-key
Oct 6, 2026
Merged

ketan0 merged 1 commit into
mainfrom
summarizer-off-without-key

Conversation

@ketan0

@ketan0 ketan0 commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

With plugins.bundled.summarize.enabled = true and no API key in the config or environment, the summarizer's constructor failed and diffr exited 2 before writing a single record. One optional plugin missing a key broke every diff, including for tools that embed diffr.

Now, when the key is missing, the summarizer starts switched off for the run instead of failing. It prints the reason (same message as before) to stderr, and visit returns early so no file is changed. Each worker has its own copy of the plugin, so the line is printed once per worker.

  • plugins/shape/summarize/rust/src/lib.rs: the change, plus a rebuilt plugin.wasm
  • The CLI test now expects a successful diff. The unit test for the old setup error is deleted.

AI disclosure: written with Claude Code.

🤖 Generated with Claude Code

@ketan0
ketan0 force-pushed the summarizer-off-without-key branch 4 times, most recently from b6c1f45 to 81a9e8a Compare October 6, 2026 19:24
With the summarizer on and no key in the config or environment, its
constructor failed and diffr exited 2 before writing a single record, so
every diff failed. Without a key the summarizer is now made off for the
run: it says why on stderr and leaves every file as it is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ketan0
ketan0 force-pushed the summarizer-off-without-key branch from 81a9e8a to 77eb08b Compare October 6, 2026 19:30
@ketan0
ketan0 enabled auto-merge (squash) October 6, 2026 19:54
@ketan0
ketan0 merged commit 7d110ab into main Oct 6, 2026
37 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