Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

clarify_user duplicate question ids can overwrite answers

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

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

評価

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

調査の方向性

clarify_user 関数とその質問IDの処理を探してください。おそらくTUIまたはユーザーインタラクションに関連するファイルにあります。バグは、IDごとに回答を格納するMapにあります。言及されているテストを見つけて、期待される動作を理解してください。修正には、IDの一意性の検証と、省略されたIDに対するデフォルト値の生成が含まれます。コアアンケートの回帰テストを実行して修正を確認してください。

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

説明

What happened?

clarify_user accepts duplicate question IDs, but the native TUI stores answers in a Map<id, answer>. Two questions with the same ID therefore share one answer slot.

After answering the first duplicate ID, allAnswered() also sees the second question as answered, so the dialog can submit early and the final result contains only one answer. I reproduced this on clean main @ adcf37b in a core questionnaire regression test, without external extensions.

I have a local fix and tests ready: explicit duplicate IDs are rejected, while omitted IDs keep deterministic q1/q2/... defaults and avoid collisions with explicit IDs. I would like to submit a PR if this behavior is preferred.

Steps to reproduce
  1. Call clarify_user with two questions using the same ID:
    {
      "questions": [
        { "id": "x", "question": "First?", "options": [{ "label": "A", "value": "a" }] },
        { "id": "x", "question": "Second?", "options": [{ "label": "B", "value": "b" }] }
      ]
    }
    
  2. Answer the first question.
  3. Switch to the submit tab.
  4. The dialog considers both questions answered and can return only one answer for ID x.
Expected behavior

Question IDs used as answer keys should be unique. Explicit duplicate IDs should not silently overwrite answers; omitted IDs may be generated deterministically.

Version

main @ adcf37b / @step-harness/coding-agent 0.84.4

主要言語
TypeScript
スター
54
フォーク
20
平均マージ
4時間 1分
マージ済み PR(30日)
12

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

stepfun-ai/Step-Code のほかの issue

stepfun-ai/Step-Code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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