Bug: executeCode tool schema: `capturePlot` is missing `.optional()`, breaking tool calls when omitted
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript
- 領域
- tooling
調査の方向性
dist/extension.js の executeCode の入力スキーマビルダー H0e(t) から始め、次に W0e を調べて capturePlot に対する既存のフォールバック動作を確認します。スキーマで capturePlot をオプションにし、それを省略したツール呼び出しが検証を通過してフォールバック動作を使用することを確認します。
索引モデルが issue の本文から書いたものです。
説明
Environment
- Extension: Posit Assistant (
posit.assistant) v1.4.1 - IDE: Positron
- OS: macOS (Darwin arm64)
Description
In Posit Assistant v1.4.1, when a language model invokes the executeCode tool without explicitly providing the capturePlot parameter (which is common for non-plotting tasks such as summary(model), data inspections, or whenever models omit optional-seeming parameters), the tool schema validation fails immediately before executing any code in the console.
The Assistant UI displays:
Tool input was not valid JSON or did not match the tool's schema. Please re-issue the tool call with valid JSON arguments that match the schema.
[
{
"expected": "boolean",
"code": "invalid_type",
"path": [
"capturePlot"
],
"message": "Invalid input: expected boolean, received undefined"
}
]
Root Cause
In the executeCode input schema builder (H0e(t) in dist/extension.js):
function H0e(t) {
// ...
return t.includeCapturePlotHint && (n.capturePlot = ft().describe(sao)),
t.timeoutParamDefaultMs !== void 0 && (n.timeout = tt().optional().describe(...)),
n;
}
- While
timeout(tt().optional()) anddangerReason(V().optional()) are explicitly marked as optional,capturePlotis instantiated asft().describe(sao)without.optional(). - This causes
capturePlotto be placed into the JSON Schema's"required"array:"required": [ "code", "intent", "language", "capturePlot" ] - In the execution implementation (
W0e):
The runtime already provides a fallback (expectsPlot: t.capturePlot ?? !0?? !0), confirming thatcapturePlotwas intended to be optional.
Expected Behavior
capturePlot should be optional in the schema so that tool calls omitting this parameter pass schema validation, with expectsPlot falling back to true.
Suggested Fix
Wrap capturePlot with .optional() in the tool input schema definition:
- t.includeCapturePlotHint && (n.capturePlot = ft().describe(sao))
+ t.includeCapturePlotHint && (n.capturePlot = ft().optional().describe(sao))
- 主要言語
- 言語のデータがありません
- スター
- 5
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
posit-dev/assistant-feedback のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
posit-dev/assistant-feedback#108 · リアクション 3 件 ·
-
rstudio
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 28/100
posit-dev/assistant-feedback#156 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
posit-dev/assistant-feedback#155 · コメント 1 件 ·
posit-dev/assistant-feedback の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
storytold/craft-anything#2472 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
posit-dev/positron-sas-extension#196 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
github/github-mcp-server#3960 ·
メンテナーはふだん 3 日以内に返信
-
Local proof does not compare the SDK loader's data-campaign between proven and production buildsオープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
NextCommerceCo/campaigns-os#819 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信