test_p_deploy_performance.py python
45 lines 1.5 KB
Raw
sha256:c07f2f34a0db9f43fe866f157d1935322008545ff8940c06c7c921eb219c55ab NXP-b DONE: independent BV-r2 pass + ISR (SD-17) Human minor ⚠ breaking 18 hours ago
1 """Performance bounds for P-deploy Mode C (§PD.9)."""
2
3 from __future__ import annotations
4
5 import time
6
7 from tests.fixtures.p_deploy import load_p_deploy_entry, seed_p_deploy_repo
8 from tools.honesty.ledger import append_entry
9 from tools.honesty.status import HonestyStatusOptions, run_honesty_status
10 from tools.honesty.types import LedgerAppendOptions
11
12 _MATCH_SCAN_BUDGET_S = 1.0
13
14
15 def test_mode_c_match_over_realistic_ledger_within_bound(repo_root) -> None:
16 config = seed_p_deploy_repo(repo_root, require_deploy_health="require")
17 for round_num in range(1, 51):
18 body = load_p_deploy_entry("verification-test-output-only.json")
19 body["round"] = round_num
20 body["actor_session_id"] = f"bv-{round_num}"
21 append_entry(
22 config=config,
23 repo_root=repo_root,
24 options=LedgerAppendOptions(kind="verification_evidence", body=body),
25 )
26 deploy = load_p_deploy_entry("verification-with-deploy-health.json")
27 deploy["round"] = 51
28 append_entry(
29 config=config,
30 repo_root=repo_root,
31 options=LedgerAppendOptions(kind="verification_evidence", body=deploy),
32 )
33 started = time.perf_counter()
34 result = run_honesty_status(
35 config=config,
36 repo_root=repo_root,
37 options=HonestyStatusOptions(
38 hook=None,
39 artifact=None,
40 deploy_health="Track P / P-deploy",
41 ),
42 )
43 elapsed = time.perf_counter() - started
44 assert result.exit_code == 0
45 assert elapsed < _MATCH_SCAN_BUDGET_S
File History 1 commit
sha256:c07f2f34a0db9f43fe866f157d1935322008545ff8940c06c7c921eb219c55ab NXP-b DONE: independent BV-r2 pass + ISR (SD-17) Human minor 18 hours ago