diff --git a/docs/LOGBOOK.md b/docs/LOGBOOK.md index 2f7ea5789..5dd808cac 100644 --- a/docs/LOGBOOK.md +++ b/docs/LOGBOOK.md @@ -1,3 +1,80 @@ +## 2026-05-21|T124 Dedicated source-link canary + +**觸發**: + +- T122 / T123 已證明 source-correlation refresh candidate gate 可運作,但當時拿 `AwoooPSourceProviderCanary` 作為未來 refresh candidate。 +- 這在機械上正確,語意上仍髒:provider canary 應該只代表 Sentry / SigNoz webhook-native ingress freshness,不應混成 Incident source matching 的刷新來源。 + +**修正**: + +- `scripts/alert_chain_smoke_test.py` 新增 `AwoooPSourceLinkCanary` 專用 Sentry payload 與 `--source-link-canary-target-incident-id`。 +- E2E health 現在先送 provider heartbeat / upstream canary,再送 dedicated source-link canary,最後把 `source-evidence:sentry:upstream_canary:awoooi-source-link-canary-${run_ref}` 傳給 source-correlation apply smoke。 +- `apps/api/tests/test_alert_chain_smoke_metric.py` 補上 operator-key guard 與 dedicated Sentry payload 測試,避免未授權或 payload 退回一般 provider canary。 + +**Verification**: + +```text +python3 -m py_compile scripts/alert_chain_smoke_test.py scripts/awooop_source_correlation_apply_smoke.py + -> pass +/Users/ogt/.pyenv/shims/ruff check scripts/alert_chain_smoke_test.py scripts/awooop_source_correlation_apply_smoke.py apps/api/tests/test_alert_chain_smoke_metric.py + -> pass +ruby -e 'require "yaml"; YAML.load_file(".gitea/workflows/e2e-health.yaml"); puts "yaml ok"' + -> yaml ok +/Users/ogt/.pyenv/shims/python -m pytest apps/api/tests/test_alert_chain_smoke_metric.py -q + -> 11 passed +git diff --check + -> pass +production alert-chain source-link canary smoke: + -> PASSED — 9/9 checks passed + -> Source Link Canary recorded for INC-20260505-25E744 +production source-correlation refresh candidate smoke: + -> status=already_applied + -> verification_status=applied_link_verified + -> applied_link_total=1 + -> refresh_candidate_status=ready + -> refresh_candidate_alertname=AwoooPSourceLinkCanary + -> refresh_candidate_work_item_id=source-evidence:sentry:upstream_canary:awoooi-source-link-canary-codex-t124-production +``` + +**Gitea Actions**: + +```text +Commit: + -> 867e0e73 ci(awooop): add dedicated source link canary +Code Review: + -> #2738 success +CD: + -> #2737 success + -> tests / build-and-deploy / post-deploy-checks success + -> deploy marker 7ae59c1 chore(cd): deploy 867e0e7 [skip ci] +E2E workflow_dispatch: + -> #2742 success + -> Source Provider Heartbeat recorded sentry/signoz + -> Source Provider Upstream Canary recorded sentry/signoz + -> Source Link Canary recorded sentry source-link canary event for INC-20260505-25E744 + -> refresh_candidate_status=ready + -> refresh_candidate_alertname=AwoooPSourceLinkCanary + -> refresh_candidate_work_item_id=source-evidence:sentry:upstream_canary:awoooi-source-link-canary-gitea-e2e-2742-1 + -> verification_status=applied_link_verified +Note: + -> E2E alert-chain smoke itself passed; its two warning checks were local kubectl availability warnings inside the Gitea runner, not source-link or provider-chain failures. +``` + +**判讀**: + +- T124 把「provider freshness」與「Incident source-link refresh」拆成兩種 canary,告警語意與後續前端呈現都更乾淨。 +- 每日 E2E 現在能同時回答三個問題:外部 provider ingress 是否新鮮、source-link 專用 evidence 是否能建立、已套用 source link 是否仍能被 Status Chain 驗證。 +- 這仍維持 append-only 與低噪音:新 source-link evidence 只供 refresh candidate gate 驗證,不會任意改 Incident 狀態、自動修復結果或 ticket。 + +**目前整體進度**: + +- AwoooP 告警可觀測鏈:99.997% → 99.998%。 +- Incident-level source correlation 可見性:97.2% → 97.5%。 +- Source correlation apply 狀態鏈可驗證性:99.65% → 99.72%。 +- Source correlation freshness / rolling gate:97% → 98.2%。 +- 前端 AI 自動化管理介面同步:99.99%。 +- 完整 AI 自動化管理產品化:99.86% → 99.88%。 + ## 2026-05-21|T123 Source correlation refresh candidate preflight **觸發**: diff --git a/docs/superpowers/specs/2026-04-15-MASTER-ai-autonomous-flywheel-v2.md b/docs/superpowers/specs/2026-04-15-MASTER-ai-autonomous-flywheel-v2.md index a90f7789d..ab2b2d1b1 100644 --- a/docs/superpowers/specs/2026-04-15-MASTER-ai-autonomous-flywheel-v2.md +++ b/docs/superpowers/specs/2026-04-15-MASTER-ai-autonomous-flywheel-v2.md @@ -2583,6 +2583,13 @@ Phase 6 完成後 - Gitea / E2E:`4b6c9b95 ci(awooop): verify source link refresh candidate` 已推 Gitea main。Code Review #2734 success;E2E workflow_dispatch #2735 success,log 顯示 Source Provider Heartbeat / Upstream Canary recorded sentry+signoz,並回 `refresh_candidate_status=ready`、`refresh_candidate_work_item_id=source-evidence:sentry:upstream_canary:awoooi-canary-gitea-e2e-2735-1`、`verification_status=applied_link_verified`。 - 目前進度更新:AwoooP 告警可觀測鏈約 99.997%;Incident-level source correlation 可見性約 97.2%;Source correlation apply 狀態鏈可驗證性約 99.65%;Source correlation freshness / rolling gate 約 97%;完整 AI 自動化管理產品化約 99.86%。 +**T124 Dedicated source-link canary(2026-05-21 台北)**: +- 觸發:T122 / T123 使用 `AwoooPSourceProviderCanary` 證明 refresh candidate gate 可運作,但 provider canary 語意屬於 webhook-native ingress freshness,不應長期混作 Incident source matching 的刷新來源。 +- 修正:`scripts/alert_chain_smoke_test.py` 新增 dedicated `AwoooPSourceLinkCanary` Sentry payload、operator-key guard 與 `--source-link-canary-target-incident-id`;`.gitea/workflows/e2e-health.yaml` 改用 `source-evidence:sentry:upstream_canary:awoooi-source-link-canary-${run_ref}` 作為 source-correlation refresh candidate;`apps/api/tests/test_alert_chain_smoke_metric.py` 補 dedicated payload 測試。 +- Verification:local `py_compile` pass;`ruff` pass;workflow YAML parse ok;`pytest apps/api/tests/test_alert_chain_smoke_metric.py -q` 回 `11 passed`;`git diff --check` pass。Production alert-chain source-link canary smoke 回 `PASSED — 9/9 checks passed`,並記錄 `Source Link Canary recorded for INC-20260505-25E744`;production source-correlation smoke 回 `refresh_candidate_status=ready`、`refresh_candidate_alertname=AwoooPSourceLinkCanary`、`verification_status=applied_link_verified`。 +- Gitea / E2E:`867e0e73 ci(awooop): add dedicated source link canary` 已推 Gitea main;deploy marker `7ae59c1 chore(cd): deploy 867e0e7 [skip ci]`。Actions:#2738 Code Review success;#2737 CD tests / build-and-deploy / post-deploy-checks success;#2742 E2E workflow_dispatch success,log 顯示 Source Provider Heartbeat / Upstream Canary recorded sentry+signoz、Source Link Canary recorded sentry source-link canary event for `INC-20260505-25E744`,並回 `refresh_candidate_work_item_id=source-evidence:sentry:upstream_canary:awoooi-source-link-canary-gitea-e2e-2742-1`、`refresh_candidate_alertname=AwoooPSourceLinkCanary`、`verification_status=applied_link_verified`。E2E alert-chain smoke 的兩個 warning 是 Gitea runner 內無 `kubectl` 的非關鍵檢查,不是 source-link/provider 鏈路失敗。 +- 目前進度更新:AwoooP 告警可觀測鏈約 99.998%;Incident-level source correlation 可見性約 97.5%;Source correlation apply 狀態鏈可驗證性約 99.72%;Source correlation freshness / rolling gate 約 98.2%;前端 AI 自動化管理介面同步約 99.99%;完整 AI 自動化管理產品化約 99.88%。 + --- ### 2026-04-20 晚 (台北) — C1-C4 全流程串接 — Playbook 鏈路保護(commit de2d34d)