fix: re-pin 激活暴露的两个真 bug——policy job checkout 空输出检出 caller 仓 + flaky-retry 注释数字混入(.github #90/#94) - #43
Conversation
…已随钉源改版移除,空值导致检出 caller 仓)
…3' 算术崩溃 TOTAL unbound——self-test 走 inline 分支从未覆盖 curl 分支)
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughChanges本次变更固定 CI 行为更新
Suggested labels: Merge Risk: ⚪ Minimal · up to This localized change corrects repository checkout selection and retry-policy parsing; no actionable merge-blocking risk remains beyond normal checks. 🚥 Pre-merge checks | ✅ 1 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (1 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
PR Summary by QodoFix dep-review policy checkout pin and flaky-retry retry_max parsing
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1. Non-portable grep whitespace
|
对近一周(#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>
摘要
v1.5.5 re-pin 系列(Use-up-Plan PR#52 等 7 仓)在 harden-runner SHA 手误修复后跑到运行时,暴露两个此前从未被消费所以从未被测试的 bug:
1. dep-review.yml policy job 检出 caller 仓(#90)
policyjob 的 checkout 步骤仍引用${{ steps.self.outputs.repo }}/.ref——该输出在 v1.5.3 钉源改版(workflow_ref→ciw-ref)时已随旧解析步骤移除 → 空值 → actions/checkout 落缺省(caller 仓 + PR merge ref)→can't open file .../ci-workflows/scripts/dep-supply-chain-check.py→ fail-closed exit 2(日志实锤:git remote add origin https://github.com/Cloudbird-Software/Use-up-Plan)。修复:checkout 直取
repository: Cloudbird-Software/CI-Workflows+ref: ${{ inputs.ciw-ref }}(与 job outputs 同源)。2. flaky-retry.sh policy 提取把注释数字混入(#94)
retry_max: 2 # 自动重试上限(总运行 ≤3)行——grep -oE '[0-9]+'取出2 3两个数 →RETRY_MAX='2 3'→TOTAL=...算术崩溃 →TOTAL: unbound variable(Use-up-Plan check job 日志实锤)。self-test 走 FLAKY_POLICY_INLINE 分支,从未覆盖 curl+sed 分支。修复:提取前
sed 's/#.*//'剥注释。验证
3')
C1:.github/ 与 scripts/ 路径,ADR-0039/0043 域。
Summary by CodeRabbit