fix(telegram): label buttons by verified outcome
This commit is contained in:
@@ -125,8 +125,8 @@ async def test_controlled_automation_keyboard_has_no_approval_buttons() -> None:
|
||||
|
||||
assert "✅ 批准" not in button_texts
|
||||
assert "❌ 拒絕" not in button_texts
|
||||
assert "🧰 處置包" in button_texts
|
||||
assert "📊 歷史" in button_texts
|
||||
assert "🧰 AI 處置證據" in button_texts
|
||||
assert "📈 復發趨勢" in button_texts
|
||||
|
||||
|
||||
def _approval_record(*, action: str, risk_level: RiskLevel) -> SimpleNamespace:
|
||||
|
||||
@@ -85,8 +85,8 @@ def test_repair_candidate_missing_card_exposes_ai_repair_candidate_package() ->
|
||||
assert "排程/監控:<code>Observability</code>" in body
|
||||
assert "Verifier:<code>事件時間線</code>" in body
|
||||
assert "不可視為自動化完成" in body
|
||||
assert "按鈕:<b>Work Item</b> 開啟受控佇列" in body
|
||||
assert "<b>處置包</b> 看完整證據" in body
|
||||
assert "按鈕:<b>受控工作項</b> 開啟受控佇列" in body
|
||||
assert "<b>AI 處置證據</b> 查完整回執" in body
|
||||
assert "修復候選狀態" in body
|
||||
assert "等待人工批准" not in body
|
||||
|
||||
@@ -150,7 +150,7 @@ def test_repair_candidate_draft_ready_card_exposes_controlled_queue_handoff() ->
|
||||
assert "promotion=11/11" in body
|
||||
assert "AwoooP 修復候選草案" in body
|
||||
assert "自動化資產總帳" in body
|
||||
assert "按鈕:<b>Work Item</b> 開啟受控佇列" in body
|
||||
assert "按鈕:<b>受控工作項</b> 開啟受控佇列" in body
|
||||
assert "缺少可執行修復候選" not in body
|
||||
assert "等待人工批准" not in body
|
||||
|
||||
|
||||
@@ -1715,7 +1715,7 @@ def test_awooop_reply_markup_prefers_truth_chain_then_runs() -> None:
|
||||
),
|
||||
},
|
||||
{
|
||||
"text": "🧭 Runs",
|
||||
"text": "🧭 執行鏈",
|
||||
"url": (
|
||||
"https://awoooi.wooo.work/zh-TW/awooop/runs"
|
||||
"?project_id=awoooi&incident_id=INC-20260514-F85F21"
|
||||
@@ -1749,7 +1749,7 @@ async def test_build_inline_keyboard_includes_awooop_deep_link() -> None:
|
||||
),
|
||||
} in buttons
|
||||
assert {
|
||||
"text": "🧭 Runs",
|
||||
"text": "🧭 執行鏈",
|
||||
"url": (
|
||||
"https://awoooi.wooo.work/zh-TW/awooop/runs"
|
||||
"?project_id=awoooi&incident_id=INC-20260514-F85F21"
|
||||
@@ -1777,11 +1777,11 @@ async def test_build_inline_keyboard_hides_approval_for_no_action() -> None:
|
||||
|
||||
assert "✅ 批准" not in button_texts
|
||||
assert "❌ 拒絕" not in button_texts
|
||||
assert "🧰 處置包" in button_texts
|
||||
assert "🔄 重診" in button_texts
|
||||
assert "🧰 AI 處置證據" in button_texts
|
||||
assert "🔄 重新診斷" in button_texts
|
||||
assert "🔕 靜默" in button_texts
|
||||
assert {
|
||||
"text": "🧭 Runs",
|
||||
"text": "🧭 執行鏈",
|
||||
"url": (
|
||||
"https://awoooi.wooo.work/zh-TW/awooop/runs"
|
||||
"?project_id=awoooi&incident_id=INC-20260611-NOOP"
|
||||
@@ -1818,17 +1818,17 @@ async def test_build_inline_keyboard_links_work_item_for_no_action_handoff() ->
|
||||
assert "✅ 批准" not in button_texts
|
||||
assert "❌ 拒絕" not in button_texts
|
||||
assert {
|
||||
"text": "🧾 Work Item",
|
||||
"text": "🧾 受控工作項",
|
||||
"url": (
|
||||
"https://awoooi.wooo.work/zh-TW/awooop/work-items"
|
||||
"?project_id=awoooi&incident_id=INC-20260625-977E5F"
|
||||
"&work_item_id=repair-candidate-draft%3Aawoooi%3AINC-20260625-977E5F"
|
||||
),
|
||||
} in buttons
|
||||
assert "🧰 處置包" in button_texts
|
||||
assert "🔄 重診" in button_texts
|
||||
assert "🧰 AI 處置證據" in button_texts
|
||||
assert "🔄 重新診斷" in button_texts
|
||||
assert {
|
||||
"text": "🧭 Runs",
|
||||
"text": "🧭 執行鏈",
|
||||
"url": (
|
||||
"https://awoooi.wooo.work/zh-TW/awooop/runs"
|
||||
"?project_id=awoooi&incident_id=INC-20260625-977E5F"
|
||||
|
||||
Reference in New Issue
Block a user