Repository navigation
API Engine Contract Drift Fix 2026 07 04
Every cycle run triggered from the React UI failed immediately with a chain of AttributeError/TypeError surfaced through the execution manager's defensive handler:
'Plan' object has no attribute 'tags'run_plan() got an unexpected keyword argument 'fail_fast''TestosteroneConfig' object has no attribute 'reporters'- (after those) stages ran but pytest exited 4:
ModuleNotFoundError: No module named 'jwt'
CLI runs (testo run --cycle) were unaffected throughout.
testo_api/cycle_execution_manager.py was written against the unmerged branch cursor/report-infra-e976a, whose world includes Plan.tags, TestosteroneConfig.reporters (ReporterSpec), the full testo_core/reporting/reporters/ package (orchestrate.run_configured_reporters, factory, Allure/Extent/ReportPortal/TestBeats reporters), and a fail_fast parameter on run_plan(). None of that exists on main — only stale __pycache__/*.pyc files remained as evidence. The frontend (RunPanel fail-fast toggle, SSE plan_aborted type) and the docs (Troubleshooting and Error Codes, Deep Dive - Execution Logic) already specified the fail-fast contract.
The fourth failure was environmental: framework adapters build argv with bare tool names (pytest), resolved via the subprocess PATH. When uvicorn is launched directly from .venv/bin/uvicorn (no activated venv), stage subprocesses resolved a system-level pytest (Python 3.12 framework install) that lacks the project's dependencies.
-
testo_api/cycle_execution_manager.py: removed phantomtags=plan.tagsfrom_apply_workers_override; reporter block now usesgetattr(cfg, "reporters", ())and treats a missingtesto_core.reporting.reporters.orchestratemodule as "skip post-run reporting" instead of crashing; stage subprocess env now prependsPath(sys.executable).parenttoPATH(deliberately not.resolve()— in a venvsys.executableis a symlink into the base interpreter, and resolving it points at the wrong bin dir). -
testo_core/engine/orchestrator.py: implementedrun_plan(..., fail_fast=False)per the locked NDJSON contract — a stage with non-zero returncode writes{"event":"plan_aborted","reason":"fail_fast","completed_stages":N}and breaks;plan_finishedstill closes the stream. This was previously documented but unimplemented.
-
Decide whether to merge or discardResolved 2026-07-21 — hand-ported intocursor/report-infra-e976a(reporters subsystem +reporters:config schema).main, see Reporters Subsystem Port - 2026-07-21. - CLI
--fail-fastflag remains a roadmap item (Command Reference callout) — the engine now supports it, so wiring the flag is trivial. - Engine tests for
fail_fast/plan_abortedreferenced in QA Strategies (LC rows) do not actually exist yet; add them.
Generated from docs/Archive/API-Engine Contract Drift Fix - 2026-07-04.md. Edit it there; changes made in the wiki are overwritten.
Architecture
CLI Commands
Processes & Guides
- CI-CD Pipeline Setup
- E2E Harness Operations Guide
- GitLab Pages Demo
- Publishing Docker Images
- Publishing to Artifactory
- Publishing to PyPI
Prompts & Snippets
Roadmap & Strategy
Specs & ADRs
- Architecture Consolidation - 2026-10-06
- BehaveX Reports - 2026-10-21
- Command Adapter and JUnit Import - 2026-09-25
- Delta Comparison Policy
- Docs Site - 2026-10-19
- Docs Vault and Wiki Sync - 2026-10-07
- GitHub Action PR Comment - 2026-10-19
- Interview Readiness Fixes - 2026-10-07
- Library Packaging
- Open Source Features - 2026-10-19
- Phase 3 Delta Comparison Engine Plan
- Phase 3 Unified Dashboard Plan
- Phase 4 BYOK and Failure Analysis
- Phase 5 UI Redesign - Cycles-First Navigation
- Playwright Adapter - 2026-10-19
- Plugin API - 2026-10-19
- Specs & ADRs
- Repository Pattern - Database-Agnostic Refactor
- UI Restyle - 2026-10-19
Testing Workflows
Vault