-
Notifications
You must be signed in to change notification settings - Fork 0
fix: drift 清零——apply §2 必填字段+§7b 补申报+§8 bootstrap 豁免(ADR-0021) #75
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 |
|---|---|---|
|
|
@@ -16,7 +16,8 @@ | |
| "ossf/scorecard-action" | ||
| ], | ||
| "default_workflow_permissions": "read", | ||
| "default_workflow_permissions_can_approve": false | ||
| "default_workflow_permissions_can_approve": false, | ||
| "enabled_repositories": "all" | ||
| }, | ||
| "code_security": { | ||
| "configuration_name": "GitHub recommended", | ||
|
|
@@ -49,10 +50,20 @@ | |
| ] | ||
| }, | ||
| "direct_push_exemptions": { | ||
| "comment": "§8 直推检测豁免=已经 ADR 追认回填的破玻璃直推(事件定性见 ADR-0017:两次误直推净变更仅为 Trae IDE 分享 zip 与误入的 agent-registry gitlink,彼时 PR 流程已运转——diff 证据 f3974a6...416f5f5;并非'初始建仓导入',勘误见 ADR-0016 附录)。豁免机制=GM-2 破玻璃回填的机器可读形式(ADR-0016 附录):逐完整 SHA 登记,新直推不可能搭便车;豁免须有 ADR 背书,不得口头/临时豁免。", | ||
| "comment": "§8 直推检测豁免——两类,均须 ADR 背书,逐完整 SHA 登记(新直推不可能搭便车):(a) 破玻璃直推回填:GM-2 破玻璃的机器可读回填形式(ADR-0016 附录),事件定性见 ADR-0017(.github 两条:净变更仅为 Trae IDE 分享 zip 与误入 gitlink,彼时 PR 流程已运转);(b) 建仓 bootstrap 初始 commit(ADR-0021):仓库创建时序上分支/PR 尚不存在、不可能走 PR——Shorts_Director/agent-tools/Script_Writer 的 Initial commit 类(含 GitHub UI 建仓附带的 README 编辑 commit),登记为豁免而非追认破玻璃。", | ||
| ".github": [ | ||
| "9b056b3a925038484a8f6655ea45f81f071d5df6", | ||
| "416f5f57fd459f6ece3587f3aa20b772148ad335" | ||
| ], | ||
| "Shorts_Director": [ | ||
| "d81fea9db47e065fd2bd5211dd1a8e3c26589f41", | ||
| "014f38986ee5338fe0d7e3ea260c9a4f289af401" | ||
|
Comment on lines
+58
to
+60
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. 3. Bootstrap exemptions misreported The new bootstrap SHAs use an untyped exemption path that reports them as ADR-0017 break-glass backfills, while GOVERNANCE.yaml still declares every post-effective non-PR commit as drift. Clean runs therefore misclassify these events and no longer reflect the documented enforcement policy. Agent Prompt
|
||
| ], | ||
| "agent-tools": [ | ||
| "1050459443ce0373cffff7788c668d6f5dec0048" | ||
| ], | ||
| "Script_Writer": [ | ||
| "3446a39a0e2ec7527cab4e6da87b6e6ee0199fa7" | ||
|
Comment on lines
+53
to
+66
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. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
# 检查下游是否按类别消费直推豁免。
rg -n -C 5 \
'direct_push_exemptions|bootstrap|break.glass|破玻璃|ADR-0021' \
governance .github scripts
# 输出新增豁免 SHA 的提交元数据,确认其实际归类。
while IFS=$'\t' read -r repo sha; do
echo "== $repo $sha =="
gh api "repos/Cloudbird-Software/$repo/commits/$sha" \
--jq '{sha, parents: [.parents[].sha], committed_at: .commit.committer.date, message: .commit.message, files: [.files[]?.filename]}'
done < <(
jq -r '
.direct_push_exemptions
| to_entries[]
| select(
.key == "Shorts_Director"
or .key == "agent-tools"
or .key == "Script_Writer"
)
| .key as $repo
| .value[]
| [$repo, .]
| `@tsv`
' governance/expected-state.json
)Repository: Cloudbird-Software/.github Length of output: 19200 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
echo '== expected-state.json direct_push_exemptions =='
jq '.direct_push_exemptions' governance/expected-state.json
echo
echo '== drift-check consumer =='
sed -n '217,229p' governance/drift-check.sh
echo
echo '== commit metadata =='
jq -r '
.direct_push_exemptions
| to_entries[]
| select(.key == "Shorts_Director" or .key == "agent-tools" or .key == "Script_Writer")
| .key as $repo
| .value[]
| [$repo, .]
| `@tsv`
' governance/expected-state.json |
while IFS=$'\t' read -r repo sha; do
echo "== $repo $sha =="
gh api "repos/Cloudbird-Software/$repo/commits/$sha" \
--jq '{sha: .sha, parents: [.parents[].sha], committed_at: .commit.committer.date, message: .commit.message, files: [.files[]?.filename]}'
doneRepository: Cloudbird-Software/.github Length of output: 3817 按类型消费直推豁免
当前 🤖 Prompt for AI Agents |
||
| ] | ||
| } | ||
| } | ||
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.
2. script_writer registry entry misplaced
📘 Rule violation§ ComplianceAgent Prompt
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools