Skip to content

feat(ISSUE-263): W5-C2 端到端实跑材料与本地模拟 (#287) - #89

Merged
randypanding merged 1 commit into
mainfrom
w5-c2-e2e
Aug 23, 2026
Merged

feat(ISSUE-263): W5-C2 端到端实跑材料与本地模拟 (#287)#89
randypanding merged 1 commit into
mainfrom
w5-c2-e2e

Conversation

@cloudbrid-agent

Copy link
Copy Markdown
Contributor

W5-C2 端到端实跑材料与本地模拟(.github#287 / AC-20/AC-4/AC-14/AC-12)

本 PR 为 Cloudbird-Software/.github#287 提交端到端实跑测试材料 + 本地机械模拟脚本,作为 pipeline/adversary/e2e/ fixture 目录落档。

Closes Cloudbird-Software/.github#287

新增文件

  • pipeline/adversary/e2e/e2e_runner.py — 本地端到端状态机模拟器(7 场景矩阵:Veto→修复→survived 闭环 + 反向断言)
  • pipeline/adversary/e2e/e2e_test_plan.md — 端到端测试计划(每步验证点 + 预期结果)
  • pipeline/adversary/e2e/verification_checklist.md — 验收证据清单模板
  • pipeline/adversary/e2e/fixtures/e2e/deliberately-bad-spec/ — 故意极差 spec fixture(全零聚合分,构造独立于判定脚本,与 W5-C1 golden-known-bad-01 同构)→ 用于触发真实 insufficient (Veto)
  • pipeline/adversary/e2e/fixtures/e2e/fixed-spec/ — 修复后 spec(回应 Veto 理由,含真实 AC 语义测试)
  • pipeline/adversary/e2e/fixtures/e2e/_expected/veto-fix-loop.json — Veto 理由↔修复 diff 机械闭环映射
  • pipeline/adversary/e2e/fixtures/_transitions.yaml — 锁定的 transitions.yaml 副本(供模拟器离线运行)

本地模拟验证结果

S1 故意极差 spec → insufficient → needs-human (Veto)           PASS
S2 修复后 spec → survived → wave-planned                       PASS
S3 完整闭环 Veto→修复→survived→wave-planned→认领→合并            PASS
S4 负向对照: 无 Veto 全程不算数 (AC-2 硬谓词)                     PASS
S5 suite 未就绪 → T5 拒转 (fail-closed)                         PASS
S6 needs-human 不可直跳 wave-planned (AC-12)                    PASS
S7 跨卡三元组 → T6 拒转 (fail-closed)                           PASS
7/7 场景通过 ✓

⚠️ 真正端到端实跑所需前置(本 PR 不触发 GitHub Actions 全流程)

以下条件齐备后,用同一套 fixture 触发真实 GitHub Actions 全流程并回填 verification_checklist.md 证据:

  1. cloudbrid-agent App 需获得 workflows 权限 — 当前无此权限,无法上游推送 adversary.yml / adversary-gate.yml / conductor.yml,因此端到端实跑无法真正触发 GitHub Actions 全流程;
  2. 验证者 APP 需创建expected-state.jsonverifier_app.id=null,holdout 注册/校验的身份面无法落位;
  3. 推送 workflow 文件 → 确认 adversary-gate 正常运行 → 按安全顺序合并 PR #309 / #310(详见 .github PR 描述);
  4. LLM provider endpoint + LLM_API_KEY org secret 就位(真实 adversary 运行需 LLM 凭据;本地模拟用 golden set native 模式免 LLM)。

部署顺序约束(PR #309/#310 已警告):① 推送 workflow 文件 → ② 确认 adversary-gate 正常运行 → ③ 合并 #309/#310。逆序将致全组织 PR 被阻断。

@randypanding randypanding left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Owner approve: W5-C2 端到端实跑材料已就绪

@randypanding
randypanding merged commit 0b149d2 into main Aug 23, 2026
21 checks passed
@randypanding
randypanding deleted the w5-c2-e2e branch August 23, 2026 12:21
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.

W5-C2: 端到端实跑(真实卡全程 + 一次真实 Veto + 人类签收抽检)

1 participant