test_track_o_performance.py python
29 lines 871 B
Raw
sha256:106ef9e12cca7f3be3ffb2a6bd3abfa76f032dce453c9e5010d732a8d86f2e14 Reconcile reviewed credential compatibility 32254cd939885d9… Human patch 10 days ago
1 """Performance — Track O harness bounded on real pack (§O0.8 performance)."""
2
3 from __future__ import annotations
4
5 import time
6 from pathlib import Path
7
8 from tools.track_o.validate import PACK_RELS, validate_track_o_pack
9
10 KIT_ROOT = Path(__file__).resolve().parents[2]
11
12 # Documented bound: single harness pass over the declared three-path pack.
13 MAX_SECONDS = 0.5
14
15
16 def test_validate_track_o_pack_bounded() -> None:
17 start = time.monotonic()
18 result = validate_track_o_pack(KIT_ROOT)
19 elapsed = time.monotonic() - start
20 assert result.ok, result.errors
21 assert elapsed < MAX_SECONDS
22
23
24 def test_harness_only_declared_pack_paths() -> None:
25 """Harness surface declares exactly three relative paths (no unbounded walk)."""
26 assert len(PACK_RELS) == 3
27 for rel in PACK_RELS:
28 assert not rel.is_absolute()
29 assert ".." not in rel.parts
File History 2 commits
sha256:106ef9e12cca7f3be3ffb2a6bd3abfa76f032dce453c9e5010d732a8d86f2e14 Reconcile reviewed credential compatibility 32254cd939885d9… Human patch 10 days ago
sha256:c87cf2c2f03da507f66f93922cb339a2cbebb33ad6372a6039032fb09a20da12 Reconcile reviewed Overseer recovery d47291d5d9030de5ebef71… Human minor ⚠ 10 days ago