answer_commit drops requested elements that appear only in `basis`, and loses trailing zeros in numeric cells
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 38/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- sql, typescript
- 領域
- tooling
調査の方向性
Start in packages/opencode/src/altimate/tools/answer-commit.ts on the feat/analyst-v10-commit branch, where the numeric 15-significant-digit check (about line 31), the rows union schema (about lines 56-61), and the optional precision field (about lines 37-46) live, and where answer_only rendering skips basis. The three defects need separate changes: scale-preserving number rendering, rejection that names missing targets or falls back to basis, and rounding instead of rejecting long floats. Done when the three acceptance unit tests in the issue pass, but the maintainers still need to decide how compound requests are detected.
索引モデルが issue の本文から書いたものです。
説明
Problem
Two independent defects in answer_commit (packages/opencode/src/altimate/tools/answer-commit.ts, present on the analyst-commit branches, not yet on main) cause a correct computation to be reported as an incomplete or differently formatted final answer.
- Compound requests lose elements. With
answer_only: truethebasisis never rendered; onlyfields/rowsreach the final output. When a question asks for two things ("the repository and the most frequently copied file"), models commit one field and place the second item only inbasis. The second item is silently dropped. - Trailing zeros are lost. Cell values are
z.union([z.string(), number, z.null()])and rendered withString(value). A JSON number5.00reaches the tool as JS5and renders as5, next to sibling cells such as4.18.precisionis opt-in, so nothing restores the scale. - Valid numbers are rejected. Numbers with more than 15 significant digits (for example a float32 artefact
18.440000534057617printed bysql_execute) are rejected until the model re-sends them as strings.
Mechanism
- Numeric validation: the 15-significant-digit check at about
answer-commit.ts:31; rows schema union at about:56-61;precisionoptional at:37-46(line numbers from branchfeat/analyst-v10-commit). answer_onlyrendering skipsbasis, so a requested element that exists only there never reaches the output.
Evidence
Recorded analyst sessions:
- Compound request: 5 of 5 sessions that used
answer_commitcommitted only the repository field and returned an 18-byte answer, while the same model without the tool answered with both items in all 5 sessions. 4 of the 5 committed the same repository as the correct answers. - Trailing zero: in 5 sessions on a question whose answer has averages like
4.18and5.00, 3 sessions passed the number5and returned an incorrect answer; the 2 that passed the string"5.00"were correct. The source SQL had printed5.000000and5.0. - 9 further calls were rejected for passing 15+ significant digit doubles or float32 artefacts.
Impact
Answer-losing: about 8 incorrect answers in the recorded sessions that were otherwise computed correctly. No time or cost effect.
Proposed fix
- Before rendering with
answer_only, compare the number of requested outputs (parse "X and Y", "for each ...") with the committed fields; on mismatch reject with the list of missing targets, or fall back to rendering the basis. - Render each numeric column with the maximum decimal scale present in that column (or the source result's scale).
- Accept numbers with more than 15 significant digits and round to
precisioninstead of rejecting.
Acceptance check
- Unit test:
rowswith cells5and4.18renders5.00and4.18when the column scale is 2. - Unit test: a two-target question committed with one field is rejected naming the missing target (or renders the basis).
- Unit test: a float32 artefact value is accepted and rounded.
Applies to the answer_commit tool introduced in #1449.
- 主要言語
- TypeScript
- スター
- 810
- フォーク
- 121
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 88
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
AltimateAI/altimate-code のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
AltimateAI/altimate-code#1454 ·
メンテナーはふだん 1 日以内に返信
-
test: MCP tests fail when the developer's ~/.claude.json has MCP servers (HOME is not sandboxed)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
AltimateAI/altimate-code#1386 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
AltimateAI/altimate-code#1384 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
AltimateAI/altimate-code#1323 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
AltimateAI/altimate-code#1288 ·
メンテナーはふだん 1 日以内に返信
AltimateAI/altimate-code の issue をすべて見る
似ている issue
-
[测试] 等待仓库加载后再记录多仓库排序基线対応中かも @myot233 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
area:arcade p3-medium ready-for-agent testing type:docs
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
fderuiter/deruiter.dev#2369 ·
メンテナーはふだん 1 日以内に返信
-
area:devenv origin:agent type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
overengineeringstudio/effect-utils#1949 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
ccch1mneyyy/dsh-TUI#1631 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
MiniMax-AI/minimax-code#507 ·
メンテナーはふだん 1 日以内に返信