Skip to content

fix: suppression 门改独立 reusable + dep-review/diff-coverage 钉源改 ciw-ref 输入(ADR-0036 修订/0039/0043,.github #87/#90) - #36

Merged
randypanding merged 1 commit into
mainfrom
fix/v1.5.2-ciw-ref-and-standalone-suppression
Aug 21, 2026
Merged

fix: suppression 门改独立 reusable + dep-review/diff-coverage 钉源改 ciw-ref 输入(ADR-0036 修订/0039/0043,.github #87/#90)#36
randypanding merged 1 commit into
mainfrom
fix/v1.5.2-ciw-ref-and-standalone-suppression

Conversation

@randypanding

Copy link
Copy Markdown
Contributor

摘要

v1.5.1 re-pin 激活(各业务仓 repin/ciw-v1.5.1 PR 系列)实测暴露三个问题,本 PR 一并修复:

1. suppression-budget job 内嵌 check.yml 触发平台 action 解析故障(#87

Use-up-Plan PR#52 实测:check / checkcheck / suppression-budget 双双 Unable to resolve action step-security/harden-runner@05e3...(2-3s 即败,多次 rerun 确定性复现)。二分定位(PR#53=v1.5.0 通过 1m14s、PR#54=v1.3.1 通过 1m24s):job 加进 check.yml 即故障,同内容独立文件无此问题(test-integrity.yml 同构模式全组织在跑)。根因属 GitHub Actions 平台行为,未继续深挖——按实证可行的载体落地。

处置:check.yml 回退到 v1.5.0 内容(flaky-retry/ciw-ref 保留);新增独立 suppression-budget.yml(test-integrity.yml 同构:detector-ref 钉源、执法前 44 断言自测、非 PR 事件 n/a-success、ADR 逃生门)。判定语义与 ADR-0036 原设计一致,分发载体变更记为 ADR-0036 修订(agent-registry 另行 PR)。

2. dep-review.yml 的 workflow_ref 钉源是潜伏 bug(#90

policy/supply-chain job 用 github.workflow_ref 解析「本 workflow 被 caller 钉住的 ref」——但 #21(ADR-0043)已实测该变量在 reusable 上下文解析为 caller 自身的 workflow ref。v1.5.1 激活时实证:policy job 检出的是 caller 仓(Use-up-Plan@repin 分支),找不到判定脚本 → fail-closed exit 2(PR#52)。该 workflow 自 #15 合入以来首次被 caller 消费,bug 即刻暴露。

处置:新增 ciw-ref 输入(40 位 SHA fail-closed 校验,与 caller uses pin 同值),policy/脚本/workflow 三耦合改走显式输入(ADR-0043 教训:reusable 上下文唯一可靠机制)。

3. diff-coverage.yml 同款 workflow_ref 依赖(预防性)

toolref 步骤同款问题(该 workflow 尚无 caller,未被暴露)。同改 ciw-ref。

变更文件

文件 变更
.github/workflows/check.yml 回退 v1.5.0(-88 行 suppression job;flaky-retry/ciw-ref 保留)
.github/workflows/suppression-budget.yml 新增独立 reusable(detector-ref 模式)
.github/workflows/dep-review.yml workflow_ref → ciw-ref 输入(policy + supply-chain 两处消费点)
.github/workflows/diff-coverage.yml toolref → ciw-ref 输入
README.md workflow 清单同步

验证

  • 四个 YAML 解析通过
  • suppression-budget-selftest.sh 44/44(执法前每 PR 自测)
  • CI 本仓全绿
  • 合并后发 v1.5.2 → 更新 7 仓 repin 分支(suppression 改独立 job + gate needs、dep-review 补 ciw-ref)→ PR#52 系列转绿

C1:.github/ 路径,ADR-0036(修订)/0039/0043 既有背书 + 本 PR 记录实证。

… 输入(ADR-0036 修订/0039/0043)

v1.5.1 re-pin 激活实测暴露三问题(.github #87/#90):
1. suppression-budget job 内嵌 check.yml → 整 workflow action 解析故障
   (Unable to resolve harden-runner;v1.5.0 同文件无此 job 正常——Use-up-Plan
   PR#52/#53/#54 二分实证)。改为独立 suppression-budget.yml(test-integrity.yml
   同构模式),判定语义不变(ADR-0036 修订:分发载体变更)。
2. dep-review.yml policy/supply-chain job 用 github.workflow_ref 解析自身 ref——
   #21 已实证该变量在 reusable 上下文=caller 自身 ref,policy job 实际检出
   caller 仓而 fail-closed(Use-up-Plan PR#52 实证 exit 2)。改 ciw-ref 显式
   输入(40 位 SHA fail-closed 校验,= uses pin)。
3. diff-coverage.yml toolref 同款 workflow_ref 依赖——同改 ciw-ref(预防性,
   该 workflow 尚无 caller,未实测暴露)。
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@randypanding, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 22 minutes

Limit details: You’ve used all 10 included reviews currently available.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9d280804-a6c9-4d5d-af9e-47c2e412d6e9

📥 Commits

Reviewing files that changed from the base of the PR and between 4cd3f02 and fb1d5d1.

📒 Files selected for processing (5)
  • .github/workflows/check.yml
  • .github/workflows/dep-review.yml
  • .github/workflows/diff-coverage.yml
  • .github/workflows/suppression-budget.yml
  • README.md

Comment @coderabbitai help to get the list of available commands.

Comment on lines +66 to +75
- name: Checkout 检测器与 policy(CI-Workflows 同 ref,不取 caller 仓内副本)
if: github.event_name == 'pull_request'
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: Cloudbird-Software/CI-Workflows
ref: ${{ inputs.detector-ref }}
path: ciw-sup
persist-credentials: false

- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Fix reusable workflow pinning and split suppression-budget into standalone workflow

🐞 Bug fix ⚙️ Configuration changes 📝 Documentation 🕐 20-40 Minutes

Grey Divider

AI Description

• Move suppression-budget gate out of check.yml into standalone reusable workflow to avoid action
 resolution failures.
• Replace github.workflow_ref pinning with explicit ciw-ref input in dep-review and diff-coverage
 (fail-closed SHA validation).
• Update README workflow catalog to reflect new reusable and required inputs.
Diagram

graph TD
  A("Caller repo") --> B["check.yml"]
  A --> C["suppression-budget.yml"] --> F("CI-Workflows repo")
  A --> D["dep-review.yml"] --> F
  A --> E["diff-coverage.yml"] --> F
  C --> G{{"GitHub Pulls API"}}
  C --> H{{"agent-registry (ADR)"}}

  subgraph Legend
    direction LR
    _r("Repo") ~~~ _w["Reusable workflow"] ~~~ _x{{"External"}}
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Keep suppression-budget embedded in check.yml and workaround platform issue
2. Derive CI-Workflows ref from workflow_ref (status quo) with tighter parsing
3. Package enforcement logic as a composite/action instead of repo checkout
  • ➕ Avoids multi-repo checkout complexity and reduces ref-coupling between workflow/policy/scripts
  • ➕ Potentially clearer versioning for the enforcement logic
  • ➖ Requires larger refactor/release process changes for policy distribution
  • ➖ Still needs a trusted pinning mechanism; does not directly address the platform parsing failure observed for embedded jobs

Recommendation: Proceed with this PR’s approach: splitting suppression-budget into its own reusable is the only demonstrated mitigation for the platform action-resolution failure, and moving pinning to explicit ciw-ref/detector-ref inputs is the only reliable way to guarantee self-checkout in reusable workflows. The added caller inputs are a reasonable tradeoff for deterministic, fail-closed behavior across security gates.

Files changed (5) +153 / -110

Enhancement (1) +123 / -0
suppression-budget.ymlAdd standalone suppression-budget reusable workflow +123/-0

Add standalone suppression-budget reusable workflow

• Creates a new reusable workflow implementing the P2-2 suppression budget gate, including PR-only semantics, harden-runner, dual checkout (caller merge tree + CI-Workflows detector/policy), and a 44-assertion self-test step. Adds explicit detector-ref input to pin the detector/policy source and uses GitHub API + ADR registry checkout to evaluate exemptions.

.github/workflows/suppression-budget.yml

Bug fix (3) +28 / -109
check.ymlRemove embedded suppression-budget job from check reusable +0/-88

Remove embedded suppression-budget job from check reusable

• Drops the previously embedded suppression-budget job from check.yml to avoid GitHub Actions action-resolution failures observed when this job is inlined. Leaves existing check behavior (including ciw-ref/flaky-retry related parts) intact while shifting suppression enforcement to a standalone reusable workflow.

.github/workflows/check.yml

dep-review.ymlAdd ciw-ref input and stop using github.workflow_ref for pinning +14/-11

Add ciw-ref input and stop using github.workflow_ref for pinning

• Introduces a ciw-ref workflow_call input and validates it as a 40-hex SHA (fail-closed). Replaces workflow_ref-derived repo/ref resolution with a fixed CI-Workflows repo plus the explicit ciw-ref for policy/script/workflow atomicity.

.github/workflows/dep-review.yml

diff-coverage.ymlRequire ciw-ref SHA input for tool pinning and checkout +14/-10

Require ciw-ref SHA input for tool pinning and checkout

• Adds a ciw-ref workflow_call input and replaces workflow_ref-based toolref parsing with explicit SHA validation. Ensures the diff-coverage tool checkout uses the same pinned commit as the caller’s uses reference.

.github/workflows/diff-coverage.yml

Documentation (1) +2 / -1
README.mdDocument new suppression-budget reusable and updated check requirements +2/-1

Document new suppression-budget reusable and updated check requirements

• Updates the workflow catalog to remove the claim that suppression-budget is embedded in check.yml, and documents the new suppression-budget.yml reusable. Clarifies required pinning inputs (ciw-ref/detector-ref) for correct consumption.

README.md

@randypanding
randypanding merged commit 370516d into main Aug 21, 2026
12 checks passed
@randypanding
randypanding deleted the fix/v1.5.2-ciw-ref-and-standalone-suppression branch August 21, 2026 05:45
@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (4) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Broken checkout outputs 🐞 Bug ≡ Correctness
Description
In dep-review.yml the policy job removed the repo/ref outputs from step self, but the
subsequent actions/checkout still reads ${{ steps.self.outputs.repo }} and `${{
steps.self.outputs.ref }}`, causing checkout to fail or resolve incorrectly.
Code

.github/workflows/dep-review.yml[L51-52]

-          echo "repo=$repo" >> "$GITHUB_OUTPUT"
-          echo "ref=$ref"  >> "$GITHUB_OUTPUT"
Relevance

●●● Strong

Checkout still references outputs removed from the 'self' step, a clear deterministic bug in the
diff.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The self step now only validates CIW_REF and does not emit any outputs, yet the subsequent
checkout still depends on steps.self.outputs.repo/ref.

.github/workflows/dep-review.yml[46-60]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`dep-review.yml` policy job’s `self` step now only validates `ciw-ref` and no longer writes `repo` / `ref` to `$GITHUB_OUTPUT`, but the following checkout still references `steps.self.outputs.repo/ref`.

## Issue Context
This will break `policy` job deterministically (checkout receives empty outputs), preventing policy parsing and breaking downstream jobs that rely on policy outputs.

## Fix Focus Areas
- .github/workflows/dep-review.yml[42-61]

## Suggested change
Either:
1) Update the checkout step to use the fixed repo and the validated input:
- `repository: Cloudbird-Software/CI-Workflows`
- `ref: ${{ inputs.ciw-ref }}`

OR
2) Restore writing `repo` and `ref` outputs in step `self` (and keep the checkout referencing those outputs).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Unpinned detector-ref allowed 🐞 Bug ⛨ Security
Description
suppression-budget.yml claims detector-ref must be a 40-hex commit SHA, but the guard only
checks non-empty, allowing branch/tag refs that defeat the intended pinning of detector/policy to an
immutable revision.
Code

.github/workflows/suppression-budget.yml[R61-64]

+        run: |
+          set -eu
+          [ -n "$DETECTOR_REF" ] || { echo "::error::suppression-budget detector-ref 输入为空——检测器来源未钉(ADR-0036 fail-closed)"; exit 1; }
+          echo "检测器来源 = CI-Workflows@$DETECTOR_REF(须与 uses: 的 pin 同值)"
Relevance

●●● Strong

Guard only checks non-empty despite documented 40-hex SHA requirement; matches accepted ciw-ref SHA
validation precedent.

PR-#32

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The input comment/documentation says detector-ref is a CI-Workflows commit SHA and must match the
caller pin, but the implemented guard only checks [ -n "$DETECTOR_REF" ].

.github/workflows/suppression-budget.yml[24-31]
.github/workflows/suppression-budget.yml[57-65]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`suppression-budget.yml`’s `detector-ref` input is intended to be a pinned 40-hex commit SHA, but the workflow only checks that it’s non-empty.

## Issue Context
Allowing non-SHA refs (branches/tags) undermines the “tool/policy/workflow are pinned together” guarantee and can allow drift or intentional weakening by changing the ref.

## Fix Focus Areas
- .github/workflows/suppression-budget.yml[24-74]

## Suggested change
Replace the non-empty check with a strict SHA check, consistent with other workflows:
```bash
if ! [[ "$DETECTOR_REF" =~ ^[0-9a-f]{40}$ ]]; then
 echo "::error::detector-ref must be a 40-hex SHA"; exit 1
fi
```
(Optionally also require it to equal the caller’s `uses:` pin if you can pass that value explicitly.)

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

3. Harden-runner pin inconsistent 🐞 Bug ⛨ Security
Description
suppression-budget.yml pins step-security/harden-runner to a different commit hash than other
workflows (and commonly-used v2.21.0 pin), risking action resolution failures or running an
unintended revision.
Code

.github/workflows/suppression-budget.yml[R45-48]

+      - name: Harden Runner (egress audit)
+        if: github.event_name == 'pull_request'
+        uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85b0992719546e2c # v2.21.0
+        with:
Relevance

●●● Strong

Inconsistent harden-runner pin vs other workflows looks like a typo; similar pin-consistency issues
get flagged/fixed.

PR-#32

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The new suppression-budget workflow pins harden-runner to ...85b099... while
dep-review/diff-coverage pin ...85d099...; external references commonly show v2.21.0 pinned to the
...85d099... SHA.

.github/workflows/suppression-budget.yml[45-50]
.github/workflows/dep-review.yml[42-45]
.github/workflows/diff-coverage.yml[59-62]
🌐 Shows step-security/harden-runner v2.21.0 pinned as @05e31511f85b41b11d1cf0ef85d0992719546e2c in multiple workflows.

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Workflows in this repo pin `step-security/harden-runner` to differing commit SHAs while claiming the same version (v2.21.0).

## Issue Context
Inconsistent pins can:
- break workflow execution if a SHA is invalid/unreachable,
- or silently run a different revision than intended.

## Fix Focus Areas
- .github/workflows/suppression-budget.yml[45-50]
- .github/workflows/dep-review.yml[42-45]
- .github/workflows/diff-coverage.yml[59-62]

## Suggested change
Verify the correct commit SHA for v2.21.0 (or whichever version you intend) and update all workflows to use the same validated SHA + matching comment.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


4. README omits new inputs 🐞 Bug ⚙ Maintainability
Description
dep-review.yml and diff-coverage.yml now require a ciw-ref input (empty defaults fail-closed),
but the README workflow table does not document this, likely causing callers to omit it and break
pipelines unexpectedly.
Code

.github/workflows/dep-review.yml[R9-11]

+      ciw-ref:
+        type: string
+        default: ''
Relevance

●●● Strong

README omits new required input; docs sync findings for this repo are consistently accepted.

PR-#5

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Both workflows define the new ciw-ref input and validate it as a 40-hex SHA, but the README table
doesn’t mention ciw-ref for either workflow.

.github/workflows/dep-review.yml[1-11]
.github/workflows/diff-coverage.yml[20-29]
README.md[9-16]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The reusable workflows `dep-review.yml` and `diff-coverage.yml` now define a `ciw-ref` input that must be provided (empty default will fail validation), but the README’s workflow table doesn’t mention this requirement.

## Issue Context
Callers following README guidance may omit `ciw-ref` and experience fail-closed errors.

## Fix Focus Areas
- README.md[9-18]
- .github/workflows/dep-review.yml[2-12]
- .github/workflows/diff-coverage.yml[20-33]

## Suggested change
Update the README rows for `dep-review.yml` and `diff-coverage.yml` to explicitly state `ciw-ref` is required (= caller `uses:` pin SHA), similar to the `check.yml` row.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
✅ Web pages:
  +6 more
Review mode: ⚖️ Balanced: Downgraded extended -> standard: change is below the extended eligibility bar (hunks 8/18, lines 263/200; both must reach the floor). Router rationale: This changes multiple reusable GitHub Actions workflows, introduces a substantial new security-sensitive suppression gate, and alters cross-workflow pin/input contracts across several independent paths where subtle integration defects are easy to miss.

Grey Divider

Tip of the day
💡 Did you know, you can tweak Display preferences with a live preview to see your comment before it ships

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment on lines -51 to -52
echo "repo=$repo" >> "$GITHUB_OUTPUT"
echo "ref=$ref" >> "$GITHUB_OUTPUT"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Broken checkout outputs 🐞 Bug ≡ Correctness

In dep-review.yml the policy job removed the repo/ref outputs from step self, but the
subsequent actions/checkout still reads ${{ steps.self.outputs.repo }} and `${{
steps.self.outputs.ref }}`, causing checkout to fail or resolve incorrectly.
Agent Prompt
## Issue description
`dep-review.yml` policy job’s `self` step now only validates `ciw-ref` and no longer writes `repo` / `ref` to `$GITHUB_OUTPUT`, but the following checkout still references `steps.self.outputs.repo/ref`.

## Issue Context
This will break `policy` job deterministically (checkout receives empty outputs), preventing policy parsing and breaking downstream jobs that rely on policy outputs.

## Fix Focus Areas
- .github/workflows/dep-review.yml[42-61]

## Suggested change
Either:
1) Update the checkout step to use the fixed repo and the validated input:
- `repository: Cloudbird-Software/CI-Workflows`
- `ref: ${{ inputs.ciw-ref }}`

OR
2) Restore writing `repo` and `ref` outputs in step `self` (and keep the checkout referencing those outputs).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +61 to +64
run: |
set -eu
[ -n "$DETECTOR_REF" ] || { echo "::error::suppression-budget detector-ref 输入为空——检测器来源未钉(ADR-0036 fail-closed)"; exit 1; }
echo "检测器来源 = CI-Workflows@$DETECTOR_REF(须与 uses: 的 pin 同值)"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

2. Unpinned detector-ref allowed 🐞 Bug ⛨ Security

suppression-budget.yml claims detector-ref must be a 40-hex commit SHA, but the guard only
checks non-empty, allowing branch/tag refs that defeat the intended pinning of detector/policy to an
immutable revision.
Agent Prompt
## Issue description
`suppression-budget.yml`’s `detector-ref` input is intended to be a pinned 40-hex commit SHA, but the workflow only checks that it’s non-empty.

## Issue Context
Allowing non-SHA refs (branches/tags) undermines the “tool/policy/workflow are pinned together” guarantee and can allow drift or intentional weakening by changing the ref.

## Fix Focus Areas
- .github/workflows/suppression-budget.yml[24-74]

## Suggested change
Replace the non-empty check with a strict SHA check, consistent with other workflows:
```bash
if ! [[ "$DETECTOR_REF" =~ ^[0-9a-f]{40}$ ]]; then
  echo "::error::detector-ref must be a 40-hex SHA"; exit 1
fi
```
(Optionally also require it to equal the caller’s `uses:` pin if you can pass that value explicitly.)

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +45 to +48
- name: Harden Runner (egress audit)
if: github.event_name == 'pull_request'
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85b0992719546e2c # v2.21.0
with:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

3. Harden-runner pin inconsistent 🐞 Bug ⛨ Security

suppression-budget.yml pins step-security/harden-runner to a different commit hash than other
workflows (and commonly-used v2.21.0 pin), risking action resolution failures or running an
unintended revision.
Agent Prompt
## Issue description
Workflows in this repo pin `step-security/harden-runner` to differing commit SHAs while claiming the same version (v2.21.0).

## Issue Context
Inconsistent pins can:
- break workflow execution if a SHA is invalid/unreachable,
- or silently run a different revision than intended.

## Fix Focus Areas
- .github/workflows/suppression-budget.yml[45-50]
- .github/workflows/dep-review.yml[42-45]
- .github/workflows/diff-coverage.yml[59-62]

## Suggested change
Verify the correct commit SHA for v2.21.0 (or whichever version you intend) and update all workflows to use the same validated SHA + matching comment.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +9 to +11
ciw-ref:
type: string
default: ''

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

4. Readme omits new inputs 🐞 Bug ⚙ Maintainability

dep-review.yml and diff-coverage.yml now require a ciw-ref input (empty defaults fail-closed),
but the README workflow table does not document this, likely causing callers to omit it and break
pipelines unexpectedly.
Agent Prompt
## Issue description
The reusable workflows `dep-review.yml` and `diff-coverage.yml` now define a `ciw-ref` input that must be provided (empty default will fail validation), but the README’s workflow table doesn’t mention this requirement.

## Issue Context
Callers following README guidance may omit `ciw-ref` and experience fail-closed errors.

## Fix Focus Areas
- README.md[9-18]
- .github/workflows/dep-review.yml[2-12]
- .github/workflows/diff-coverage.yml[20-33]

## Suggested change
Update the README rows for `dep-review.yml` and `diff-coverage.yml` to explicitly state `ciw-ref` is required (= caller `uses:` pin SHA), similar to the `check.yml` row.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

randypanding added a commit that referenced this pull request Aug 26, 2026
对近一周(#21..#124)全部 PR 复盘后的机械债清理:仅删除 AST 级验证
「全仓零引用」的未用导入/未用名,不改任何判定逻辑、阈值、白名单或
policy 数据。逐文件出处:

- pipeline/adversary/cnb_bridge.py:删未用 `from typing import Any`(#73/#74)
- pipeline/adversary/golden_set.py:删未用 `from typing import Any`(#80/#82/#83)
- pipeline/adversary/holdout_registry.py:删未用 `from typing import Any`(#81/#82)
- pipeline/adversary/e2e/e2e-runner.py:删未用 `from typing import Any`(#89)
- pipeline/adversary/llm_verifier.py:删未用 `import math`;可选库导入行去掉
  未用名 extract_score(call_verifier/create_openai_client 均在用,保留)(#72/#76)
- pipeline/entropy/tests/test_e2e.py:删未用 `import sys`(#56)
- pipeline/selftest-c/tests/test_registry.py:删未用 `import copy`(#103)
- pipeline/trust-gate/tests/test_adjudicate.py:删未用 `import copy`(#63)
- pipeline/trust-gate/tests/test_cli.py:from-import 去掉未用名
  PREDICATES/UNLOCK_STATE(保留 trust_gate 可导入性冒烟导入与 noqa 惯例)(#63)
- scripts/dep-supply-chain-check.py:删未用 `import copy`(#36/#43)

刻意不动(已核验非死代码):各模块 `from __future__ import annotations`;
fuzz/sast/symbolic 的 `_yamlmini` 双模式导入守卫(noqa F401,保证包路径);
golden_set 等 try-import yaml 的环境 fail-closed 守卫;org-gate /
suppression-gate / adversary-gate 等关卡 workflow 与 policy/suppressions.yaml
基线数据——门语义一概不变。

验证:
- py_compile 全部 scripts/pipeline *.py 通过;bash -n 全部 *.sh 通过
- workflows/policy/pipeline 共 62 个 YAML 解析通过
- scripts/test-integrity-fixtures/run.sh、scripts/suppression-budget-selftest.sh 通过
- python -m unittest:trust-gate test_adjudicate+test_cli 17 例、
  selftest-c tests.test_registry 14 例、entropy tests.test_e2e 10 例——全绿

Co-authored-by: randypanding <randypanding@users.noreply.github.com>
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