Skip to content

feat(ISSUE-263): W3-C4 CNB dispatch 通道与 fallback (#280) - #74

Merged
cloudbrid-agent[bot] merged 1 commit into
mainfrom
feat/issue263-w3-c4
Aug 23, 2026
Merged

feat(ISSUE-263): W3-C4 CNB dispatch 通道与 fallback (#280)#74
cloudbrid-agent[bot] merged 1 commit into
mainfrom
feat/issue263-w3-c4

Conversation

@cloudbrid-agent

Copy link
Copy Markdown
Contributor

关联卡片:Cloudbird-Software/.github#280
父意图/验收规范:Cloudbird-Software/.github#263 | Spec: specs/ISSUE-263/spec.md v5

变更内容

  1. pipeline/adversary/cnb_bridge.py — CNB dispatch 通道 + canary + fallback 链
    • CNB_TOKEN org secret 注入,canary 先行(30–60s echo 任务验证云端存活后再派真实任务)
    • 凭据审计:CNB 沙箱零 GitHub 凭据(INV-02 / AC-6),派发前扫描 payload,发现 ghp_/gho_/x-access-token:ghs_ 等凭据形状即拒绝(fail-closed)
    • 窗口抢占 / 投递 / 轮询 / 收集(CNBBridge.dispatch + poll
    • fallback 链:CNB → 自有 API(ADR-0048 直连 provider)→ no-attempts
    • 连续 3 次 fallback 或 CNB 额度尽 → 自动开 type:infra issue 报人
    • no-attempts → 锁 needs-human + 自动开 issue,不产出判定
    • 与 W3-C1 adversary workflow 调用接口兼容(输入 --issue/--spec-path/--card-id,输出 cnb-bridge-report/v1 JSON 元数据)

Closes Cloudbird-Software/.github#280

- pipeline/adversary/cnb_bridge.py:CNB dispatch 通道 + canary + fallback 链
  - CNB_TOKEN org secret 注入;canary 先行(30-60s echo 任务)
  - 窗口抢占/投递/轮询/收集;fallback 链 CNB→自有 API→no-attempts
  - 连续 3 次 fallback 或额度尽 → 自动开 type:infra issue
  - 凭据面扫描(INV-06 负向断言:沙箱内零 GitHub 凭据)
  - 输出 schema=cnb-bridge-report/v1,与 W3-C1 adversary 接口兼容

Closes Cloudbird-Software/.github#280
@cloudbrid-agent
cloudbrid-agent Bot force-pushed the feat/issue263-w3-c4 branch from ec0594c to cfdf60a Compare August 23, 2026 08:53
@cloudbrid-agent
cloudbrid-agent Bot merged commit 827f1ea into main Aug 23, 2026
21 checks passed
@cloudbrid-agent
cloudbrid-agent Bot deleted the feat/issue263-w3-c4 branch August 23, 2026 08:55
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.

W3-C4: CNB dispatch 通道 + canary + fallback 链

0 participants