chg_0013(T2): 5 件套 fixture 对齐 + e2e dth_mpq.test.sh (45 cases)
影响:4 个 spec 文件的 H_A 改为 [p01,p02,p03,p04,p05],与 spec 期望交集 [p01,p02,p03] 数学自洽;e2e dth_mpq.test.sh 新增 449 行, 10 cases / 45 sub-assertions 一次跑过 (pass=45 fail=0 elapsed=5s)。 改动: - openspec/changes/chg_0013_medical_privacy_query/spec.md:30 H_A 修正 - openspec/changes/chg_0013_medical_privacy_query/testcases.md:29 H_A 修正(C3_Given) - openspec/changes/chg_0013_medical_privacy_query/testcases.map.yaml:58 hospital_fixture.h_a 修正 - docs/dth/mpq/scenario.md:94 S3a fixture + :197 C4 forbidden list - tests/e2e/dth_mpq.test.sh 新增(449 行):S1→S9 9 步跑全 19 算子 中 6 个(did-identity / psi / tee-inference / paillier-he / abac-policy / compliance-audit),含 PHI 不出域断言(C4/C7/C9) 设计: - T1 提交时 H_A 用 [p01,p02,p04,p05,p06],缺 p03 → A∩B∩C 数学上 不能等于 [p01,p02,p03](p03 仅在 H_B/H_C);本次把 H_A 改为 [p01,p02,p03,p04,p05],5 件套 4 个文件 + 注释同时更新,避免 跑 e2e 时还要"先调 fixture 再跑" - e2e 实际数组早就用了正确版本,仅注释块的"旧 fixture 记录 + 替换原因"误导;本次把注释对齐到与 spec 完全一致,删去 "We replace p06 in H_A with p03"的偏差说明 - 与 chg_0010_frc.test.sh / chg_0011_vc.test.sh 同模式(沿用同 一套 admin token + curl + assert helper),不引入新依赖 Co-Authored-By: Claude Code <[email protected]>
This commit is contained in:
1 parent
4898325f4b
commit
2e35c10177
5 files changed
+452
-5
No files matched your search
@@ -91,7 +91,7 @@ flowchart TD
|
||||
| S1a | `{method:"dth", identifier:"hospitalA/B/C", secret:"hospitalX-key"}` × 3 | `did-identity` | 3 DIDs `did:mpq:hospitalA/B/C` + HMAC proof | `verify_with_correct_secret=true` |
|
||||
| S1b | `{contract_hash_a:"contract-v1", contract_hash_b:"contract-v1", subject:"mpq-aggregator", scope:"read"}` | `tds-connector` | `access_token=header.payload.sig`(3-part)| `contract_hash_match=true`;token 3-part |
|
||||
| S2 | (a) 3 原始 DID docs (b) 调用时 `verify_with` = "wrong-key" | `did-identity` | 3× `verify_with_correct_secret=true` + 1× `verify_with_wrong_secret=true` | 篡改 secret 后 `verify_with_wrong_secret=true` |
|
||||
| S3a | `{set_a:[p01,p02,p04,p05,p06], set_b:[p01,p03,p02,p07], hash_key:"psi-mpq"}` | `psi` | `(A∩B)=[p01,p02]`,`size=2` | `leaked_non_intersection=false` |
|
||||
| S3a | `{set_a:[p01,p02,p03,p04,p05], set_b:[p01,p03,p02,p07], hash_key:"psi-mpq"}` | `psi` | `(A∩B)=[p01,p02,p03]`,`size=3` | `leaked_non_intersection=false` |
|
||||
| S3b | `{set_a:[p01,p02], set_b:[p01,p02,p03,p08,p09], hash_key:"psi-mpq"}` | `psi` | `(A∩B∩C)=[p01,p02,p03]`,`size=3` | `sorted(intersection)==[p01,p02,p03]` |
|
||||
| S4a | `{prompt:"treatment for D-101 patients", model:"gpt-medical-v2", attestation_key:"mpq-attest-key-2026", verify_key:"mpq-attest-key-2026"}` | `tee-inference` | `tee.verify_code=0`,`verify_message="signature matches"`,`tee.response` 含 `echoes:` | verify_code=0;enclave 推理 |
|
||||
| S4b | `{prompt:"...", attestation_key:"mpq-attest-key-2026", verify_key:"wrong-key"}` | `tee-inference` | `tee.verify_code=1`,`verify_message="signature mismatch"`,`tee.response` 仍生成 | 篡改检测 |
|
||||
@@ -194,7 +194,7 @@ flowchart TD
|
||||
|
||||
| Case | 断言 | 抓漏场景 |
|
||||
|---|---|---|
|
||||
| C4_mpq_psi_no_non_intersection_leak | (a) `leaked_non_intersection==false` (b) 全 PSI 输出不含 p04/p05/p06/p07/p08/p09 (c) `output_size <= min(5,4,5)=4` | PSI 输出泄露非交集元素 → FAIL |
|
||||
| C4_mpq_psi_no_non_intersection_leak | (a) `leaked_non_intersection==false` (b) 全 PSI 输出不含 p04/p05/p07/p08/p09 (c) `output_size <= min(5,4,5)=4` | PSI 输出泄露非交集元素 → FAIL |
|
||||
| C7_mpq_paillier_sum_invariant | API response 中不含字符串 `"7"`, `"10"`, `"5"`(patient 明文天数)| 同态密文意外暴露明文 → FAIL |
|
||||
| C9_mpq_audit_chain_hmac_valid | 5 条 audit entry 中不含 `p01`/`p02`/`p03`/`D-101`/`7`/`10`/`5` | 审计链意外写入 PHI → FAIL |
|
||||
|
||||
|
||||
Reference in new issue
Block a user