[Bug] on_loss validation error shows '{}' instead of the gate name
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
調査の方向性
issueにエラー文字列を組み立てていると記載されている qir_simulation.rs の631~632行付近から始め、ゲート名が on_loss の検証メッセージに渡る経路を追ってください。NoiseConfig と LossPolicy.DEGRADE を使ってPythonの例を再現し、文字列としての {} を確認してください。エラーにゲート名(例:cx)が表示され、再現時にプレースホルダーが報告されなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
- Symptom: Bad error
- Release
5a7b2ee32: Non-regression - Where: n/a · NoiseConfig API
Summary. Setting an unsupported on_loss policy (e.g. cx.on_loss = LossPolicy.DEGRADE) gives an error saying 'for the {} gate' instead of naming the gate.
Python repro
"""F31 (cosmetic): the on_loss validation error contains a literal, unformatted '{}' instead of the gate name."""
import sys
from qdk.simulation import NoiseConfig, LossPolicy
n = NoiseConfig()
try:
n.cx.on_loss = LossPolicy.DEGRADE
except AttributeError as e:
print(repr(str(e)), " (expected: 'for the cx gate')")
if "{}" in str(e):
print("VERDICT: REPRODUCED - error message contains an unformatted {} placeholder")
sys.exit(1)
print("VERDICT: NOT REPRODUCED - gate name is formatted into the message")
sys.exit(0)
print("VERDICT: INCONCLUSIVE - DEGRADE was accepted for cx")
sys.exit(2)
| Build | Result | Evidence |
|---|---|---|
release 5a7b2ee32 |
bug present | error message contains an unformatted {} placeholder |
main 42c843a20 |
bug present | error message contains an unformatted {} placeholder |
Observed: 'The on_loss attribute for the {} gate only supports the following policies:\n SKIP\n PROPAGATE\n RESIDUAL_S_DAGGER'
Expected: the gate name ('cx') formatted into the message
Probable cause. qir_simulation.rs ~631-632 passes a '{}' placeholder to String::from instead of formatting in the gate name.
Originally reported as A140
- 主要言語
- Rust
- スター
- 1k
- フォーク
- 226
- 平均マージ
- 2日 9時間
- マージ済み PR(30日)
- 72
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/qdk のほかの issue
-
enhancement needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
enhancement needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
enhancement needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug bulk-filed needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
area:storage kind:bug priority:p3 ready
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
XLSX files cannot be imported into Adobe InDesign due to missing AppVersion in extended propertiesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
qingjian-team/qingjian#1181 ·
メンテナーはふだん 2 日以内に返信