Orchestrata Ultimate › Plans › plan_subphase_0_3 › subplan-test-infra-deps-2026-04-12
Subplan: Sub-phases 0.3 + 0.4 — Test Infrastructure + Dependencies (Steps 28-38)
Source: plans/plan_subphase_0_3/subplan-test-infra-deps-2026-04-12.md at 8a2cb42ad · last changed 2026-07-27 · first committed 2026-04-12 · 88 lines.
Prose pending.
Plan text
Subplan: Sub-phases 0.3 + 0.4 — Test Infrastructure + Dependencies (Steps 28-38)
Context
Sub-phase 0.2 (core port) is complete. 791 tests pass at 91% coverage on ported modules. This subplan sets up test infrastructure (fixtures, factories, markers) and updates pyproject.toml dependencies.
Source (read-only): /home/mohamed/workspace/orchestrata/
Target: /home/mohamed/workspace/orchestrata-ultimate/
Coverage gate: --cov-fail-under=90 — existing test coverage must not regress.
Traceability: All fixtures and factories traced with @traces("REQ-0.3-XXX").
Steps
Step 28: Port root conftest.py (merge into existing)
- Source:
/home/mohamed/workspace/orchestrata/tests/conftest.py - Merge INTO existing
tests/conftest.py— keep isolation, test_id, enforce_test_isolation - Port: pytest_collection_modifyitems (auto-markers), pytest_configure (marker registration)
- DO NOT port: global mutable state, module-scope fixtures, bare os.environ reads
- Add prolog_engine fixture (per-test, lazy import)
- @traces("REQ-0.3-001")
Step 29: Port tests/fixtures/ (parallel-safe)
- Source:
/home/mohamed/workspace/orchestrata/tests/fixtures/ - Dest:
tests/fixtures/ - Downscope ALL fixtures to function scope
- Fix ALL os.environ["X"] to .get() with defaults
- @traces("REQ-0.3-002")
Step 30: Port tests/factories/
- Source: find
tests/factories/in orchestrata - Dest:
tests/factories/ - Use try/except ImportError for unported types
- @traces("REQ-0.3-003")
Step 31: Port tests/infrastructure.py
- Fix ALL os.environ reads
- @traces("REQ-0.3-004")
Step 32: Port conftest_infra_gate.py
- Fix ALL os.environ reads
- @traces("REQ-0.3-004")
Step 33: Set up auto-markers + register in pyproject.toml
- markers: requires_redis, requires_neo4j, requires_prolog
- @traces("REQ-0.3-005")
Step 34: Create test directory structure
- 15 directories: cxp, providers, llm, di, drivers, agents, governance, postman, kernel, orchestrator, knowledge_graph, session, memory, gateway, plugin
- Each gets init.py and minimal conftest.py
- @traces("REQ-0.3-006")
Step 35: Gate check — all tests pass (>=791)
Step 36: Update pyproject.toml
- Bump httpx >=0.28.0, fastapi >=0.110.0
- Add pyjwt>=2.8.0, watchfiles>=0.21
- Remove asyncio>=3.4.3 (stdlib)
- Add dev: pytest-xdist>=3.5.0, pytest-timeout>=2.1.0
- Run uv sync --dev
- @traces("REQ-0.3-007")
Step 37: Pin orchestrata source commit
cd /home/mohamed/workspace/orchestrata && git rev-parse HEAD > plans/ORCHESTRATA_PIN.txt- @traces("REQ-0.3-008")
Step 38: Phase 0 Final Gate Check
- Full test suite passes
- Coverage >=90% on all previously-ported modules
Requirements
| REQ ID | Description |
|---|---|
| REQ-0.3-001 | conftest.py merged with auto-markers, no globals |
| REQ-0.3-002 | fixtures/ ported, function-scope, safe env defaults |
| REQ-0.3-003 | factories/ ported with ImportError guards |
| REQ-0.3-004 | infrastructure.py + conftest_infra_gate.py ported |
| REQ-0.3-005 | Auto-markers registered in pyproject.toml |
| REQ-0.3-006 | 15 test subdirectories created |
| REQ-0.3-007 | pyproject.toml updated, uv sync clean |
| REQ-0.3-008 | Orchestrata source pinned |
| REQ-0.3-009 | All os.environ use .get() with defaults |
| REQ-0.3-010 | Tests pass (>=791), coverage >=90% on ported |