-
Notifications
You must be signed in to change notification settings - Fork 0
feat: cost-check infra 恢复通道(.github #93,ADR-0040) #209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -290,5 +290,16 @@ agent 侧补盲(AGENTS.md):派发前须确认无未决本 label issue。" | |||||||||||||||||||||||||
| exit 2 | ||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # 基础设施恢复通道(ADR-0040):本轮零 INFRA 且存在未决 cost-check cost-infra issue | ||||||||||||||||||||||||||
| # → 自动关闭(与熔断复位确认对称——否则权限修复后告警单永久滞留,#201 实例) | ||||||||||||||||||||||||||
|
Comment on lines
+293
to
+294
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 2. Missing card: metadata line The PR description body is missing the required Card: <owner>/<repo>#<n> metadata line. Downstream tooling that relies on this line may not be able to associate the change with its tracked work item. Agent Prompt
|
||||||||||||||||||||||||||
| if gov_open_issues cost-infra | grep -q "cost-check"; then | ||||||||||||||||||||||||||
| for row in $(gov_open_issues cost-infra | grep "cost-check" | cut -f1); do | ||||||||||||||||||||||||||
| mutate "$GH" issue close "$row" --repo "$GOV_REPO" --comment "基础设施恢复确认:本轮零 INFRA(billing 用量与 org 变量读写全通,$(date -u +%FT%TZ))——自动关闭(对称于熔断复位确认)。" >/dev/null 2>&1 || true | ||||||||||||||||||||||||||
|
Comment on lines
+295
to
+297
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 5. Overbroad issue close match Infra recovery closes any open cost-infra issue whose listed line contains the substring cost-check, which can accidentally close unrelated issues (e.g., manually created infra tickets referencing cost-check). This repeats a known pattern where “search by text then close” can mis-target issues not created by the workflow itself. Agent Prompt
|
||||||||||||||||||||||||||
| act "infra 恢复,关闭 issue #$row" | ||||||||||||||||||||||||||
|
Comment on lines
+297
to
+298
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win 不要吞掉关闭失败,也不要把 dry-run 记录为成功。
建议的处理方式- mutate "$GH" issue close "$row" --repo "$GOV_REPO" --comment "..." >/dev/null 2>&1 || true
- act "infra 恢复,关闭 issue #$row"
+ if mutate "$GH" issue close "$row" --repo "$GOV_REPO" --comment "..." >/dev/null 2>&1; then
+ if [[ "$DRY_RUN" == "1" ]]; then
+ echo "DRY (would close) issue #$row"
+ else
+ act "infra 恢复,关闭 issue #$row"
+ fi
+ else
+ infra "关闭 issue #$row 失败"
+ exit 2
+ fi📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
| done | ||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| [[ $TRIPPED -eq 1 ]] && exit 1 | ||||||||||||||||||||||||||
| exit 0 | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # retrigger(gate.yml 索引分支已在 main 修复,重新评估) | ||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. Missing adr-#### in description
📘 Rule violation§ ComplianceAgent Prompt
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools