mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-16 03:49:26 +00:00
chore(harnessx-removal): delete HarnessX code and packaging (task 6)
Deletes harness_ext.py and hunter_harness.py with their HarnessX-only tests (the judge path, verify_judge.py, went in task 5). The harnessx extra, its mypy override and its uv.lock entries are removed (uv lock drops only packages; no remaining version changes). The conftest fixture becomes assert_cold_import; test_gate's two never-import checks become one allow-list (stdlib, openultrasast, yaml) over the governance planes' module-level imports, and the skipped live-extra tolerance test is deleted. Audit rows for the two modules are removed, stage_processors is reworded, and the module-audit manifest is regenerated (no orphan). test_removed_plane_references implements Req 2.4 over src, tests and pyproject.toml: a match must carry a `retired 2026-..` tag (the spec's own slug is not counted). The README part is a strict xfail until task 8 rewrites the README's plane sections. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
cbadc38d5e
commit
b9afb66250
+5
-12
@@ -5,12 +5,6 @@ import sys
|
||||
|
||||
import pytest
|
||||
|
||||
_HARNESSX_GUARD = (
|
||||
"\nimport sys as _sys\n"
|
||||
"_leaked = sorted(m for m in _sys.modules if m == 'harnessx' or m.startswith('harnessx.'))\n"
|
||||
"assert not _leaked, 'leaked harnessx modules: ' + repr(_leaked)\n"
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _pointer_pairs_offline(monkeypatch: pytest.MonkeyPatch, tmp_path_factory: pytest.TempPathFactory) -> None:
|
||||
@@ -31,17 +25,16 @@ def _repos_offline(monkeypatch: pytest.MonkeyPatch, tmp_path_factory: pytest.Tem
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def assert_cold_of_harnessx(): # type: ignore[no-untyped-def]
|
||||
"""Run ``code`` in a fresh interpreter and assert it imported no ``harnessx`` module.
|
||||
def assert_cold_import(): # type: ignore[no-untyped-def]
|
||||
"""Run ``code`` in a fresh interpreter and assert it exits 0.
|
||||
|
||||
Hermetic by construction: the lazy-import guarantee is verified the same way
|
||||
whether or not the optional extra is installed in this environment (a global
|
||||
``sys.modules`` check would be polluted by other tests once the extra is present).
|
||||
Hermetic by construction: an import-laziness check (``code`` asserts on ``sys.modules`` itself) is not
|
||||
polluted by modules other tests have already imported into this process.
|
||||
"""
|
||||
|
||||
def _check(code: str) -> str:
|
||||
proc = subprocess.run(
|
||||
[sys.executable, "-c", code + _HARNESSX_GUARD],
|
||||
[sys.executable, "-c", code],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user