fix(tools): tolerate description=null in real KeeperHub catalogue#2
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
fix(tools): tolerate description=null in real KeeperHub catalogue#2devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
…ogue Real KeeperHub catalogues sometimes return workflow entries with description: null. The auto-generated tool builder was calling .strip() on that None, crashing build_workflow_tools() and silently falling back to just the 5 static tools at server startup. Coerce description/name through str() with slug as final fallback, and add a regression test. Co-Authored-By: Данила Вербина <danila.verbina@gmail.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
After PR #1 landed and the production server was restarted from
main,the auto-generated tool catalogue collapsed to just the 5 static tools
(it had been 23 — 5 static + 18 from the live KeeperHub catalogue).
Root cause: a real KeeperHub workflow entry now has
description: nullin its listing.
build_workflow_tools()was calling.strip()on thatNone, the entire builder threw, and the server's exception-fallback in
_build_tool_specs()quietly swallowed it.Fix: coerce description / name through
str()with the slug as thefinal fallback. Added a regression test using a synthetic mock
catalogue with
description: nullandname: null.Review & Testing Checklist for Human
Risk: green — 6-line bug fix in one function plus a new test.
pytest -qshows 31 passing tests (was 30).tool_counton http://178.104.45.97:8420/api/healthshould jump back from 5 to ~23 once we pull and restart.
Notes
The exception-swallowing fallback was working as designed (the server
stays up with degraded tool surface even when discovery breaks), but
silently — there's no current log line warning that we fell back. If
you'd like, a follow-up could add a
logger.warning("catalogue discovery failed: %s — falling back to static tools", exc)call in_build_tool_specs()so this kind of issue surfaces in journalctl.Link to Devin session: https://app.devin.ai/sessions/4c74607caacb488d803b3a14a74ee6df
Requested by: @danilaverbena