test_p_deploy_performance.py
python
sha256:0e9549ec7b463911bc08b7d586dc320b1ac9b1f5c943ee7e3865dcc6cb0f6f83
chore(governance): sync handover+roadmap to 84db8c8 (drift:…
Human
1 day 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:6abcf1fa82a7a621ccbc945f19acdba5bc0db54569599404a1452fb4a096a199
fix(ISR): default require_independent_second_reviewer to require
Human
minor
⚠
1 day ago