Skip to content

ci(governance): 切换到组织统一门禁 - #100

Merged
Pigbibi merged 5 commits into
mainfrom
ci/unified-governance
Nov 7, 2026
Merged

Pigbibi merged 5 commits into
mainfrom
ci/unified-governance

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

改动内容

把本仓库的 PR 门禁切换到组织统一治理动作 GdeiAssistant/.github/pr-governance@b25f3dd3e5c78905c2302b342af984f6ef186466。

  • risk-gate.yml、codex-nudge.yml、gitleaks.yml 改为调用共享 action,按 PR 并发取消,策略从默认分支读取。
  • 新增 pr-review-signal.yml:fork 与 Dependabot PR 的 review 事件只拿到只读 token,无法发布状态;现在由该无权限信号工作流触发 workflow_run,在受信任上下文里重新评估。
  • engineering-governance.yml 只保留 commitlint,内联 Gitleaks job 移除(改用共享 action 的同名 Gitleaks 检查)。
  • 删除失效的 secret-scan-weekly.yml:它从不传 --baseline,每次运行都以 exit 2 结束。完整历史扫描改由共享 action 提供,需先配置 SECRET_SCAN_BASELINE_B64;未配置前该定时任务保持关闭。
  • 删除 .github/scripts/test_risk_gate.py 及 hygiene 中的对应步骤:它校验的是已删除的 v2 内联实现。
  • 保留 .github/scripts/secret_scan.py、.gitleaks.toml、install-gitleaks.sh:CI 仍用它们在上传前扫描精确制品路径。
  • governance/policy.json 收敛为 pr-governance/v3;所有者身份不写入策略,由组织变量 RISK_GATE_OWNER_ID 和 RISK_GATE_OWNER 提供。
  • .github/engineering.md 同步更新扫描、基线与本地验证说明。

不改会怎样

v2 实现留在仓库里会与统一门禁并行产出同名 risk-gate / Gitleaks 检查,状态互相覆盖;四仓规则继续漂移,Codex 回执、标签绑定、基线扫描的修复无法统一下发。fork PR 的 review 事件也无法更新门禁状态。

怎么验证的

  • 共享 action:node --test 六个套件 159 项通过;test_secret_scan.py 40 项通过(Gitleaks 8.30.1)。
  • 用本仓库真实历史复现范围扫描缺陷:修复前 exit 2(非 UTF-8 提交),修复后 exit 0。
  • actionlint:模板与调用方无告警。
  • check_workflows.py / test_workflows.py / check_hygiene.py 通过(以本次 PR 的 CI 结果为准)。

检查清单

  • 上面列出的检查已通过,或有说明为什么没跑
  • 改动涉及的行为变化,已在同一次 PR 里更新对应文档
  • 没有提交真实账号、密码、验证码、Token、Cookie 或他人个人信息
  • 没有提交密钥、证书、local.properties 或环境配置文件

涉及隐私、权限或数据流的改动

不涉及。门禁只读取 PR 元数据,不检出、不执行 PR 代码。

关联 Issue

无

AI 辅助

Qoder(Claude)编写并运行了本地测试;PR 审查由 Codex 完成。

风险

R2:改动包含工作流与治理策略。合并后 ai-review 由统一门禁发布,再把它加入必需检查。回滚方式是 revert 本 PR,v2 文件在历史中完整保留。

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T12:42:10.004582Z ca968b8 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Pigbibi

Pigbibi commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 381c060db0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/governance/policy.json Resolved
Comment thread .github/workflows/risk-gate.yml Resolved
@Pigbibi

Pigbibi commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 08c9f323b4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/pr-review-signal.yml Resolved
@Pigbibi

Pigbibi commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: dc30d6a388

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Pigbibi Pigbibi added the owner-approved Owner approval for high-risk PRs. AI agents must never apply this label. label Nov 7, 2026
@Pigbibi

Pigbibi commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: ca968b82a9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Pigbibi
Pigbibi merged commit 491867b into main Nov 7, 2026
14 of 16 checks passed
@Pigbibi
Pigbibi deleted the ci/unified-governance branch November 7, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

owner-approved Owner approval for high-risk PRs. AI agents must never apply this label.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant