Skip to content

test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86) - #17

Closed
randypanding wants to merge 119 commits into
mainfrom
feat/test-integrity-p2-1
Closed

test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)#17
randypanding wants to merge 119 commits into
mainfrom
feat/test-integrity-p2-1

Conversation

@randypanding

Copy link
Copy Markdown
Contributor

摘要

落地 P2-1(.github #86,ADR-0035):新增 test-integrity 可复用工作流,四类测试篡改直接红——

规则 检测 严重度
TI-R1 测试文件删除 / 改名移出测试路径(内容不变的 rename 不算) red
TI-R2 断言计数净下降(全 PR 净额,文件间迁移不受影响) red
TI-R3 新增抑制标记(skip/xfail/only/t.Skip/mark.skip/@ignore…) red
TI-R4 期望值改写嫌疑(测试有删改行 + 零实现文件变更) require_adr
  • fail-closed:SHA 不可解析 / diff 失败 / policy 拉取失败 / ADR 清单读不到 = 红(TI-FC)
  • 逃生门:PR title/body 引用 \bADR-NNNN\b(agent-registry/decisions 存在性校验,防幽灵)→ 豁免但计数入账(TI-COUNT escape_hatch_waived + step summary)
  • 规则/阈值声明:.github governance/policy/testing.yaml#test_integrity(配套 PR);policy 缺失时用检测器内置同值缺省
  • T8 自检常驻:本仓 ci.yml 新增 test-integrity-selftest job,15 个 fixture 预标注全比对,gate needs 纳入(ADR-0032 严格断言)

变更文件

  • 新增 .github/workflows/test-integrity.yml(reusable,钉 hash 消费,hygiene 同款)
  • 新增 scripts/test-integrity.sh(检测器主体,~290 行 bash,语言无关 regex 级)
  • 新增 scripts/test-integrity-fixtures/(T8:15 case + run.sh)
  • 修改 .github/workflows/ci.yml(selftest job + gate needs)
  • 修改 README.md(工作流表 + 接入说明)

验证清单

  • T8 本地:15/15 PASS(四类篡改 01-04/10/15、正常 05/06/08/09、逃生门 07、fail-closed 11、幽灵 ADR 12、边界 13/14)
  • T8 git 模式冒烟:真实仓 base...head diff(删除→R1 红;纯 rename→绿;rename 出测试路径→R1 红)
  • bash -n 全部脚本;workflow YAML 解析通过(jobs: test-integrity / hygiene+test-integrity-selftest+gate)
  • 动作全钉 SHA(checkout v7.0.1 / harden-runner v2.21.0);permissions 顶层 {} + job 级 contents:read
  • 本 PR gate 绿(hygiene + T8 selftest + adr-required:引用 ADR-0035)
  • T1-T7 fixture PR 级验证:待本 PR 合并后在 Use-up-Plan 接线执行(留待主 agent 合并后)

randypanding added a commit that referenced this pull request Aug 20, 2026
randypanding added a commit that referenced this pull request Aug 20, 2026
randypanding added a commit that referenced this pull request Aug 20, 2026
randypanding added a commit that referenced this pull request Aug 20, 2026
randypanding added a commit that referenced this pull request Aug 20, 2026
randypanding added a commit that referenced this pull request Aug 20, 2026
randypanding added a commit that referenced this pull request Aug 20, 2026
randypanding added a commit that referenced this pull request Aug 20, 2026
randypanding added a commit that referenced this pull request Aug 20, 2026
randypanding added a commit that referenced this pull request Aug 20, 2026
randypanding added a commit that referenced this pull request Aug 20, 2026
randypanding added a commit that referenced this pull request Aug 20, 2026
randypanding added a commit that referenced this pull request Aug 20, 2026
randypanding added a commit that referenced this pull request Aug 20, 2026
randypanding added a commit that referenced this pull request Aug 20, 2026
randypanding added a commit that referenced this pull request Aug 20, 2026
randypanding added a commit that referenced this pull request Aug 20, 2026
randypanding added a commit that referenced this pull request Aug 20, 2026
randypanding added a commit that referenced this pull request Aug 20, 2026
randypanding added a commit that referenced this pull request Aug 20, 2026
randypanding added a commit that referenced this pull request Aug 20, 2026
randypanding added a commit that referenced this pull request Aug 20, 2026
randypanding added a commit that referenced this pull request Aug 20, 2026
randypanding added a commit that referenced this pull request Aug 20, 2026
randypanding added a commit that referenced this pull request Aug 20, 2026
@randypanding

Copy link
Copy Markdown
Contributor Author

#20 替代:原分支与并行落地的 ADR-0037(#16)/ADR-0039 产生文本冲突(mergeable=DIRTY),基于含两者的 main 重建为 feat/test-integrity-p2-1-r2。T8/T1-T7 验证证据在本 PR 与 #44-#50 的运行记录中保留。

randypanding added a commit that referenced this pull request Aug 20, 2026
* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: P2-1 测试篡改检测门(ADR-0035 / .github #86)——基于含 ADR-0037/0039 的 main 重建(替代 #17)

* test-integrity: 检测器钉源回退为 detector-ref 显式输入(workflow_ref 实测返回 caller 自己的 ref——refs/pull/N/merge,不可用于钉源)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants