修正 PChome closeout receipt 可見計數
Some checks failed
CD Pipeline / deploy (push) Has been cancelled

This commit is contained in:
ogt
2026-07-02 10:53:07 +08:00
parent bd6c083a5c
commit 24714d26b8
2 changed files with 12 additions and 2 deletions

View File

@@ -4468,8 +4468,9 @@ def build_pchome_direct_mapping_retry_candidate_exception_controlled_apply_recei
},
{"check": "replay_does_not_write_database", "passed": safety["writes_database"] is False},
]
summary["executor_receipt_materialized_count"] = len(materialized_artifacts)
summary["executor_receipt_hash_match_count"] = 1 if actual_sha and actual_sha == receipt_artifact["payload_sha256"] else 0
existing_receipt_hash_match = bool(actual_sha) and actual_sha == receipt_artifact["payload_sha256"]
summary["executor_receipt_materialized_count"] = len(materialized_artifacts) or (1 if existing_receipt_hash_match else 0)
summary["executor_receipt_hash_match_count"] = 1 if existing_receipt_hash_match else 0
summary["post_executor_receipt_verifier_check_count"] = len(verifier_checks)
safety["writes_artifact_count"] = len(materialized_artifacts)
return {

View File

@@ -1402,6 +1402,15 @@ def test_direct_mapping_retry_candidate_exception_controlled_apply_receipt_repla
receipt_payload = json.loads(receipt_path.read_text(encoding="utf-8"))
assert receipt_payload["run_id"] == run_id
assert receipt_payload["summary"]["post_apply_readback_pass_count"] == 2
read_only_package = build_pchome_direct_mapping_retry_candidate_exception_controlled_apply_receipt_replay_package(
artifact_root=tmp_path,
run_id=run_id,
materialize_artifacts=False,
engine=engine,
)
assert read_only_package["summary"]["executor_receipt_materialized_count"] == 1
assert read_only_package["summary"]["executor_receipt_hash_match_count"] == 1
assert read_only_package["post_executor_receipt_verifier"]["hash_match"] is True
assert call_count["search"] == 2