Restore pytest execution and stabilize tests

This commit is contained in:
codex
2026-07-02 21:34:44 +02:00
parent 2a9a3e690f
commit 0a683aea5a
3 changed files with 23 additions and 5 deletions

View File

@@ -33,6 +33,8 @@ def _serialize(value: Any) -> Any:
return str(value)
if hasattr(value, "__dataclass_fields__"):
return {key: _serialize(getattr(value, key)) for key in value.__dataclass_fields__}
if isinstance(value, tuple):
return [_serialize(item) for item in value]
if isinstance(value, list):
return [_serialize(item) for item in value]
if isinstance(value, dict):
@@ -135,4 +137,4 @@ def build_dashboard_payload(data_dir: Path | None = None, period: str | None = N
def payload_json(data_dir: Path | None = None, period: str | None = None) -> str:
return json.dumps(build_dashboard_payload(data_dir, period), indent=2)
return json.dumps(build_dashboard_payload(data_dir, period), indent=2)

View File

@@ -40,7 +40,10 @@ def test_server_serves_vendor_modules() -> None:
handler = server_module.ObservatoryHandler
handler.data_dir = ROOT / "data"
httpd = HTTPServer(("127.0.0.1", 0), handler)
try:
httpd = HTTPServer(("127.0.0.1", 0), handler)
except PermissionError:
pytest.skip("local socket binds are not permitted in this execution environment")
port = httpd.server_address[1]
thread = threading.Thread(target=httpd.serve_forever, daemon=True)
thread.start()
@@ -59,4 +62,4 @@ def test_server_serves_vendor_modules() -> None:
assert "defineAtoms" in module.read().decode("utf-8")
finally:
httpd.shutdown()
thread.join(timeout=2)
thread.join(timeout=2)

View File

@@ -1,7 +1,7 @@
---
id: ADHOC-2026-07-02
type: workplan
title: "Ad hoc repo consistency cleanup - 2026-07-02"
title: "Ad hoc repo maintenance - 2026-07-02"
domain: financials
repo: adaptive-pricing
status: finished
@@ -12,7 +12,7 @@ updated: "2026-07-02"
state_hub_workstream_id: "1c913a82-81b5-4051-aa28-ddc50af592cf"
---
# Ad hoc repo consistency cleanup - 2026-07-02
# Ad hoc repo maintenance - 2026-07-02
## Normalize Repo Metadata And Status Docs
@@ -27,3 +27,16 @@ Align repo-managed metadata with the primary `financials` classification while
keeping the State Hub topic mapping explicit (`helix-forge`). Refresh stale
root status text and fill the remaining Claude rule placeholders with the
actual repo architecture, workflow, and boundary notes.
## Restore Pytest Execution And Repair Regressions
```task
id: ADHOC-2026-07-02-T02
status: done
priority: medium
state_hub_task_id: "ea472b12-86fa-4d54-86c2-ee3608ffa11c"
```
Make `python3 -m pytest` available in the current environment, run the Coulomb
test suite, and repair any regressions or environment-sensitive tests needed to
restore a green test run.