[Bug]: Testing agent turns any non-"true" string into false for scalar boolean parameters

オープン 初心者向け
#82 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
android, kotlin
領域
backend

調査の方向性

ConvertInputToAppFunctionDataUseCase.kt から始めてください。そこでは setParameterValue が AppFunctionBooleanTypeMetadata を寛容な String.toBoolean() で処理しています。既に厳密なパースを行い、パラメータ名を含むエラーを報告している配列の分岐と比較してください。スカラーの Boolean パラメータが "yes" のような未知の文字列を、わかりやすいエラーで拒否し、大文字小文字を問わず "true" と "false" が引き続き動作すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Steps to Reproduce
  1. Call a function with a Boolean parameter from the Debug screen or LLM with the value "yes" or "maybe".
Expected

Either true/false (case-insensitive) is accepted, or conversion fails with a clear error.

Observed

The value is silently converted to false. String elements in boolean arrays are now strict and an
unknown value fails, so scalars and arrays behave differently.

Root cause

setParameterValue uses the lenient String.toBoolean() for AppFunctionBooleanTypeMetadata
(ConvertInputToAppFunctionDataUseCase.kt).

Suggested fix

Use lowercase().toBooleanStrictOrNull() and fail with a message naming the parameter, matching
the array branch.

Found during review of the #62 fix.

主要言語
Kotlin
スター
222
フォーク
54
平均マージ
1日 11時間
マージ済み PR(30日)
26

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

android/appfunctions のほかの issue

android/appfunctions の issue をすべて見る

似ている issue

Kotlin の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。