Skip to content

Commit b64077b

Browse files
authored
Merge pull request #1 from Saitamasans/fix/v0.1.1-safety-correctness
fix: harden v0.1.1 execution safety and release
2 parents 8e855ae + 47cecbe commit b64077b

55 files changed

Lines changed: 3268 additions & 688 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ jobs:
1414
- uses: actions/checkout@v4
1515
- uses: actions/setup-python@v5
1616
with: {python-version: "3.11", cache: pip}
17-
- run: python -m pip install -e ".[dev]"
17+
- run: python -m pip install --require-hashes -r requirements.lock
18+
- run: python -m pip install --no-deps --no-build-isolation .
1819
- run: ruff format --check .
1920
- run: ruff check .
2021
- run: python -m pytest tests/unit -q
@@ -33,7 +34,8 @@ jobs:
3334
- uses: actions/checkout@v4
3435
- uses: actions/setup-python@v5
3536
with: {python-version: "${{ matrix.python }}", cache: pip}
36-
- run: python -m pip install -e ".[dev]"
37+
- run: python -m pip install --require-hashes -r requirements.lock
38+
- run: python -m pip install --no-deps --no-build-isolation .
3739
- run: python -m pytest -q
3840
- run: python -m multi_api_executor.cli --help
3941
- run: python -m multi_api_executor.cli version
@@ -56,7 +58,8 @@ jobs:
5658
- uses: actions/checkout@v4
5759
- uses: actions/setup-python@v5
5860
with: {python-version: "3.12", cache: pip}
59-
- run: python -m pip install -e ".[dev,database-postgresql]"
61+
- run: python -m pip install --require-hashes -r requirements.lock
62+
- run: python -m pip install --no-deps --no-build-isolation .
6063
- run: python -m pytest tests/integration/test_external_database_adapters.py tests/integration/test_database_checks.py -q
6164
env:
6265
TEST_POSTGRES_URL: postgresql+psycopg://postgres:test@127.0.0.1:5432/executor
@@ -75,7 +78,8 @@ jobs:
7578
- uses: actions/checkout@v4
7679
- uses: actions/setup-python@v5
7780
with: {python-version: "3.12", cache: pip}
78-
- run: python -m pip install -e ".[dev,database-mysql]"
81+
- run: python -m pip install --require-hashes -r requirements.lock
82+
- run: python -m pip install --no-deps --no-build-isolation .
7983
- run: python -m pytest tests/integration/test_external_database_adapters.py tests/integration/test_database_checks.py -q
8084
env:
8185
TEST_MYSQL_URL: mysql+pymysql://root:test@127.0.0.1:3306/executor
@@ -86,7 +90,8 @@ jobs:
8690
- uses: actions/checkout@v4
8791
- uses: actions/setup-python@v5
8892
with: {python-version: "3.12", cache: pip}
89-
- run: python -m pip install -e ".[dev]"
93+
- run: python -m pip install --require-hashes -r requirements.lock
94+
- run: python -m pip install --no-deps --no-build-isolation .
9095
- run: python -m pytest --cov=multi_api_executor --cov-branch --cov-report=xml:coverage.xml --cov-report=html:htmlcov -q
9196
- uses: actions/upload-artifact@v4
9297
with: {name: coverage-report, path: "coverage.xml\nhtmlcov"}
@@ -97,14 +102,15 @@ jobs:
97102
- uses: actions/checkout@v4
98103
- uses: actions/setup-python@v5
99104
with: {python-version: "3.11", cache: pip}
100-
- run: python -m pip install -e ".[dev]" build pyinstaller
101-
- run: python -m build
102-
- run: python -m pip download --dest wheelhouse .
105+
- run: python -m pip install --require-hashes -r requirements.lock
106+
- run: python -m pip install --no-deps --no-build-isolation .
107+
- run: python -m build --no-isolation
108+
- run: python -m pip download --require-hashes --dest wheelhouse -r requirements-runtime.lock
103109
- run: python scripts/build_binary.py
104110
- run: python scripts/generate_supply_chain_docs.py
105111
- run: python scripts/build_skill_bundle.py --platform windows-x64
106112
- run: python scripts/verify_checksums.py build/release/SHA256SUMS.txt build/release
107-
- run: powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/ci_bundle_smoke.ps1 -BundleZip build/release/multi-api-test-executor-0.1.0-windows-x64.zip
113+
- run: powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/ci_bundle_smoke.ps1 -BundleZip build/release/multi-api-test-executor-0.1.1-windows-x64.zip
108114
- uses: actions/upload-artifact@v4
109115
with: {name: bundle-windows-x64, path: build/release/*}
110116

@@ -114,14 +120,15 @@ jobs:
114120
- uses: actions/checkout@v4
115121
- uses: actions/setup-python@v5
116122
with: {python-version: "3.11", cache: pip}
117-
- run: python -m pip install -e ".[dev]" build pyinstaller
118-
- run: python -m build
119-
- run: python -m pip download --dest wheelhouse .
123+
- run: python -m pip install --require-hashes -r requirements.lock
124+
- run: python -m pip install --no-deps --no-build-isolation .
125+
- run: python -m build --no-isolation
126+
- run: python -m pip download --require-hashes --dest wheelhouse -r requirements-runtime.lock
120127
- run: python scripts/build_binary.py
121128
- run: python scripts/generate_supply_chain_docs.py
122129
- run: python scripts/build_skill_bundle.py --platform linux-x64
123130
- run: python scripts/verify_checksums.py build/release/SHA256SUMS.txt build/release
124-
- run: sh scripts/ci_bundle_smoke.sh build/release/multi-api-test-executor-0.1.0-linux-x64.zip
131+
- run: sh scripts/ci_bundle_smoke.sh build/release/multi-api-test-executor-0.1.1-linux-x64.zip
125132
- uses: actions/upload-artifact@v4
126133
with: {name: bundle-linux-x64, path: build/release/*}
127134

@@ -131,13 +138,14 @@ jobs:
131138
- uses: actions/checkout@v4
132139
- uses: actions/setup-python@v5
133140
with: {python-version: "3.11", cache: pip}
134-
- run: python -m pip install -e ".[dev]" build pyinstaller
135-
- run: python -m build
136-
- run: python -m pip download --dest wheelhouse .
141+
- run: python -m pip install --require-hashes -r requirements.lock
142+
- run: python -m pip install --no-deps --no-build-isolation .
143+
- run: python -m build --no-isolation
144+
- run: python -m pip download --require-hashes --dest wheelhouse -r requirements-runtime.lock
137145
- run: python scripts/build_binary.py
138146
- run: python scripts/generate_supply_chain_docs.py
139147
- run: python scripts/build_skill_bundle.py --platform macos-x64
140148
- run: python scripts/verify_checksums.py build/release/SHA256SUMS.txt build/release
141-
- run: sh scripts/ci_bundle_smoke.sh build/release/multi-api-test-executor-0.1.0-macos-x64.zip
149+
- run: sh scripts/ci_bundle_smoke.sh build/release/multi-api-test-executor-0.1.1-macos-x64.zip
142150
- uses: actions/upload-artifact@v4
143151
with: {name: bundle-macos-x64, path: build/release/*}

.github/workflows/release-verification.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ jobs:
1818
- uses: actions/checkout@v4
1919
- uses: actions/setup-python@v5
2020
with: {python-version: "3.11", cache: pip}
21-
- run: python -m pip install -e ".[dev]"
21+
- run: python -m pip install --require-hashes -r requirements.lock
22+
- run: python -m pip install --no-deps --no-build-isolation .
2223
- name: Download and verify published assets
2324
shell: powershell
2425
env:
@@ -33,4 +34,3 @@ jobs:
3334
with:
3435
name: release-verification-${{ inputs.tag }}
3536
path: ${{ runner.temp }}/release-verification-${{ github.run_id }}/release-verification.json
36-

.github/workflows/release.yml

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: Release
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: Existing v0.1.1 tag to build
8+
required: true
9+
type: string
510
push:
611
tags: ["v*"]
712

@@ -13,16 +18,24 @@ jobs:
1318
runs-on: ubuntu-latest
1419
steps:
1520
- uses: actions/checkout@v4
21+
with:
22+
ref: ${{ inputs.tag || github.ref_name }}
23+
fetch-depth: 0
1624
- uses: actions/setup-python@v5
1725
with: {python-version: "3.11", cache: pip}
18-
- run: python -m pip install -e ".[dev]" build
26+
- name: Verify checkout equals release tag
27+
env:
28+
RELEASE_TAG: ${{ inputs.tag || github.ref_name }}
29+
run: test "$(git rev-parse HEAD)" = "$(git rev-list -n 1 "$RELEASE_TAG")"
30+
- run: python -m pip install --require-hashes -r requirements.lock
31+
- run: python -m pip install --no-deps --no-build-isolation .
1932
- run: ruff format --check .
2033
- run: ruff check .
2134
- run: python -m pytest tests/unit -q
2235
- run: python scripts/validate_schemas.py
2336
- run: python scripts/validate_skill.py .
2437
- run: python scripts/security_scan.py .
25-
- run: python -m build
38+
- run: python -m build --no-isolation
2639
- run: python scripts/generate_supply_chain_docs.py
2740
- name: Stage flat source assets
2841
run: |
@@ -47,20 +60,29 @@ jobs:
4760
runs-on: ${{ matrix.os }}
4861
steps:
4962
- uses: actions/checkout@v4
63+
with:
64+
ref: ${{ inputs.tag || github.ref_name }}
65+
fetch-depth: 0
5066
- uses: actions/setup-python@v5
5167
with: {python-version: "3.11", cache: pip}
52-
- run: python -m pip install -e ".[dev]" build pyinstaller
53-
- run: python -m build
54-
- run: python -m pip download --dest wheelhouse .
68+
- name: Verify checkout equals release tag
69+
shell: bash
70+
env:
71+
RELEASE_TAG: ${{ inputs.tag || github.ref_name }}
72+
run: test "$(git rev-parse HEAD)" = "$(git rev-list -n 1 "$RELEASE_TAG")"
73+
- run: python -m pip install --require-hashes -r requirements.lock
74+
- run: python -m pip install --no-deps --no-build-isolation .
75+
- run: python -m build --no-isolation
76+
- run: python -m pip download --require-hashes --dest wheelhouse -r requirements-runtime.lock
5577
- run: python scripts/build_binary.py
5678
- run: python scripts/generate_supply_chain_docs.py
5779
- run: python scripts/build_skill_bundle.py --platform ${{ matrix.platform }}
5880
- run: python scripts/verify_checksums.py build/release/SHA256SUMS.txt build/release
5981
- if: runner.os == 'Windows'
60-
run: powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/ci_bundle_smoke.ps1 -BundleZip build/release/multi-api-test-executor-0.1.0-${{ matrix.platform }}.zip
82+
run: powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/ci_bundle_smoke.ps1 -BundleZip build/release/multi-api-test-executor-0.1.1-${{ matrix.platform }}.zip
6183
- if: runner.os != 'Windows'
62-
run: sh scripts/ci_bundle_smoke.sh build/release/multi-api-test-executor-0.1.0-${{ matrix.platform }}.zip
63-
- run: python scripts/package_release_asset.py --bundle build/release/multi-api-test-executor-0.1.0-${{ matrix.platform }}.zip --platform ${{ matrix.platform }} --tag ${{ github.ref_name }}
84+
run: sh scripts/ci_bundle_smoke.sh build/release/multi-api-test-executor-0.1.1-${{ matrix.platform }}.zip
85+
- run: python scripts/package_release_asset.py --bundle build/release/multi-api-test-executor-0.1.1-${{ matrix.platform }}.zip --platform ${{ matrix.platform }} --tag ${{ inputs.tag || github.ref_name }}
6486
- uses: actions/upload-artifact@v4
6587
with:
6688
name: release-${{ matrix.platform }}
@@ -74,9 +96,11 @@ jobs:
7496
contents: write
7597
steps:
7698
- uses: actions/checkout@v4
99+
with:
100+
ref: ${{ inputs.tag || github.ref_name }}
77101
- uses: actions/download-artifact@v4
78102
with: {path: artifacts, merge-multiple: true}
79-
- run: python scripts/validate_release_assets.py artifacts --tag ${{ github.ref_name }}
103+
- run: python scripts/validate_release_assets.py artifacts --tag ${{ inputs.tag || github.ref_name }}
80104
- name: Write aggregate checksums
81105
run: |
82106
python - <<'PY'
@@ -92,6 +116,6 @@ jobs:
92116
- uses: softprops/action-gh-release@v2
93117
with:
94118
files: artifacts/*
95-
body_path: docs/release-notes-v0.1.0.md
96-
prerelease: ${{ contains(github.ref_name, '-') }}
119+
body_path: docs/release-notes-v0.1.1.md
120+
prerelease: ${{ contains(inputs.tag || github.ref_name, '-') }}
97121
fail_on_unmatched_files: true

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## 0.1.1 - 2026-07-21
4+
5+
- Made empty and HTTP-only assertions `assertion_unknown`, stopped dependencies by default, and made auto-generated skeletons preview-only.
6+
- Added conservative multilingual risk classification, final-host DNS protection, runtime/evidence variable separation, structural URL/Cookie redaction, and default-deny uploads.
7+
- Added Markdown CLI import, structured Excel manual conversion, copy-only `multi-api backfill`, default PostgreSQL/MySQL drivers, and Windows Python 3.11-3.13 discovery.
8+
- Locked Release dependencies and expanded Bundle manifests, offline driver imports, documentation limits, and RC verification.
9+
310
## 0.1.0 RC - 2026-07-21
411

512
- Added real read-only SQLite checks with PostgreSQL/MySQL adapters, limits, assertions, and redacted evidence.

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
[![CI](https://github.com/Saitamasans/skill-multi-api-test-executor/actions/workflows/ci.yml/badge.svg)](https://github.com/Saitamasans/skill-multi-api-test-executor/actions/workflows/ci.yml)
44

5-
> 第十个 Skill|多接口自动化执行与证据回填
5+
> 第十个 Skill|ATIR 多接口执行与证据回填
66
7-
从接口文档出发,自动生成并真实执行多接口业务链路,完成动态参数传递、确定性断言、证据保存和结果回填。
7+
执行人工、项目 Pack 或 Skill 生成的 ATIR 多接口工作流,完成动态参数传递、确定性断言、证据保存和结果回填。v0.1.1 的确定性 compile 主要生成单接口骨架;不能仅凭 OpenAPI 自动可靠生成完整业务链路,登录识别、动态依赖以及 token/order_id 链路仍需项目规则或人工确认
88

99
## 它解决什么问题
1010

@@ -39,14 +39,14 @@ LLM 可以分析非结构化资料并提出候选规则;它不发送请求、
3939
|---|---|---|
4040
| L1 | 接口文档 | 路径/参数/结构、连通性、明确 HTTP 状态与 Schema;不编造业务码 |
4141
| L2 | L1 + 需求 | 主流程、边界、权限、状态与有来源业务断言;冲突标记 |
42-
| L3 | L2 + 环境/账号/成功样例 | 自动登录、动态变量、多接口真实执行与证据 |
42+
| L3 | L2 + 环境/账号/成功样例 | 执行已确认的登录、动态变量与多接口工作流并保存证据 |
4343
| L4 | L3 + 源码/数据库/产品确认 | 只读数据库、状态/副作用/幂等与更高可信断言 |
4444

45-
当前确定性输入支持 OpenAPI 3/Swagger、Postman 2.1、Apifox OpenAPI 导出、通用 JSON、基础 Markdown 与基础 Excel 用例映射。
45+
当前确定性输入支持 OpenAPI 3/Swagger、Postman 2.1、Apifox OpenAPI 导出、通用 JSON、基础 Markdown 与基础 Excel 用例映射。Postman 是基础请求轮廓导入;Markdown 是 Method/Path 保守提取,不生成虚假参数或断言;Excel 是基础用例映射与结果副本回填,不能直接编译时返回 `manual_conversion_required`;Apifox 确定性支持 OpenAPI 导出。
4646

4747
## 安装一次
4848

49-
要求 Python 3.11+。安装阶段创建隔离环境并安装 Runner 与全部依赖;后续执行不会运行 `pip install`、自动更新或下载组件。
49+
要求 Python 3.11-3.13。安装阶段创建隔离环境并安装 Runner 与全部依赖;后续执行不会运行 `pip install`、自动更新或下载组件。
5050
当前发布包不提供自动安装钩子:下载或安装 Skill Bundle 后,用户需要手动执行一次对应平台的安装命令;之后 Skill 复用已安装 Runner,不会重复安装。
5151

5252
Windows PowerShell:
@@ -78,9 +78,9 @@ Release 离线包包含 wheel、依赖 wheelhouse、Schema、模板、Skill 和
7878

7979
```powershell
8080
.\.venv\Scripts\multi-api.exe doctor --quick
81-
.\.venv\Scripts\multi-api.exe preflight examples\login-create-query\workflow.yaml --approve-risk P1
81+
.\.venv\Scripts\multi-api.exe preflight examples\login-create-query\workflow.yaml --approve-risk P0
8282
.\.venv\Scripts\multi-api.exe preview examples\login-create-query\workflow.yaml
83-
.\.venv\Scripts\multi-api.exe run examples\login-create-query\workflow.yaml --approve-risk P1
83+
.\.venv\Scripts\multi-api.exe run examples\login-create-query\workflow.yaml --approve-risk P0
8484
```
8585

8686
真实路径为:登录 → token → 用户 → 创建订单 → order_id → 查询 → 支付 → 有限轮询 paid → 脱敏证据 → JSON/HTML/JUnit。
@@ -104,7 +104,7 @@ multi-api cache status
104104
multi-api cache clear
105105
```
106106

107-
`auto` 缺少环境或变量,它完成 detect/import/readiness/compile/preview 后输出 `compile-only`,不伪造执行
107+
`auto` 对确定性生成的 HTTP-only 骨架始终停在 preview,并输出 `{"status":"compile_only","reason":"business_assertion_missing"}`;它不会自动发送后续写请求或把 HTTP 成功描述成业务通过
108108

109109
## 执行、断言与风险
110110

@@ -140,7 +140,7 @@ evidence/RUN_ID/
140140
- `post_checks` 可对 SQLite 执行真实只读参数化查询,并对行数、字段值断言;PostgreSQL/MySQL 适配使用只读事务并配置 CI service 验证。
141141
- 首次 Ctrl+C 优雅取消并保存部分证据、summary 和 manifest;第二次写最小标记后退出。退出码 4。
142142
- cleanup 是独立审计阶段,只接受本次步骤提取的资源 ID;404 为 `already_absent`,失败不覆盖 `business_status`
143-
- allowlist 插件 SDK 提供 auth、crypto、verifier、data_factory、cleanup Protocol、版本、超时、分类和脱敏结果;内置静态认证、AES ECB PKCS7、可复现数据和本地 cleanup
143+
- PluginLoader 与 Protocol 已存在,但 v0.1.1 的 auth、crypto、verifier、data_factory、cleanup 尚未全部接入 Runner 项目配置;当前插件能力为 SDK Preview,不宣传为成熟可直接配置的插件系统,完整接入计划放在 v0.2
144144
- HTML 展示 readiness、冲突、数据库、cleanup、插件、人工核验、取消和截断并自动转义。Codex 默认仅读取受限的 `summary_for_ai.json`
145145

146146
退出码:`0` 通过,`1` 测试/断言/cleanup 失败,`2` 输入或 preflight 错误,`3` 基础设施错误,`4` 用户取消,`5` 部分完成/预算耗尽,`6` 内部错误。
@@ -153,7 +153,7 @@ GitHub Actions 已在 Windows、Linux、macOS 的 Python 3.11–3.13 上真实
153153

154154
- v0.1 聚焦 REST,不支持 UI、gRPC 或 WebSocket 执行。
155155
- Windows 合作式取消已覆盖;GitHub Windows Runner 无法可靠完成原生双 Ctrl+C E2E,因此该项仍为已知限制。
156-
- Postman JavaScript 不执行;远程 OpenAPI `$ref` 默认关闭;插件未经 allowlist 配置不执行
156+
- Postman 仅导入基础请求轮廓且 JavaScript 不执行;远程 OpenAPI `$ref` 默认关闭;插件为 SDK Preview,尚未全部接入 Runner 项目配置
157157
- Markdown 是保守的 Method/Path 提取,不理解任意自然语言表格。
158158
- Excel 仅支持基础列映射和结果副本回填。
159159
- Apifox 仅确定性支持其 OpenAPI 导出格式。
@@ -188,6 +188,6 @@ GitHub Actions 已在 Windows、Linux、macOS 的 Python 3.11–3.13 上真实
188188

189189
## 路线图与贡献
190190

191-
高价值后续:multipart/文件上传、资源锁并发、数据库驱动证据、项目插件 SDK、Ctrl+C 跨平台验证、签名离线包。贡献请先增加失败测试,保持 ATIR 向后兼容,禁止提交真实密钥、伪造证据或虚假 benchmark。
191+
高价值后续:v0.2 完整项目插件接入、更强的业务链路规则、Ctrl+C 跨平台验证与签名离线包。贡献请先增加失败测试,保持 ATIR 向后兼容,禁止提交真实密钥、伪造证据或虚假 benchmark。
192192

193193
许可证:MIT。详见 [架构](docs/architecture.md)[协议](docs/execution-protocol.md)[断言策略](docs/assertion-policy.md)[安全](docs/security.md)[安装](docs/installation.md)

0 commit comments

Comments
 (0)